Post by MikaelSampoerna » Wed Apr 29, 2015 10:18 am

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!


Posts

Joined
Sun Nov 23, 2014 10:58 pm

Post by viethemes » Wed Apr 29, 2015 2:50 pm

You can try to use this code

Code: Select all

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

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by MikaelSampoerna » Sat May 09, 2015 10:14 am

Hi, thanks for your reply.
Your code not working.
Actually my problem is solved. Just add $user_group in controller.
Thanks =)


Posts

Joined
Sun Nov 23, 2014 10:58 pm
Who is online

Users browsing this forum: No registered users and 5 guests