Jump to content
thirty bees forum
  • 0

Product price does not shown in case of quantity discount at TH 1.0.6



Hi there,

In case of quantity discount (like 10% discount in case of purchasing more than 5 pieces), the discount price does not shown on the product page. You can see the regular price, but after reaching the discount quantity (like 5 pieces) the product price disappears. Could somebody re-produce or confirm?


Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 0

I noticed the same problem some time ago. For me it only happens with percentage quantity discounts from catalog price rules.

For some reason the solution is to set the 'tax include' when creating the percentage price rule. (there was a log error hinting something about tax).

Link to comment
Share on other sites

  • 0

i think @vsn have a problem with theme or shop-setting, i can not see price, if i change the quantity

and i tested now with 2 catalog price rules for categories - one price rule ok - second (or more) dont works - or my panda theme have also a problem with 2 rules, but i can see price (very bad prices with variants) if i change quantity ....

1. standard 0_1537910323411_16913545-f6ac-488f-b582-a9f1fee1248f-image.png

2. standard 100g - 2 items 0_1537910373662_380314a8-f1cb-46dd-91f9-2769fec6c77b-image.png

3. 2 items 100g and klick on 150g - no price change 0_1537910473002_45d3afae-38cf-48a6-974a-cb2d0cceba88-image.png

4. 2 items 100g and klick on 200g - no price change 0_1537910629849_6e94b0cc-0975-482b-b352-5731035e75c1-image.png

5. standard 1 item 200g - price ok 0_1537910688428_f137bbfa-26fc-429f-a3a0-de075eccf3ad-image.png

6. standard 2 item 200g - price from 100g 0_1537910741180_be061316-a5a9-49b6-b161-83f8c4e240f2-image.png

7. standard 4 item 100g - price ok 0_1537910853345_3e8a84f7-33b0-42e0-b39d-ecb41cc0a7ec-image.png

im not sure if it is a theme problem or a system bug - at the moment i have no testshop to secondary tests

Link to comment
Share on other sites

  • 0

my product.tpl - product.js is solved

i changed product.js - I have replaced the complete function function updateDiscountTable(newPrice) from default theme

``` function updateDiscountTable(newPrice) { $('#quantityDiscount').find('tbody tr').each(function() { var type = $(this).data('discount-type'); var discount = $(this).data('discount'); var quantity = $(this).data('discount-quantity'); var discountedPrice; var discountUpTo;

if (type === 'percentage') {
  discountedPrice = newPrice * (1 - discount / 100);
  discountUpTo = newPrice * (discount / 100) * quantity;
} else if (type === 'amount') {
  discountedPrice = newPrice - discount;
  discountUpTo = discount * quantity;

if (displayDiscountPrice != 0 && discountedPrice != 0) {
  $(this).attr('data-real-discount-value', formatCurrency(discountedPrice * currencyRate, currencyFormat, currencySign, currencyBlank));
  $(this).children('td').eq(1).text(formatCurrency(discountedPrice * currencyRate, currencyFormat, currencySign, currencyBlank));
$(this).children('td').eq(2).text(upToTxt + ' ' + formatCurrency(discountUpTo * currencyRate, currencyFormat, currencySign, currencyBlank));

}); }```

Link to comment
Share on other sites

  • 0

@colorful-ant I came to the same conclusion and was confident your solution will work for me. But I got the following error:

Notice: Undefined index: realDiscountPrice in /var/www/vhosts/happypostcards.aix-cloud.de/httpdocs/PrestaShop/Happypostcards_Test_1709/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 1199

Notice: Trying to get property of non-object in /var/www/vhosts/happypostcards.aix-cloud.de/httpdocs/PrestaShop/Happypostcards_Test_1709/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 1199

Link to comment
Share on other sites

  • 0

i´m not sure - i changed product.tpl

first lines after {include file="$tpl_dir./errors.tpl"} {if $errors|@count == 0}

to this

{if !isset($priceDisplayPrecision)} {assign var='priceDisplayPrecision' value=2} {/if} {if !$priceDisplay || $priceDisplay == 2} {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, 6)} {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, 6)} {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} {/if}

before {assign var='product_tabs' value=Configuration::get('STSN_PRODUCT_TABS')} {assign var='show_brand_logo' value=Configuration::get('STSN_SHOW_BRAND_LOGO')} {assign var='discount_percentage' value=Configuration::get('STSN_DISCOUNT_PERCENTAGE')}

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