I am working with Liferay DXP 7.3 and Commerce 3.0. (GA1)
After add product to Cart, I change product quantity and I would like to listen this event.
Is there any event is thrown in this case? How can I listen to it?
I am working with Liferay DXP 7.3 and Commerce 3.0. (GA1)
After add product to Cart, I change product quantity and I would like to listen this event.
Is there any event is thrown in this case? How can I listen to it?
The component refreshes itself by using this useEffect.
useEffect(() => {
Liferay.on(CURRENT_ORDER_UPDATED, updateCartModel);
return () => {
Liferay.detach(CURRENT_ORDER_UPDATED, updateCartModel);
};
}, [updateCartModel]);
Where CURRENT_ORDER_UPDATED
=== 'current-order-updated'
Try something like the one below to better investigate
Liferay.on('current-order-updated', console.log)