1

I am trying to create new tab "My Designs" below Customer Account section similar to "My Product like" I tried below code, but its not displaying new tab. Also followed link

enter image description here

config.xml

  <layout>
      <updates>
        <design>
          <file>design.xml</file>
        </design>
      </updates>
    </layout>

layout.xml

<customer_account>
        <!-- Mage_Wishlist -->
      <reference name="customer_account_navigation">
          <action method="addLink" translate="label">
          <name>design</name>
          <path>Design/</path>
          <label>My Designs</label></action>
      </reference>
</customer_account>

config.xml

<routers>
      <design>
        <use>standard</use>
          <args>
            <module>Outthink_Design</module>
            <frontName>design</frontName>
          </args>
      </design>
    </routers>

Also we included IndexController.php in app/code/local/Namespace/module/controllers &

productlike.phtml in app/design/frontend/rwd/theme_name/template/design

Is there any way to debug or where i am missing ?

Edit 2

<design_index_index>   
      <update handle="customer_account"/>
      <reference name="my.account.wrapper">   
        <block type="design/index" name="design_index" template="design/design.phtml"> 
            <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
              <block type="page/html_pager" name="product_list_toolbar_pager" />
          </block>         
                </block>  
      </reference>   
  </design_index_index> 

Edit 3 - app/design/frontend/rwd/theme/layout/design.xml

<?xml version="1.0"?>   
<layout version="0.1.0">   
   <default>
        <reference name="head">
            <action method="addItem">
                <type>skin_css</type>
                <name>css/design/ajaxlogin1/styles.css</name>
                <params/>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <name>js/design/ajaxlogin1/script.js</name>
            </action>
        </reference>
        <reference name="before_body_end">
            <block type="core/template" name="ajaxlogin">
                <action method="setTemplate"><template>design/index.phtml</template></action>
                <block type="customer/form_register" name="customer_form_register_ajax" template="design/register.phtml">
                    <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
                        <label>Form Fields Before</label>
                    </block>
                </block>
                <block type="persistent/form_remember" name="persistent.remember.me" template="persistent/remember_me.phtml" />
                <block type="core/template" name="persistent.remember.me.tooltip" template="persistent/remember_me_tooltip.phtml" />
            </block>
        </reference>
    </default>


     <customer_account>
  <reference name="left">
      <action method="addLink" translate="label">
      <name>design</name>
      <path>Design/</path>
      <label>My Designs</label></action>
  </reference>
</customer_account>


  <design_index_index>   
      <update handle="customer_account"/>
      <reference name="my.account.wrapper">   
        <block type="design/index" name="design_index" template="design/design.phtml"> 
            <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
              <block type="page/html_pager" name="product_list_toolbar_pager" />
          </block>         
                </block>  
      </reference>   
  </design_index_index>   
</layout>   
2

Replace your code with this:

<customer_account>
            <!-- Mage_Wishlist -->
          <reference name="customer_account_navigation">
              <action method="addLink" translate="label" module="customer">
              <name>design</name>
              <path>design/index/index/</path>
              <label>My Designs</label></action>
          </reference>
</customer_account>
<design_index_index>
      <update handle="customer_account"/>
      <reference name="content">
                    <block type="design/index"  name="design_index"
                          template="template="design/design.phtml"" />
      </reference>        
  </design_index_index>

Please update it accordingly.

  • Thanks, updated your code, still new tab is not visible, also please check Edit 2 part in question..... – Baby in Magento Mar 6 '17 at 6:38
  • Are you able to see "My Designs" in navigation ? – Arunendra Mar 6 '17 at 6:47
  • No, i am not seeing in navigation also in site , is there anything i am missing in template or controller or block code ? – Baby in Magento Mar 6 '17 at 6:49
  • Please share layout.xml full code because this code is running on magento 1.9.2 – Arunendra Mar 6 '17 at 6:51
  • please check edit3 part in question..... – Baby in Magento Mar 6 '17 at 6:53
2

Try below code

<customer_account>
  <reference name="customer_account_navigation">
      <action method="addLink" translate="label">
      <name>design</name>
      <path>Design/</path>
      <label>My Designs</label></action>
  </reference>
</customer_account>

please check in your customer.xml file links are in this block

<block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">

if it is some other block then replace refrence name

  • Thanks, updated your code, cleared cache, logout and login, still new tab is not visible, is there anything i am missing in template or controller or block code ? – Baby in Magento Mar 6 '17 at 6:47
  • @BabyinMagento check updated code – Murtuza Zabuawala Mar 6 '17 at 6:55
  • in customer/account/navigation.phtml only 3 tabs code available, please check customer.xml full code : pastebin.com/5mQkxiYj – Baby in Magento Mar 6 '17 at 6:57
  • Thanks a lot for your support, i got solution, i need your support like this in future also for my other questions..... – Baby in Magento Mar 6 '17 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.