cancel
Showing results for 
Search instead for 
Did you mean: 

How to update qty in real time without affecting the site performance

How to update qty in real time without affecting the site performance

There is one scenario like update qty in every second i mean real time update, how to do that. Currently using API to get data from source and update the qty every midnight. How to achieve real time update without affecting the site performance

2 REPLIES 2

Re: How to update qty in real time without affecting the site performance

Hi @jeevarathi8477 ,

Could you please elaborate on why you need to perform that action in real-time? I’ve encountered a similar requirement in the past, and to simplify the process, we validated stock availability by making a real-time request to the source system just before placing the order. On the frontend, we simply displayed whether the product was in stock or not, without updating quantities in real-time. But in our case product visibility on frontend not dependent on available stock so this solution worked for us.

 

Problem Solved? Accept as Solution!

 

Thanks,

Ankit

Ankit Jasani

Re: How to update qty in real time without affecting the site performance

@jeevarathi8477 

 

If you are seeking a solution to manage quantity increments similar to quick commerce, mobile apps and websites can help.

 

This can be customized within Adobe Commerce.

  • When displaying cart items on the product page, mini cart, or cart page, store the available quantity of the product or its variant in JavaScript variables or in custom attributes within HTML elements.
  • Upon clicking the quantity increment or decrement buttons, save the cart SKUs and updated quantity in the browser's local storage, along with an “is_synced” flag to verify the synchronization status with the server. Then, execute an asynchronous call (using REST or GraphQL) to update the cart details on the server.

Keep in mind that this solution may require some adjustments based on your specific system requirements.

- rxraj