Jump to content

Edit History

Abacchus

Abacchus

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 

 

 

Abacchus

Abacchus

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 the 

In the Model SpecificPrice.php, I see 2 functions

getSpecificPrice () whill generate 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 

 

 

×
×
  • Create New...