Jump to content

Recommended Posts

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

 

 

 

 

post-709308-0-68818400-1429789209_thumb.png

 

 

post-709308-0-50562400-1429789193_thumb.png

Link to comment
Share on other sites

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,

  • Like 2
Link to comment
Share on other sites

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 by egohermansyah (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

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

  • 1 month later...

#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';
 

  • Like 1
Link to comment
Share on other sites

This is override used:

 

<?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 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];
    }

}
 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

#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

  • 8 months later...

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.
*
* @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 by karmaedv (see edit history)
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
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.
*
* @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

  • 3 weeks later...

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

  • 2 years later...
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.
*
* @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

  • 2 months later...
  • 7 months later...

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

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

  • 11 months later...

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

  1. Remove any discount that you have applied to "customer groups"
  2. 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

  1. Download and add the attached code file
  2. Scan it with an Antivirus of your choice :D
  3. Unzip it locally onto your computer
  4. Upload it to your Prestashop installation in the folder override/classes with an FTP Client like Filezilla or with your Webserver cPanel
  5. 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 by karmaedv
Added github gist note (see edit history)
Link to comment
Share on other sites

  • 8 months later...
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 :D

 

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

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