This project is not covered by Drupal’s security advisory policy.

In rare instances you need to delete everything out of your cart, unfortunately there is no great way to do this out of the box, that's what this module tries to remedy.

Once installed you need to create a link for the user that goes to /cart/$user_id/delete this will then redirect them to whatever page you configure.

Synopsis

This project lets you delete a cart out of the database at any step in the process except once they've checked out. This is useful if for some reason your users need the ability to delete their own cart and going back through the steps or adding more items to the cart isn't the solution.

Example use case:
Your Commerce site is used for sales reps to place orders, they're half way through with an order and the customer changes their mind about wanting the product. Now that sales rep needs to restart the whole order so there is no leftover information from the previous customer.

Configuration

  1. Download & Install as you usually would
  2. Go to /admin/commerce/config/delete-cart-config to change where use is redirected to after deleting cart
  3. Create a link wherever you need it that links to /cart/$user->uid/delete

Requirements

Commerce

Known problems

You currently can delete anyone's cart if you know their ID. I don't personally see how this is a real security flaw as nothing bad can happen from that. But I will put in proper permissions checking soon.

Supporting organizations: 

Project information

Releases