Change or update an order
The normal and recommended integration is to use Hips.js on your checkout page below the cart. Should the user choose to change anything in the order that in this stage is already created, you should do the following:
- User changes quantity of a product in your cart on the checkout page.
- Call
Hips.checkout.suspend();
to avoid that the customer checkout and pay without the new quantity is calculated in the total amount. - Update the order in your system, then call the HIPS API Update Order to make sure Hips have the updated order.
- When finished, call
Hips.checkout.resume();
to reload and resume the checkout with the new data.
<script>
function change_something(){
Hips.checkout.suspend();
example_ajax('/change', function(){
Hips.checkout.resume();
});
}
</script>
Updated about 5 years ago