Hi there;

First of all thank to all developers and contributors of Drupal Commerce. The combination of Drupal + a full-fledged e-commerce solution is incredibly powerful.

However, it is said with great power cames great responsibility. Or, to put it another way, more complexity means more (potential) space for trouble.

I have had a couple of experiences with commerce. I ran both times into a rather common issue: in the process of trying modules, installing, uninstalling and making fake orders to test the system, it is usual to end up with orphaned line items, orders, etc...

This is a common issue and I understand is neither bug nor an error.

However, these orphaned line items and the rather complex ecosystem of commerce modules on a feature-rich store (i am using tax, shipping, paypal, subscription products, coupon, discount, physical... + lot of rules) have led me sometimes to troubling PDOExceptions caused by duplicate line item entries. Those errors have proven difficult to trace back.

Moreover, and related to it, it is also difficult to reset orders & line-items to start from scratch (from ID:1).

Given the complexity of Commerce, truncating databases is not always safe or useful. There is always some data kept in other tables different from the obvious ones (commerce_orders, etc...) and there's auto-increment.

I am speaking from a front-end designer point of view. I know this may sound rather easy or even naïve from a developer point of view.

However, I think it would be a great feature to implement a "reset all" option in commerce that allows to get rid of existing all orders & line-items, orphaned or not, and reset the auto-increment to zero at any time.

Forgive me if this is unfeasible. I'm not a developer. I only want to give some feedback from an user point of view on how to better up Commerce's experience.

Comments

rszrama’s picture

Status: Active » Closed (duplicate)

I think it's a great idea, so no need to feel insecure posting it. : )

That said, I did a quick search and found that I filed a feature request for this back in December... and apparently forgot about it entirely. I need to get a new release of Commerce up soon, so I'll put this one on the to-do list before I package it: #2161121: Add a form to delete orphaned line items