Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Panda theme: Volume discounts for combinations shown excluding taxes instead of with taxes

Featured Replies

Update: This is a Panda theme issue.

Problem:

I have a product with a combination. The price for 1x is 10 incl. taxes. This is displayed correctly.

Starting at 5x the price is set as 9 incl. taxes. It should show 9 incl. taxes (which would be 8 excl. taxes). However, it shows 8 excl. taxes.

It's misleading for customers, understandably. 

Edited by 30knees
Update

  • Author

Thank you for helping out.

Admin specific price:

image.thumb.png.1c5dbb7f3fa4b11bcbbe3d0800d2e2cb.png

Combination standard price:

image.png.4dd16cb4aebed5ef76b8acf1a31a22f2.png

Frontend price standard:

image.png.d8d13a9826cbc2278b7819d36dfba585.png

Front end price with volume discount 2x:

image.png.d76c87bfccc635ec2639d9c731719bb1.png

Shopping cart price for volume discount 2x (this is your Chex module):

image.png.a834b2b68ff7a8ca7f1b013dedc0855a.png

17.02 / 2 is 8.51, which is the displayed volume price above plus tax.

  • Author

Thank you, datakick.

I'm using the Panda theme. @JonnyAre you aware of any issues as described above? I have version 1.5.5.

  • Author

Yes, it is the theme. I tested with the community template and it works perfectly fine there. 

  • Author

Unfortunately, it didn't work. It also prevented the product photo from displaying when I did that. I used the community theme to do so. Thank you for the tip, though!

This is indeed bug in product.js file, function updateDiscountTable. Change it from:

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));
		// $(this).attr('data-real-discount-value', formatCurrency(discountedPrice * currencyRate, currencyFormat, currencySign, currencyBlank));
	});
}

to

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).children('td').eq(1).text(formatCurrency(discountedPrice, currencyFormat, currencySign, currencyBlank));
		}
		$(this).attr('data-real-discount-value', formatCurrency(discountedPrice, currencyFormat, currencySign, currencyBlank));
		$(this).children('td').eq(2).text(upToTxt + ' ' + formatCurrency(discountUpTo, currencyFormat, currencySign, currencyBlank));
	});
}

 

In community theme / niara this was fixed by commit https://github.com/thirtybees/niara/commit/e70102d1816aa1af03c2d8ff2b9d446146aa3ff9

 

  • Author
16 hours ago, haylau said:

Have you reported this directly on the sunnytoo forum?

They changed their login method and I'm waiting for access. I may need to send a follow-up if I don't hear back by end of next week. 

  • Author
2 hours ago, datakick said:

This is indeed bug in product.js file, function updateDiscountTable.

(SNIP)

Change it from:In community theme / niara this was fixed by commit https://github.com/thirtybees/niara/commit/e70102d1816aa1af03c2d8ff2b9d446146aa3ff9

 

Thank you so much, that's so nice of you to check! Thank you so much. 🙂

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.