Jump to content

PS1.6 : Product-list.tpl : How to display the biggest discount, including quantity-discount.


Recommended Posts

Hello, 

My products have 2 discounts

10% for 1 unit 

25% for minimum 6 units (not for all products).

Issue : product-list.tpl displays $product.specific_prices.reduction which is only 10% in my case. I want to have display instead the 25% which is the best reduction.

In the Model SpecificPrice.php, I see 2 functions

getSpecificPrice () which generates the specific_prices reduction

getQuantityDiscounts () which will allow to get the 25%

 

My idea is to add to the model a new variable $bestreduc and a function getBestReduction() to update it.

Then product-list.tpl would display i$product.specific_prices.bestreduct

Am i on the right path (I'm newby to PS core dev) ?

 

Thanks 

 

 

Edited by Abacchus (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...