Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
30knees

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

Question

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

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0

I can't reproduce this issue. Could you please provide some screenshots, both from the admin and frontend?

Note that this might be theme issue

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

I've re-tested with your numbers and it works fine for me.

image.png.f4df990facbbfd94ddfd3ffd747b8dba.png

I guess this is either theme issue, or you are using old thirtybees version.

 

Share this post


Link to post
Share on other sites
  • 0

Thank you, datakick.

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

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

Try to upload js/product.js from community or niara theme to panda to see if it fixes the problem. 

Back up the original file, of course

Share this post


Link to post
Share on other sites
  • 0

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!

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0
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. 

Share this post


Link to post
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...