Jump to content
thirty bees forum
  • 0

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


Question

Posted (edited)

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

11 answers to this question

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

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!

  • 0
Posted

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

 

  • Like 1
  • 0
Posted
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. 

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