Jump to content

How to display the voucher box only for a specific client group


Recommended Posts

Hi,
 
There's already a topic with the same title that dates back to 2014, so I decided to open up my own thread.
 
So far this is what I did (and works), but I wonder if this is the right way (version 1.6.0.11).
 
In "\themes\My-Theme\shopping-cart.tpl" I changed all 3 lines with "{if $voucherAllowed}" to "{if $voucherAllowed && !in_array($defaultGroupId,array(5,6,7))}"
 
I added in "classes\controller\FrontController.php" in line 372:
"'defaultGroupId' => Customer::getDefaultGroupId(Context::getContext()->customer->id),"
So I would know what the GroupID of the currently logged user is.
 
Fiddling with FrontController.php is not something I feel comfortable with, is there a better way?

 

Now I'm stuck on changing the checkout process so the first step out of five is to log in. Any ideas?
 
Thank you!

Edited by prstshp_joe (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...