• Welcome to KonaKart Community Forum. Please login or sign up.
 

How to handle transaction

Started by pooja, April 27, 2015, 04:54:15 am

Previous topic - Next topic

pooja

Hi,

     I have a requirement of bulk edit of products in the cart. So basically I need to update/remove products from cart within a single call. What I am doing is I am using the code  in 'EditCartSubmitAction' in a loop to accomplish my task.
     The issue is - if there are 3 products - two needs to be updated and last one needs to be removed and if we get an exception  after updating quantity of first two products. Now the last one will not get removed , but other 2 quantities have been already updated. This will lead to inconsistent state of the cart from customer's point of view. So this whole process needs to be in a transaction.
     Since we cannot access DAO layer, can anyone please help/guide me to handle this issue?

Thank you in advance.

Expert Review

You have used Rest Service in Konakart if its helpful

pooja

Thanks for your reply.
But Our application doesn't use REST services or any other web service for that matter. Is there any other way to handle it?