Jump to content

How is var displayPrice calculated


Recommended Posts

Hi, i am trying to edit product.tpl to edit the way product price is calculated.

 

how does it apply the discounts to the customer groups? where the math is being done?

 

I can't seem to find it product.tpl, would it be in a php file?

 

Thanks.

RICKY

 

Link to comment
Share on other sites

Thanks i opened the product.php in teh classes/product folder and found the group_reduction <-- this is the discount for a customer group, is calcaulted as follows.

 

What i need to do , is reverse it instead of discount by percentage, i want to increase by percentage.

any idea?

 

 

// Group reduction
if ($use_group_reduction)
{
$reduction_from_category = GroupReduction::getValueForProduct($id_product, $id_group);
if ($reduction_from_category !== false)
$price -= $price * (float)$reduction_from_category;
else // apply group reduction if there is no group reduction for this category
$price *= ((100 - Group::getReductionByIdGroup($id_group)) / 100);
}
Link to comment
Share on other sites

Thanks, but i dont want a discount or a surcharge, i want to increase the price by % for each customer group i want to do it within prestashop interface not a module interface.

 

thanks.

 

where can i see your homepage?

Link to comment
Share on other sites

Thanks, but i dont want a discount or a surcharge, i want to increase the price by % for each customer group i want to do it within prestashop interface not a module interface.

 

thanks.

 

where can i see your homepage?

Link to comment
Share on other sites

×
×
  • Create New...