Jump to content

Impact On Price Decrease Is Changing To Increase When Using Product Combinations Generator


Recommended Posts

i am setting some combination values as to DECREASE impact on price, however when i use the product combinations generator it is changing the impacts to INCREASE! so instead of the combination decreasing by £37 its increasing the price by £37. any help?

thanks

x

Link to comment
Share on other sites

seeing as ive not had a response on here, or from prestashop, or from the prestashop bug tracker issue i raised.... i have ended up having to pay someone on people per hour for a fix! 

 

 

1) admin/themes/default/template/controllers/attribute_generator/content.tpl. Line no 50 - Change if (!isNaN(element_price) && element_price > 0) to if (!isNaN(element_price) ).

2) controllers/admin/AdminAttributeGeneratorController.php. Line no 154

Change

$price = preg_replace('/[^0-9.]/', '', str_replace(',', '.', Tools::getValue('price_impact_'.(int)$attribute)));

to 

$price = preg_replace('/[^0-9.-]/', '', str_replace(',', '.', Tools::getValue('price_impact_'.(int)$attribute)));

Line no 48

Change

$price += (float)preg_replace('/[^0-9.]/', '', str_replace(',', '.', Tools::getValue('price_impact_'.(int)$attribute)));

To

$price += (float)preg_replace('/[^0-9.-]/', '', str_replace(',', '.', Tools::getValue('price_impact_'.(int)$attribute)));

=> Just add "-" minus sign to these both codes.

Link to comment
Share on other sites

  • 1 year later...

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...