1

How i can disable the wishlist in magento only for guest users and show to logged in users?

which files I need to change?

Many thanks

[update] i have a file in /app/design/frontend/base/default/mytheme/layout/customer.xml with this code: `

<customer_logged_out>
    <reference name="top.links">
        <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position>
        <liParams/><aParams>class="flat_top_icon icon-login-1"</aParams><!-- aggiungo classe -->
        </action>
    </reference>
    <remove name="reorder"></remove>
</customer_logged_out>`

Added the code inside, but not work:

<customer_logged_out>
    <!---<reference name="right">
        <block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
    </reference>-->
    <reference name="top.links">
        <reference name="top.links">
            <remove name="wishlist_link"/>
        </reference>
        <reference name="right">
            <remove name="wishlist_sidebar"/>
        </reference>
        <reference name="left">
            <remove name="wishlist_sidebar"/>
        </reference>
        <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position>
        <liParams/><aParams>class="flat_top_icon icon-login-1"</aParams><!-- aggiungo classe -->
        </action>
    </reference>
    <remove name="reorder"></remove>
</customer_logged_out>
4

Magento wishlist functionality works when coustomer logged in. But you can remove wishlist blocks for not logged in users. Add local.xml to your theme layout /app/design/frontend/base/default/layout/local.xml:

<?xml version="1.0"?>
<layout version="0.1.0">
    <customer_logged_out>
        <reference name="top.links">
            <remove name="wishlist_link"/>
        </reference>
        <reference name="right">
            <remove name="wishlist_sidebar"/>
        </reference>
        <reference name="left">
            <remove name="wishlist_sidebar"/>
        </reference>
    </customer_logged_out>
</layout>
1
  • Hello! Thanks for your reply! but not work. i have updated the question.
    – Rob1n
    Aug 7 '13 at 10:50
1

What you can try is create an observer for events customer_login and customer_logout in your custom module and based on these events you can enable or disable wishlist module's output using below code

Mage::getSingleton('core/config')->->saveConfig('advanced/modules_disable_output/wishlist', <0 or 1>);

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.