4

We're implementing tier prices in our webshop. We have a simple product with one customizable option 'flavor'. This dropdown has two options: strawberry and banana.

We've added tier prices for this product if you buy 3 or more the price will be € 12,50 instead of € 15,-.

Now, when a customer adds 2 strawberry and 1 banana, the tier price is not applied. It's the same product, so why are we're facing this issue? Is there a known fix or workaround for this issue?

Update:

Special Price settings: https://www.dropbox.com/s/24c2r62j88ow2lf/Schermafbeelding%202017-11-07%20om%2012.35.40.png?dl=0

Customizable option: https://www.dropbox.com/s/gbkf1pcnptfapzz/Schermafbeelding%202017-11-07%20om%2012.36.08.png?dl=0

  • add your tier price configuration screen-sort in question for better understanding. – Dhiren Vasoya Nov 7 '17 at 11:32
0
+100

It is not the same product. In Magento 2 there are different types of products:

  1. Simple
  2. Configurable
  3. Bundle
  4. Virtual
  5. Grouped
  6. Downloadable
  7. Gift

Your case is connected with Simple and Configurable products. Let me elaborate why your assumption "it is the same product" is wrong.

Basic product in Magento is a Simple Product. This is real entity which can be treat separately from any other products and can have, among the others, private tier prices.

On the other hand we have got configurable products. This is nothing like a simple product. You can't, for example, buy configurable product itself, actually, you always but simple product with a particular variation of attributes like: color - red, size - XL; color - red, size - L.. and so on.

Configurable product can have its own general attributes like description but the essence is that you have to connect at least one simple product with some variation of attributes to make configurable product available and finally you always put into a cart item related to this particular simple product with chosen attributes variation.

Therefore, as you maybe have noticed, there is no advanced price tab in configurable product settings! Even More, if you put in a cart 2 yellow products and 1 red you cannot say that you have 3 examples of the same item, you have 2 items related to simple product A (yellow) and 1 item related to simple product B (red).

Your assumption that you have 3 same items is wrong and therefore expectations fail. Those items are in relation to configurable product but are distinct. And it is not an issue regarding the logic. It can be issue with regards to your expectations.

As a solution I recommend to create custom select attribute rather than custom option and cart rule which say: if in cart there are 3 >= products with attribute then add discount for these items

If anything is unclear please ask, I will try to elaborate it in more details.

Update

To be more strict - tier price (as all prices) are item based not product based. It means that price apply to an item in a cart not a product which is a generic type. So even though you have the same product in cart (all data are related to the same entity_id) you have distinct items in cart. That is why i suggest to use cart price rules. It is the only way to achieve your goal without customizing code.

If you want to customize the code I would override Catalog\Pricing\Price\TierPrice class, maybe canApplyTierPrice method

  • I would understand this if I was using a configurable product, but this is not the case. I'm using a simple product with 'customizable options'. This is not the same as a configurable product. – Silvan Nov 14 '17 at 17:09
  • I misunderstand you but the answer is almost the same. If you use custom options instead of an attribute (why would you do that? it is not the purpose of custom options, you should do that with attribute) and add product A with option X qty 2, and same product with option Y with qty 1 then you have two items in a quote. Even in cart those items are displayed as separate entities. Tier price works for items that are exactly the same. If one has option X an the other option Y then these items are distinct. So instead of tierprice you can use cart price rules as i described. – Bartosz Herba Nov 14 '17 at 17:18
  • Thank you for this explanation, I understand the problem now. Working with price rules would fix this, but this does not show the 'Tier price'-block on the frontend. Is there a way to make tier prices wrok with custom options? – Silvan Nov 15 '17 at 9:41
  • Unfortunately not without some amount of customization. At least not how you wish them to work. – Bartosz Herba Nov 15 '17 at 10:13
  • So where is my donut? – Bartosz Herba Nov 19 '17 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.