eyecandy Posted November 25, 2015 Share Posted November 25, 2015 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 More sharing options...
eyecandy Posted December 1, 2015 Author Share Posted December 1, 2015 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 154Change$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 48Change$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 More sharing options...
traktap Posted July 9, 2017 Share Posted July 9, 2017 Thanks for Sharing. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now