Skip to content

Support for tier prices #284

@luukfiets

Description

@luukfiets

Hi @jissereitsma,

We have a client that's using the standard Magento 2 tier price feature. The price for quantity < 10 is 13 euro per item. The second tier is ordering more than 10 items, which gives you a price of 3 euro. The third tier is ordering more than 20 items, which gives you a price of 2 euro. Starting with an empty cart, we don't see any issues adding the first product with a quantity of 10. In this case the add to cart event (triggered after the page reloads) correctly shows an item price of 3. If we then do exactly the same again (add the same variant with the same quantity of 10 to the cart), the second add to cart event has an incorrect item price as it outputs the standard price and not the tier price. Also, the value on the second event is incorrect (as it's probably based on the item price).

This is the first add to cart event with the correct price:
Image

The is the second add to cart event with an incorrect item level price, even though the same variant & quantity as before was added to the cart. In addition to that, the value in the "value" property is now incorrect too.
Image

Do you happen to have any idea why this is? I'm not a developer myself, so unfortunately I'm not able to test it on a clean Magento installation. If you would be able to do this we can verify if it has something to do with our clients' website or with the Yireo module.

Some more details
If the second add to cart contains another variant that's also part of a tier, the item price is correct again. So it seems that it is specifically related to adding the product variant to the cart again as only that causes the issue to appear. As a third add to cart I added another variant (different length of the product) to the cart and this shows the correct item price for this tier (11 euro for ordering more than 10 pieces).

Image

If I would then add this variant to the cart again (with quantity 10), the issue appears again.

Edit: the issue does not appear when adding a simple product to the cart twice (while using an amount/quantity that falls in a tier price).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions