Page 1 of 1

Only show Add to Cart button when logged

Posted: Wed Apr 29, 2015 10:18 am
by MikaelSampoerna
Hi everyone,

Need your help to make this work on OC v2.0.1.1
I need to show "Add to Cart" button only when user is logged.
I can make this work on OC 1.5 simply by using:

Code: Select all

if ($this->customer->isLogged())
In 2.0, I think I need to add something in category.php, but don't know where to start.
Can somebody help me?

Thanks!

Re: Only show Add to Cart button when logged

Posted: Wed Apr 29, 2015 2:50 pm
by viethemes
You can try to use this code

Code: Select all

global $customer; if ($customer->isLogged())

Re: Only show Add to Cart button when logged

Posted: Sat May 09, 2015 10:14 am
by MikaelSampoerna
Hi, thanks for your reply.
Your code not working.
Actually my problem is solved. Just add $user_group in controller.
Thanks =)