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.

oliiix

Wrong prices for products with a customer group discount and combination

Recommended Posts

So either I'm calculating something wrong (again), have it set up incorrectly, or there's a bug regarding price calculation in my shop when there's a combination with increased price and a customer group discount active.

Here's my product settings:

TAX: 13%

No-Tax Price: 33.619469
Retail price = retail price combination A: 37.99
Retail price combination B: 113.00
Setup Combination A: no price change
Setup Combination B: imp. on price: + 75.01 (tax incl) -> tb puts 66.380531 into tax excl. field, I think it should be 66.371681

>> How is now the price calculated for my merchant group which has a category-discount of 52.8%?

My calculation of what the prices should be (prices for this group are shown w/o taxes, rounded):
Comb A: 15.87 (33.619469/100×47.2)
Comb B: 47.2 (113/1.13)/100*47.2

What TB displays in store (prices w/o tax):
Comb A: 15.87 (same as I have)
Comb B: 82.25 (far too high?)
So Combination B price in store seems far to high. How is this price being calculated? Shouldn't TB's calculation be more like the result for (113/1.13)/100*47.2 = 47.2?

 

Thanks a lot for your help/advise 🙂

All the best,

Oli

Share this post


Link to post
Share on other sites

seems like the reduction is not applied to impact on price but still it's not the same amount at the end.. may I have a look on you setup in order to dig more where to fix that ?

  • Like 1

Share this post


Link to post
Share on other sites

I cannot really give you access to my store, so I installed a 1.1.0 shop from scratch and this problem seems to be persistent, the price for the second combination is wrong, about the same amount, so this is a bug now as it seems 😞

What I did:

- install fresh 1.1.0 TB
- remove all taxes and tax rules and set one up for all countries that has 13%
- add the product with it's two combinations to the coffee category
- create merchant customer group and put a discount on the coffee category with 52.80%.
- create a user and assign him to the merchant group

The prices are like in my previous post from my live shop:
Comb A: 15.87 (correct imo)
Comb B: 82.24 (wrong imo)

 

Creating a bug report now...

Edited by oliiix

Share this post


Link to post
Share on other sites
On 1/27/2021 at 11:33 AM, zen said:

seems like the reduction is not applied to impact on price but still it's not the same amount at the end.. may I have a look on you setup in order to dig more where to fix that ?

thank you very much btw, I normally don't forget that :'D thanks for your help!

  • Like 1

Share this post


Link to post
Share on other sites

Hello, I have the same problem with all combinations that have a price increase or reduction. The group discount ignores them. So after the group discount is set, some product combinations even are for free.

Please let me know when you found a solution.

Share this post


Link to post
Share on other sites
6 minutes ago, Batman said:

Nobody has an idea?

It's hard to tell, from your description it's not entirely clear what the problem is.

Please describe how we can simulate this problem, ideally on vanilla thirtybees installation. What product should we create (price, tax, etc), and how to set up other part of the system to reproduce the issue. 

Share this post


Link to post
Share on other sites

Hi Datakick, thanks for your reply. Here is how you can reproduce the problem:

1. Create a product with variants.

2. Put a different price for one variant. For example a reduction.

3. Create a new customer group and give it a group discount.

4. Now you can see that the group discount work on the basic product price. But the one variant with reduced price, will not be affected by the group discount.

An example:
You sell a brand of vine in your onlineshop. You sell it with 500cl and 300cl. The basic product price is 20EUR. The variant with 500cl has no changing price. The variant with 300cl has a reduced price of 5EUR. So in the frontend of your onlineshop customers can get 500cl for 20EUR and 300cl for 15EUR. Now you have a customer group for special customers that get 10% discount on everything. So one of these customers want to buy the vine. He gets the 500cl bottle for 18EUR. All good. But the 300ct will cost 13EUR instead of 13,50EUR. The price reduction of 5EUR will not be affected by the group discount. That's good for the customer but bad for you. And in this example it is only a reduced variant price of 5EUR. Imagine a reduced variant price of 10EUR and a group discount of 50%. At the end the customer will get the 300cl of vine for free instead of half price.

Share this post


Link to post
Share on other sites
On 2/15/2021 at 6:52 PM, datakick said:

It's hard to tell, from your description it's not entirely clear what the problem is.

Please describe how we can simulate this problem, ideally on vanilla thirtybees installation. What product should we create (price, tax, etc), and how to set up other part of the system to reproduce the issue. 

Had you time to test this problem? Do you have an idea how to solve it or maybe a smart work around?

Share this post


Link to post
Share on other sites

I have reproduced the problem.

Good news is that the issue is limited to display on product page only - if you add the product to cart the final price is calculated correctly. 

Bad news is that the fix will require theme(s) modification. I guess any theme derived from default theme is affected.

We will release fix for community and niara theme. If you use some third party theme, you will have to contact its developer and ask them to incorporate the fix as well. Or you can do it yourself, it won't probably be that complicated.

*Rant: we really have to extract these core price calculations from theme layer to core somehow.*

  • Like 2

Share this post


Link to post
Share on other sites

Ok, these are good news. Great! Unfortunatly I use the old prestashop default bootstrap theme. If you have a hint for me how to fix it there, I would be very grateful.

Share this post


Link to post
Share on other sites
17 hours ago, datakick said:

*Rant: we really have to extract these core price calculations from theme layer to core somehow.*

are there more such traps in themes? theme really shouldn't calculate anything, just take data from core and display it.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, cienislaw said:

are there more such traps in themes? theme really shouldn't calculate anything, just take data from core and display it.

Unfortunately yes, there are a lot of these gotchas.

I totally agree that themes shouldn't really do any business logic, but they do, due to historical reasons. This is especially true on product page, when there is a lot of javascript that deals with price, discounts, specific prices, quantity discounts, etc... 

What I plan to do is to implement theme independent javascript layer (managed by core) that theme developers could (and should) use. Theme will just listen to events, such as 'price changed', and react accordingly -- update relevant DOM nodes, etc. When user make some UI interaction, theme will simply fire event such as 'attributed changed' or 'quantity changed'. Core layer will recalculate the underlaying product model, and then fire events to let theme knows what changed. 

  • Like 1
  • Thanks 3

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