1

I have had several customers who have been able to make changes to previously placed orders. Even though the order status is set to pending after checkout is complete and their payments are processed, they are able to go back into the shopping cart (which should be empty but is not) and delete items from the cart. They then believe that the payment amount will be adjusted to reflect the new total of items left in the cart, but of course it will not, as the original amount has already been charged to their card by Elavon. Why does the cart still contain items already ordered? How do I prevent this from happening?

1 Answer 1

0

This looks like a permission issue. Check the permissions page admin/people/permissions and make sure only relevant roles can edit orders.

By default, only the following permissions should be granted to authenticated users, and to any customer role you may have created :

  • Create Order orders, optionally Create orders of any type
  • View own Order orders, optionally View own orders of any type

About the items remaining in shopping cart after checkout, have you tested yourself ? I'd more believe your customers edited orders from their orders page if they had permission to... Else, a custom rule or a custom module may cause that behaviour.

As explained in drupalcommerce.org

At the heart of Drupal Commerce is the ubiquitous Order. This Order is first created when a user adds a product to a cart. The Order is actually the "cart" when it has a status of "Shopping Cart."

Cart is only one of the possible states of an order.

5
  • When an order is completed in commerce, it should shift the order status out of 'cart'. That should effectively wipe the cart. If this is not happening, there could be a misconfigured rule or custom code preventing this from happening, which is why users can also edit orders if they are still in cart status.
    – Kevin
    Feb 27, 2017 at 16:56
  • @Kevin tks indeed this is what I suggested. But since the op said the orders take a pending status at checkout complete, I also thought this could be a simple permission issue...
    – Kojo
    Feb 27, 2017 at 17:02
  • The order permissions look okay. I have clicky installed on the site. So I have log of the customers actions. That's how the discovered this behavior. I looked over the order rules and I didn't see a problem, I'll go back review them. Thanks for you help. Mar 1, 2017 at 1:26
  • Thanks for your response. I haven't looked at code. A few questions: so what happens when a cart is emptied? Are records deleted or moved? Does checkout initiate this action? From the admin order page. we can see what the customer ordered. So details of the orders are kept. Mar 1, 2017 at 21:37
  • I edited the answer. A cart is just the first state on an order...
    – Kojo
    Mar 1, 2017 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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