Home Forums WoodMart support forum Updating product quantity in mini-basket doesn't update other product prices

Updating product quantity in mini-basket doesn't update other product prices

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #310658

    S.G.
    Participant

    When the quantity of a product is updated in the mini-basket, only the price of that product is updated and any other products are left unchanged. This causes problems when discounts are applied across products (e.g. Buy X get Y half price).

    We use a plugin that allows us to offer bundles. They’ve investigated whether they can help from their side, but concluded that the issue was with the mini-basket only updating the specific changed product rather than the whole basket.

    Pricing rule applied in the use-cases below: ‘Buy X get n% off Y’; the discount can be applied multiple times if the conditions are met.
    The problem: Updating quantities of Product X doesn’t trigger a recalculation of the price of Product Y. The price is only updated once the page is refreshed.

    See links to examples of product X and Y below (private content):
    We have a screen recording showing the two use-cases below: https://we.tl/t-bMwWjBXEUm

    To replicate:
    Use-case 1a:
    1. Add 1x ‘Product X’ and 2x ‘Product Y’ (discounted product) to the basket.
    2. Open the mini-basket and observe that the discount is applied to one of the two Y products (correctly)
    3. In the mini-basket, increase the quantity of Product X
    4. Observe the price of product X doubling (correctly)
    5. Expected: the price of product Y should also update to apply the discount to both Y products.
    Observed: the price of product Y doesn’t update. The discount is still only applied to one product
    5. Refresh the page and open the mini-basket
    6. Observe that the discount is now correctly applied to both Y products (as expected)

    Use-case 1b:
    Similarly, if you then reduce the quantity of Product X back to 1, the discount isn’t removed from one of the 2 discounted products.

    Can you please help us fix this so that when a product is changed in the mini-basket, the prices of all other products are updated too?

    Thanks,
    Shira

    #310773

    Artem Temos
    Keymaster

    Hello,

    That is how our quantity AJAX update function is developed. It reloads one single product only and not the whole widget. Sorry, but we can’t change this behaviour without additional code customization.

    Kind Regards

    #311079

    S.G.
    Participant

    Hi Artem,

    I understand. Could you perhaps help us understand what customisation we need to do where? Any information that I can share with the developer would be greatly appreciated.

    Thanks,
    Shira

    #311117

    Artem Temos
    Keymaster

    You can find and customize the code for this functionality in the file woodmart/js/scripts/wc/miniCartQuantity.js

Viewing 4 posts - 1 through 4 (of 4 total)