kamalpreet Posted April 23, 2015 Share Posted April 23, 2015 Hello, I need help related to discount showing priority on front end.i am using prestashop 1.6.0.8. I firstly added product discount on particular product with add a new specific price ie 4% then i added mass discount 5% with catalog price rule and like this i am having two discounts. but on front end its showing 4% discount that i added on particular product. but i need to show mass discount. Please Help me.. Can we add any priority based on multiple discounts on one product Link to comment Share on other sites More sharing options...
egohermansyah Posted April 29, 2015 Share Posted April 29, 2015 Bump for this thread, i have same question like that any one can help Thank's Link to comment Share on other sites More sharing options...
kamalpreet Posted April 29, 2015 Author Share Posted April 29, 2015 Hi, I resolved my issue.. i done small change in classes/SpecificPrice.php Search Function public static function getSpecificPrice and in this function i changed query from id_specific_price_rule` ASC, to id_specific_price_rule` DESC, 2 Link to comment Share on other sites More sharing options...
egohermansyah Posted May 4, 2015 Share Posted May 4, 2015 (edited) Hi, I resolved my issue.. i done small change in classes/SpecificPrice.php Search Function public static function getSpecificPrice and in this function i changed query from id_specific_price_rule` ASC, to id_specific_price_rule` DESC, Thank's kamalpreet, i'll try your suggest Edited May 4, 2015 by egohermansyah (see edit history) Link to comment Share on other sites More sharing options...
kamalpreet Posted May 4, 2015 Author Share Posted May 4, 2015 Thank's dude, i'll try your suggest Really?? Dude?????? I m not dude... Link to comment Share on other sites More sharing options...
joseantgv Posted May 21, 2015 Share Posted May 21, 2015 Hi, I resolved my issue.. i done small change in classes/SpecificPrice.php Search Function public static function getSpecificPrice and in this function i changed query from id_specific_price_rule` ASC, to id_specific_price_rule` DESC, Works perfect! Link to comment Share on other sites More sharing options...
fzappa Posted July 4, 2015 Share Posted July 4, 2015 #6 above solution works only if you want the latest entry in the table. Modified order by to use the highest reduction amount for a product. Without getting into to much complication 1- order by percentage then amount 2 - order by reduction descending Otherwise you would have to determine if the amount reduction is greater than any percentage reduction. With the new order by: You can set a manufacture to 20% off and women's clothes to 25% off. The 25% will always win out to a 20%. In public static function getSpecificPrice of SpecificPrice class $query .= ' ORDER BY `reduction_type` DESC, `reduction` DESC, `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC'; 1 Link to comment Share on other sites More sharing options...
fzappa Posted July 4, 2015 Share Posted July 4, 2015 This is override used: <?phpclass SpecificPrice extends SpecificPriceCore { public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0) { if (!SpecificPrice::isFeatureActive()) { return array(); } /* * * The date is not taken into account for the cache, but this is for the better because it keeps the consistency for the whole script. * * The price must not change between the top and the bottom of the page */ $key = ((int)$id_product . '-' . (int)$id_shop . '-' . (int)$id_currency . '-' . (int)$id_country . '-' . (int)$id_group . '-' . (int)$quantity . '-' . (int)$id_product_attribute . '-' . (int)$id_cart . '-' . (int)$id_customer . '-' . (int)$real_quantity); if (!array_key_exists($key, SpecificPrice::$_specificPriceCache)) { $now = date('Y-m-d H:i:s'); $query = ' SELECT *, ' . SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer) . ' FROM `' . _DB_PREFIX_ . 'specific_price` WHERE `id_product` IN (0, ' . (int)$id_product . ') AND `id_product_attribute` IN (0, ' . (int)$id_product_attribute . ') AND `id_shop` IN (0, ' . (int)$id_shop . ') AND `id_currency` IN (0, ' . (int)$id_currency . ') AND `id_country` IN (0, ' . (int)$id_country . ') AND `id_group` IN (0, ' . (int)$id_group . ') AND `id_customer` IN (0, ' . (int)$id_customer . ') AND ( (`from` = \'0000-00-00 00:00:00\' OR \'' . $now . '\' >= `from`) AND (`to` = \'0000-00-00 00:00:00\' OR \'' . $now . '\' <= `to`) ) AND id_cart IN (0, ' . (int)$id_cart . ') '; if ($real_quantity != 0 && !Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION')) { $query .= ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= IF(id_product_attribute=0,' . (int)$quantity . ' ,' . (int)$real_quantity . ')'; } else { $qty_to_use = $id_cart ? (int)$quantity : (int)$real_quantity; $query .= 'AND `from_quantity` <= ' . max(1, $qty_to_use); } /* order by reduction_type and reduction */ $query .= ' ORDER BY `reduction_type` DESC, `reduction` DESC, `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC'; SpecificPrice::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); } return SpecificPrice::$_specificPriceCache[$key]; }} 1 Link to comment Share on other sites More sharing options...
duredo Posted August 30, 2016 Share Posted August 30, 2016 #6 above solution works only if you want the latest entry in the table. Modified order by to use the highest reduction amount for a product. Without getting into to much complication 1- order by percentage then amount 2 - order by reduction descending Otherwise you would have to determine if the amount reduction is greater than any percentage reduction. With the new order by: You can set a manufacture to 20% off and women's clothes to 25% off. The 25% will always win out to a 20%. In public static function getSpecificPrice of SpecificPrice class $query .= ' ORDER BY `reduction_type` DESC, `reduction` DESC, `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC'; thanks, works great on PS 1.6.1.6 Link to comment Share on other sites More sharing options...
karmaedv Posted May 11, 2017 Share Posted May 11, 2017 (edited) Hi, I needed to change the default behavior as well. I wanted the catalog pricing rules to be indipendent from the position in the list. Also, I wanted to have a consistent behavior and apply always and only the highest discount for one particular product, indipendent of user group membership, or pricing rule on single article. The highest discount has to be found, indipendently of the fact if it is a % or an amount. When a discount is set as amount its relative size must be calculated according to the price of the product. Only then the query result can be sorted correctly. The override from fzappa does not account for this. MY SOLUTION (PS 1.6.11) I achieved this by eliminating all rebates set directly on the groups. From now on all group rebates will be done thorugh the "Catalog Rules". Also, I had to override the class SpecificPrice. Put the following code in a file called SpecificPrice.php under the folder overrides/classes <?php /* * 2007-2016 PrestaShop * DISCLAIMER * Distributed "As is". No liability taken for any malfunction of your system. * * NOTICE OF LICENSE * Freely use and distribute, just keep the author mention and the link to the original forum post. * https://www.prestashop.com/forums/topic/438626-set-priority-on-product-discount/ * * @author KarmaEDV IT Solutions <[email protected]> */ class SpecificPrice extends SpecificPriceCore { private static function formatIntInQuery($first_value, $second_value) { $first_value = (int)$first_value; $second_value = (int)$second_value; if ($first_value != $second_value) { return 'IN ('.$first_value.', '.$second_value.')'; } else { return ' = '.$first_value; } } public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0) { if (!SpecificPrice::isFeatureActive()) { return array(); } /* ** The date is not taken into account for the cache, but this is for the better because it keeps the consistency for the whole script. ** The price must not change between the top and the bottom of the page */ $key = ((int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.(int)$id_group.'-'.(int)$quantity.'-'.(int)$id_product_attribute.'-'.(int)$id_cart.'-'.(int)$id_customer.'-'.(int)$real_quantity); if (!array_key_exists($key, SpecificPrice::$_specificPriceCache)) { $price_query = ' SELECT price FROM `'._DB_PREFIX_.'product` WHERE `id_product` = ' .$id_product; $price_orig = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($price_query); $query_extra = self::computeExtraConditions($id_product, $id_product_attribute, $id_customer, $id_cart); $query = ' SELECT *, '.SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer).' FROM `'._DB_PREFIX_.'specific_price` WHERE `id_shop` '.self::formatIntInQuery(0, $id_shop).' AND `id_currency` '.self::formatIntInQuery(0, $id_currency).' AND `id_country` '.self::formatIntInQuery(0, $id_country).' AND `id_group` '.self::formatIntInQuery(0, $id_group).' '.$query_extra.' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= '; $query .= (Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION') || !$id_cart || !$real_quantity) ? (int)$quantity : max(1, (int)$real_quantity); $query .= " ORDER BY CASE WHEN reduction_type = 'amount' THEN (reduction / ".$price_orig.") ELSE reduction END DESC"; SpecificPrice::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); } return SpecificPrice::$_specificPriceCache[$key]; } } Don't forget to delete class_index.php in the cache folder so the the override can be picked up. Edited August 5, 2017 by karmaedv (see edit history) 3 1 Link to comment Share on other sites More sharing options...
CJV Posted August 8, 2018 Share Posted August 8, 2018 En 11/5/2017 a las 6:22 PM, karmaedv dijo: Hi, I needed to change the default behavior as well. I wanted the catalog pricing rules to be indipendent from the position in the list. Also, I wanted to have a consistent behavior and apply always and only the highest discount for one particular product, indipendent of user group membership, or pricing rule on single article. The highest discount has to be found, indipendently of the fact if it is a % or an amount. When a discount is set as amount its relative size must be calculated according to the price of the product. Only then the query result can be sorted correctly. The override from fzappa does not account for this. MY SOLUTION (PS 1.6.11) I achieved this by eliminating all rebates set directly on the groups. From now on all group rebates will be done thorugh the "Catalog Rules". Also, I had to override the class SpecificPrice. Put the following code in a file called SpecificPrice.php under the folder overrides/classes <?php /* * 2007-2016 PrestaShop * DISCLAIMER * Distributed "As is". No liability taken for any malfunction of your system. * * NOTICE OF LICENSE * Freely use and distribute, just keep the author mention and the link to the original forum post. * https://www.prestashop.com/forums/topic/438626-set-priority-on-product-discount/ * * @author KarmaEDV IT Solutions <[email protected]> */ class SpecificPrice extends SpecificPriceCore { private static function formatIntInQuery($first_value, $second_value) { $first_value = (int)$first_value; $second_value = (int)$second_value; if ($first_value != $second_value) { return 'IN ('.$first_value.', '.$second_value.')'; } else { return ' = '.$first_value; } } public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0) { if (!SpecificPrice::isFeatureActive()) { return array(); } /* ** The date is not taken into account for the cache, but this is for the better because it keeps the consistency for the whole script. ** The price must not change between the top and the bottom of the page */ $key = ((int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.(int)$id_group.'-'.(int)$quantity.'-'.(int)$id_product_attribute.'-'.(int)$id_cart.'-'.(int)$id_customer.'-'.(int)$real_quantity); if (!array_key_exists($key, SpecificPrice::$_specificPriceCache)) { $price_query = ' SELECT price FROM `'._DB_PREFIX_.'product` WHERE `id_product` = ' .$id_product; $price_orig = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($price_query); $query_extra = self::computeExtraConditions($id_product, $id_product_attribute, $id_customer, $id_cart); $query = ' SELECT *, '.SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer).' FROM `'._DB_PREFIX_.'specific_price` WHERE `id_shop` '.self::formatIntInQuery(0, $id_shop).' AND `id_currency` '.self::formatIntInQuery(0, $id_currency).' AND `id_country` '.self::formatIntInQuery(0, $id_country).' AND `id_group` '.self::formatIntInQuery(0, $id_group).' '.$query_extra.' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= '; $query .= (Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION') || !$id_cart || !$real_quantity) ? (int)$quantity : max(1, (int)$real_quantity); $query .= " ORDER BY CASE WHEN reduction_type = 'amount' THEN (reduction / ".$price_orig.") ELSE reduction END DESC"; SpecificPrice::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); } return SpecificPrice::$_specificPriceCache[$key]; } } Don't forget to delete class_index.php in the cache folder so the the override can be picked up. Please modify this override in order to work on prestashop 1.7 Thanks in advance. Link to comment Share on other sites More sharing options...
Naturel Deluxe Posted August 23, 2018 Share Posted August 23, 2018 A working solution for prestashop 1.7.4.2 would be super!! I added the solution from kamalpreet, this is working. But for the customer it is still strange to get a price wich is not combining 2 catalog pricerules. (Product A = retail price € 100, specific price rule sets a discount of € 10, so selling price = € 90, where I would like to give a extra discount on it with a amount off 15% on € 90 = € 13.5. Result should be € 76.5.) For now I did applied (based on the above solution) discount from 25 % but this in not always right offcourse ... Link to comment Share on other sites More sharing options...
Guest Posted August 27, 2018 Share Posted August 27, 2018 Maybe copy the Discount.php file? I noticed it was some kind of a drop-in replacement for modern discount stuff. Link to comment Share on other sites More sharing options...
nima1024 Posted July 8, 2021 Share Posted July 8, 2021 On 5/11/2017 at 8:52 PM, karmaedv said: Hi, I needed to change the default behavior as well. I wanted the catalog pricing rules to be indipendent from the position in the list. Also, I wanted to have a consistent behavior and apply always and only the highest discount for one particular product, indipendent of user group membership, or pricing rule on single article. The highest discount has to be found, indipendently of the fact if it is a % or an amount. When a discount is set as amount its relative size must be calculated according to the price of the product. Only then the query result can be sorted correctly. The override from fzappa does not account for this. MY SOLUTION (PS 1.6.11) I achieved this by eliminating all rebates set directly on the groups. From now on all group rebates will be done thorugh the "Catalog Rules". Also, I had to override the class SpecificPrice. Put the following code in a file called SpecificPrice.php under the folder overrides/classes <?php /* * 2007-2016 PrestaShop * DISCLAIMER * Distributed "As is". No liability taken for any malfunction of your system. * * NOTICE OF LICENSE * Freely use and distribute, just keep the author mention and the link to the original forum post. * https://www.prestashop.com/forums/topic/438626-set-priority-on-product-discount/ * * @author KarmaEDV IT Solutions <[email protected]> */ class SpecificPrice extends SpecificPriceCore { private static function formatIntInQuery($first_value, $second_value) { $first_value = (int)$first_value; $second_value = (int)$second_value; if ($first_value != $second_value) { return 'IN ('.$first_value.', '.$second_value.')'; } else { return ' = '.$first_value; } } public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0) { if (!SpecificPrice::isFeatureActive()) { return array(); } /* ** The date is not taken into account for the cache, but this is for the better because it keeps the consistency for the whole script. ** The price must not change between the top and the bottom of the page */ $key = ((int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.(int)$id_group.'-'.(int)$quantity.'-'.(int)$id_product_attribute.'-'.(int)$id_cart.'-'.(int)$id_customer.'-'.(int)$real_quantity); if (!array_key_exists($key, SpecificPrice::$_specificPriceCache)) { $price_query = ' SELECT price FROM `'._DB_PREFIX_.'product` WHERE `id_product` = ' .$id_product; $price_orig = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($price_query); $query_extra = self::computeExtraConditions($id_product, $id_product_attribute, $id_customer, $id_cart); $query = ' SELECT *, '.SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer).' FROM `'._DB_PREFIX_.'specific_price` WHERE `id_shop` '.self::formatIntInQuery(0, $id_shop).' AND `id_currency` '.self::formatIntInQuery(0, $id_currency).' AND `id_country` '.self::formatIntInQuery(0, $id_country).' AND `id_group` '.self::formatIntInQuery(0, $id_group).' '.$query_extra.' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= '; $query .= (Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION') || !$id_cart || !$real_quantity) ? (int)$quantity : max(1, (int)$real_quantity); $query .= " ORDER BY CASE WHEN reduction_type = 'amount' THEN (reduction / ".$price_orig.") ELSE reduction END DESC"; SpecificPrice::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); } return SpecificPrice::$_specificPriceCache[$key]; } } Don't forget to delete class_index.php in the cache folder so the the override can be picked up. Hello, I wanted to bump this topic cause I do really need this override for 1.7.x (1.7.6.8 exact version I use), it's a very useful feature for many stores. Regards, Link to comment Share on other sites More sharing options...
madpugger Posted September 10, 2021 Share Posted September 10, 2021 I am looking for the same solution for 1.7.7.x Link to comment Share on other sites More sharing options...
Diwad Posted May 6, 2022 Share Posted May 6, 2022 Anyone have it working for 1.7? I can pay Link to comment Share on other sites More sharing options...
duredo Posted May 6, 2022 Share Posted May 6, 2022 I use this override for 1.7.7.1 create file in /override/classes/SpesificPrice.php <?php class SpecificPrice extends SpecificPriceCore { public static function getSpecificPrice( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0 ) { if (!SpecificPrice::isFeatureActive()) { return []; } if (!self::couldHaveSpecificPrice($id_product)) { return []; } if (static::$psQtyDiscountOnCombination === null) { static::$psQtyDiscountOnCombination = Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION'); $key = null; } else { $key = self::computeKey( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute, $id_customer, $id_cart, $real_quantity ); } if (!array_key_exists($key, self::$_specificPriceCache)) { $query_extra = self::computeExtraConditions($id_product, $id_product_attribute, $id_customer, $id_cart); if ($key === null) { $key = self::computeKey( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute, $id_customer, $id_cart, $real_quantity ); } $query = ' SELECT *, ' . SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer) . ' FROM `' . _DB_PREFIX_ . 'specific_price` WHERE `id_shop` ' . self::formatIntInQuery(0, $id_shop) . ' AND `id_currency` ' . self::formatIntInQuery(0, $id_currency) . ' AND `id_country` ' . self::formatIntInQuery(0, $id_country) . ' AND `id_group` ' . self::formatIntInQuery(0, $id_group) . ' ' . $query_extra . ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= '; $query .= (static::$psQtyDiscountOnCombination || !$id_cart || !$real_quantity) ? (int) $quantity : max(1, (int) $real_quantity); $query .= ' ORDER BY `reduction_type` DESC, `reduction` DESC, `id_product_attribute` DESC, `id_cart` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC, `to` DESC, `from` DESC'; self::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); } return self::$_specificPriceCache[$key]; } } Link to comment Share on other sites More sharing options...
Diwad Posted May 7, 2022 Share Posted May 7, 2022 5 hours ago, duredo said: I use this override for 1.7.7.1 create file in /override/classes/SpesificPrice.php <?php class SpecificPrice extends SpecificPriceCore { public static function getSpecificPrice( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0 ) { if (!SpecificPrice::isFeatureActive()) { return []; } if (!self::couldHaveSpecificPrice($id_product)) { return []; } if (static::$psQtyDiscountOnCombination === null) { static::$psQtyDiscountOnCombination = Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION'); $key = null; } else { $key = self::computeKey( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute, $id_customer, $id_cart, $real_quantity ); } if (!array_key_exists($key, self::$_specificPriceCache)) { $query_extra = self::computeExtraConditions($id_product, $id_product_attribute, $id_customer, $id_cart); if ($key === null) { $key = self::computeKey( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute, $id_customer, $id_cart, $real_quantity ); } $query = ' SELECT *, ' . SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer) . ' FROM `' . _DB_PREFIX_ . 'specific_price` WHERE `id_shop` ' . self::formatIntInQuery(0, $id_shop) . ' AND `id_currency` ' . self::formatIntInQuery(0, $id_currency) . ' AND `id_country` ' . self::formatIntInQuery(0, $id_country) . ' AND `id_group` ' . self::formatIntInQuery(0, $id_group) . ' ' . $query_extra . ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= '; $query .= (static::$psQtyDiscountOnCombination || !$id_cart || !$real_quantity) ? (int) $quantity : max(1, (int) $real_quantity); $query .= ' ORDER BY `reduction_type` DESC, `reduction` DESC, `id_product_attribute` DESC, `id_cart` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC, `to` DESC, `from` DESC'; self::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); } return self::$_specificPriceCache[$key]; } } Does it work with catalog price rules? Link to comment Share on other sites More sharing options...
duredo Posted May 7, 2022 Share Posted May 7, 2022 6 hours ago, Diwad said: Does it work with catalog price rules? Yup, working fine Link to comment Share on other sites More sharing options...
Diwad Posted May 7, 2022 Share Posted May 7, 2022 12 hours ago, duredo said: If it will add catalog price rules on top of specific prices then you can count on donation from me Link to comment Share on other sites More sharing options...
duredo Posted May 7, 2022 Share Posted May 7, 2022 @Diwad does my post works for you? Don't forget to delete the prod folder /var/cache/prod after create/edit override file. Link to comment Share on other sites More sharing options...
Diwad Posted May 7, 2022 Share Posted May 7, 2022 I didn't try yet. Will be able to do it in few hours. But i don't see any code related to catalog price rules here so my hopes are not high Link to comment Share on other sites More sharing options...
Diwad Posted May 11, 2022 Share Posted May 11, 2022 (edited) I have tested it and it is not reducing specific price, but the base price of the products. Edited May 11, 2022 by Diwad (see edit history) Link to comment Share on other sites More sharing options...
duredo Posted May 12, 2022 Share Posted May 12, 2022 @Diwad the code is works like this topic said, set priority on product discount. if it doesn't meet your need maybe you should create new topic. Link to comment Share on other sites More sharing options...
karmaedv Posted May 1, 2023 Share Posted May 1, 2023 (edited) Hi, I am a little surprised that so many requested this very simple change for PS1.7. If you wish to tip me in crypto, you can: BTC bc1q27vkxgcwg3ryswc6p6kavdlp97zhegq6se9s5r ETH 0xB9Ce62394f3406d7F86B240212daCBbd4d452329 I Refreshed the override for PS 1.7.8.9, enjoy: Preparation if you have discounts defined on customer groups directly Remove any discount that you have applied to "customer groups" Recreate any of these deleted customer group discounts as "Catalog Price Rule". This is how you have to manage discounts for groups from now on. Instructions Download and add the attached code file Scan it with an Antivirus of your choice Unzip it locally onto your computer Upload it to your Prestashop installation in the folder override/classes with an FTP Client like Filezilla or with your Webserver cPanel Delete your cache (Backoffice > Advanced Parameters > Performance > Clear Cache) or delete manually the files under var/cache/prod Note The code is also available as github gist SpecificPrice.zip Edited May 1, 2023 by karmaedv Added github gist note (see edit history) Link to comment Share on other sites More sharing options...
madpugger Posted January 31 Share Posted January 31 On 5/7/2022 at 1:21 PM, Diwad said: On 5/7/2022 at 12:28 AM, duredo said: If it will add catalog price rules on top of specific prices then you can count on donation from me You are using the wrong feature for this. In user groups, you can add a discount. This is then ADDED to the product price, so if the product is £100 with 10% specific (or catalogue) discount to £90, and you put a 10% discount for that customer group (in the group settings page), it will take 10% from the £90, i.e. £81. 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