cart
cart copied to clipboard
When Using AJAX Mini cart doesn't update
When Using AJAX Mini cart doesn't update any idea to what i have to do to access the new cart object and render it in the mini cart?
Current Behavior when adding object to the cart per ajax, the minicart does not update
Expected behavior/output when adding object to the cart per ajax, the minicart should fetch the new {cart} per ajax as well
Environment
- TYPO3 version(s): 10.4.15
- cart version: 7.1.8
- cart_products: 3.0.0
Possible Solution
Additional context Add any other context about the problem here.
In general, retrieving the mini-cart via AJAX would be beneficial, so that a static cache (e.g. via ext:staticfilecache) can still be used.
@HenryAveMedi The JS should update the minicart but you have to follow the syntax which is demanded by the JavaScript: https://github.com/extcode/cart/blob/f1e76da8b29423b2319d470f5b3c1ff777f5d2cf/Build/Sources/JavaScript/add_to_cart.js#L108-L112
Did you follow those requirements but it's still not working?