php - Magento CE 1.9 - How can I add the register newsletter signup checkbox to the edit page? -


मेरे पास वर्तमान में न्यूजलेटर चेकबॉक्स सक्षम है:

/ app / design / frontend / नया / डिफ़ॉल्ट / टेम्पलेट / ग्राहक / फॉर्म / register.php

ऐसा लगता है कि टेम्पलेट फ़ाइल में निम्न कोड का उपयोग करना है:

  & lt; php यदि ($ this- & gt; है NewsletterEnabled ()):? & Gt; & Lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "is_subscribed" शीर्षक = "& lt;? Php echo $ this- & gt; __ ('न्यूज़लेटर के लिए साइन अप करें')? & Gt;" Value = "1" id = "is_subscribed" & lt;? Php अगर ($ this- & gt; getFormData () - & gt; getIs सदस्यता लिया ()):? & Gt; चेक = "चेक किया" & lt;? Php endif; ? & Gt; वर्ग = "चेकबॉक्स" / & gt; & Lt; लेबल = "is_subscribed" & gt; & lt;? Php echo $ this- & gt; __ (न्यूज़लेटर के लिए साइन अप करें)? & Gt; & lt; / label & gt; & Lt;? Php echo $ this- & gt; getChildHtml ('customer.form.register.newsletter')? & Gt; & Lt;? Php endif? & Gt;  


प्रश्न

मैं इसे संपादित करें खाता पेज में एक ही रूप इनपुट कैसे जोड़ सकता हूं?

/app/design/frontend/new/default/template/customer/form/edit.php

उपरोक्त कोड को कॉपी करने से निम्नलिखित त्रुटि होती है, जो स्पष्ट रूप से आवश्यक है फ़ंक्शंस शामिल नहीं किए जा रहे हैं।

मुझे इस बात का अनुमान लग रहा है कि मुझे कुछ एक्सएमएल कहीं न कहीं ... लेकिन कहाँ है?

घातक त्रुटि: किसी गैर-वस्तु

पर सदस्य फंक्शन getIs सदस्यता लिया () को कॉल करें मुझे लगता है कि मुझे निम्नलिखित लेआउट फ़ाइल में जोड़ने की आवश्यकता हो सकती है , क्या यह ग्राहक.xml होना चाहिए और यदि इस फ़ाइल में ऐसा स्थान है? इस टैग के अंदर & lt; customer_account_edit translate = "label" & gt; ?

{{ब्लॉक प्रकार = "न्यूजलेटर / सदस्यता लें" टेम्पलेट = "न्यूजलेटर / subscribe.phtml" }}


अनुसंधान

मुझे निम्नलिखित Magento StackOverflow प्रश्न मिला है, लेकिन इसका जवाब नहीं है जहां XML चला जाता है?

आप इस कोड को / app / design / frontend / new में उपयोग कर सकते हैं /default/template/customer/form/edit.phtml फ़ाइल

  & lt; li वर्ग = "नियंत्रण" & gt; & Lt; div वर्ग = "इनपुट-बॉक्स" & gt; & Lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "is_subscribed" शीर्षक = "& lt;? Php echo $ this- & gt; __ ('न्यूज़लेटर के लिए साइन अप करें')? & Gt;" मान = "1" आईडी = "is_subscribed" वर्ग = "चेकबॉक्स" / & gt; & Lt; / div & gt; & Lt; लेबल = "is_subscribed" & gt; & Lt;? Php echo $ this- & gt; __ (न्यूज़लेटर के लिए साइन अप करें)? & Gt; & Lt; / लेबल & gt; & Lt;? Php echo $ this- & gt; getChildHtml ('customer.form.register.newsletter')? & Gt; & Lt; / li & gt;  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -