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
- This topic has 3 replies, 2 voices, and was last updated 3 years, 4 months ago by Artem Temos.
-
AuthorPosts
-
August 4, 2021 at 4:30 pm #310658
S.G.ParticipantWhen 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-bMwWjBXEUmTo 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,
ShiraAugust 5, 2021 at 7:24 am #310773
Artem TemosKeymasterHello,
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
August 6, 2021 at 10:43 am #311079
S.G.ParticipantHi 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,
ShiraAugust 6, 2021 at 12:44 pm #311117
Artem TemosKeymasterYou can find and customize the code for this functionality in the file
woodmart/js/scripts/wc/miniCartQuantity.js
-
AuthorPosts
- You must be logged in to create new topics. Login / Register