Jump to content

Discount hidden for a customer group


Recommended Posts

Hi everyone,
my site it's B2B and B2C and I'd like view the discount (with original price barred) only for customer not professional.
So, when the smarty array customer is setted and its value is a defined value, I'd like show the prices without discount because professional customer have anyway a dedicated prices.
I think that modifying all page controllers that show products isn't the solution! (as I've done in cms controller):
$this->context->smarty->assign(array('customer' => $this->context->customer)); 
I can't modify all the controllers that call product page (category, bestsales, discount, search, compare, ...)
 
So I think modify only product class to read customer group. Is it a good idea? Can you help me to modify the product class whitout risk?
 
I think that I can insert in product.tpl something like this:
{if ($customer->id_default_group|intval) != 8}

before reduced price (but I need setting customer group!)

 

Thanks!

 

Link to comment
Share on other sites

 

Hi everyone,
my site it's B2B and B2C and I'd like view the discount (with original price barred) only for customer not professional.
So, when the smarty array customer is setted and its value is a defined value, I'd like show the prices without discount because professional customer have anyway a dedicated prices.
I think that modifying all page controllers that show products isn't the solution! (as I've done in cms controller):
$this->context->smarty->assign(array('customer' => $this->context->customer)); 
I can't modify all the controllers that call product page (category, bestsales, discount, search, compare, ...)
 
So I think modify only product class to read customer group. Is it a good idea? Can you help me to modify the product class whitout risk?
 
I think that I can insert in product.tpl something like this:
{if ($customer->id_default_group|intval) != 8}

before reduced price (but I need setting customer group!)

 

Thanks!

 

Hi..

 

you need to override the product classes.

 

read here

 

http://doc.prestashop.com/display/PS16/Overriding+default+behaviors

 

Thanks 

  • Like 1
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...