1

I've created an order for the customer's cart using the following code (When the customer clicks checkout on the app we're making):

$service = Mage::getModel('sales/service_quote', $quote);
$service->submitAll();
$order = $service->getOrder();

However, when a product is added/removed to the cart, the order items remain the same as before the update. How am I supposed to handle the update to the order? Do I cancel all orders the cart has and create a new one? Or is there a way to properly update the order when a new item is added to the cart?

1

Completed quote is known as an order. When you add add/remove a product to cart, the changes is applying only to quotes. There is no role for order in cart.

When you checkout and then place order (in this case submitAll()) only an order is come into action. Once order is created, then you cant alter it's charateristics by adding/removing again to the cart. By that, you can only create a new order.

  • Is that how I'm supposed to do it? Cancel the previous orders and make a new one? Or am I doing something wrong? – Pat Jul 22 '15 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.