KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: pooja on April 27, 2015, 04:54:15 am

Title: How to handle transaction
Post by: pooja on April 27, 2015, 04:54:15 am
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.
Title: Re: How to handle transaction
Post by: Expert Review on May 11, 2015, 10:11:29 am
You have used Rest Service in Konakart if its helpful
Title: Re: How to handle transaction
Post by: pooja on May 13, 2015, 01:10:35 am
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?