Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Orders not finalized being included in Total Revenue Module.


raiwa

Recommended Posts

9 hours ago, Smoky Barnable said:

On another note, I was quite pleased when looking in my admin total revenue box that my sales had increased dramatically over the last few months. However it seemed too high....I realized today that the total revenue is not being reported correctly because it's treating orders with a status of Preparing [Stripe SCA] as completed purchases. These are customers that have not completed payment but are being counted as sales in the total revenue module. As a temporary solution, I patched the query to ignore orders with a status of  "Preparing [Stripe SCA]". I also changed this in all code that generates sales reports. I don't know if there is a better solution, but this really skewed my perception of how my business was performing the last few months and as such is quite an important issue in my opinion. I do understand that this can be avoided by manually deleting incomplete orders but I don't consider this a viable solution.

The same happens with any canceled/unpaid/returned order.

One possible solution would be to add a flag to order statuses like "include in sales statistics", similar like the public flag. Then modifiy the queries in the stats pages accordingly.

Maybe @burt and @ecartz will consider this to be added to core.

Link to comment
Share on other sites

13 hours ago, Smoky Barnable said:

I think this was caused by a network communication/timeout error since it only happened once in thousands of orders, so I'm not too concerned with it.

On another note, I was quite pleased when looking in my admin total revenue box that my sales had increased dramatically over the last few months. However it seemed too high....I realized today that the total revenue is not being reported correctly because it's treating orders with a status of Preparing [Stripe SCA] as completed purchases. These are customers that have not completed payment but are being counted as sales in the total revenue module. As a temporary solution, I patched the query to ignore orders with a status of  "Preparing [Stripe SCA]". I also changed this in all code that generates sales reports. I don't know if there is a better solution, but this really skewed my perception of how my business was performing the last few months and as such is quite an important issue in my opinion. I do understand that this can be avoided by manually deleting incomplete orders but I don't consider this a viable solution.

I had exactly the same happen with all my payment methods. (Stripe and Paypal) Unpaid or uncompleted orders remain at the Preparing stage but still count towards any totals in the store. I just deleted all these orders and the totals were corrected. You also have to watch that if you send a refund or partial refund that does not get deducted in any of the payment reports either.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

8 hours ago, raiwa said:

One possible solution would be to add a flag to order statuses like "include in sales statistics", similar like the public flag. Then modifiy the queries in the stats pages accordingly.

I would rather have a "payment complete" flag.  Otherwise we end up with a bewildering series of flags that everyone has to set to get the desired behavior.  Even though the actual desired behavior is much simpler.  If payment complete, allow download.  If payment complete, show in revenue statistics.  When transitioning from payment not complete to payment complete, generate a notification. 

Alternately, I was thinking that we might create configuration just for the dashboard module that allows people to set what statuses they want the module to include.  That would be a much more limited change. 

Always back up before making changes.

Link to comment
Share on other sites

Quote

I would rather have a "payment complete" flag.  Otherwise we end up with a bewildering series of flags that everyone has to set to get the desired behavior.  Even though the actual desired behavior is much simpler.  If payment complete, allow download.  If payment complete, show in revenue statistics.  When transitioning from payment not complete to payment complete, generate a notification. 

Alternately, I was thinking that we might create configuration just for the dashboard module that allows people to set what statuses they want the module to include.  That would be a much more limited change. 

@ecartz,

I agree that it's not possible to satisfy all needs.

But in real store life, most admins use order finished statuses which are different from payment received. Like: "shipped"", "delivered", "shipped by x", "shipped by y" etc..

Moderators, maybe these last messages should be splitted to it's own thread. It's not related to stripe payment.

Link to comment
Share on other sites

1 hour ago, ecartz said:

Alternately, I was thinking that we might create configuration just for the dashboard module that allows people to set what statuses they want the module to include.  That would be a much more limited change. 

It's not only the dashboard module, there are also the Reports pages "Customers Orders Total" and "Products purchased" affected.

There are also third party Accountant and Tax Report Tools. Even they may have their own status filtering, they could benefit from the suggested Statuses flag.

Link to comment
Share on other sites

1 hour ago, raiwa said:

@ecartz,

I agree that it's not possible to satisfy all needs.

But in real store life, most admins use order finished statuses which are different from payment received. Like: "shipped"", "delivered", "shipped by x", "shipped by y"

All mine end up as Shipped or Download Available. Anything other that those can be deleted as they are not completed. The incomplete ones remain as the recover carts still register them. After a set time they are deleted.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

11 minutes ago, 14steve14 said:

All mine end up as Shipped or Download Available. Anything other that those can be deleted as they are not completed. The incomplete ones remain as the recover carts still register them. After a set time they are deleted.

Each shop is setup different and has different needs:

  • Recover carts is an addon, not all stores use it
  • Store owners may need/wish to keep track for canceled, unpaid and returned orders
  • There may exist even legal requirements for not to delete canceled and returned orders if they have been already accounted
Link to comment
Share on other sites

1 hour ago, raiwa said:

But in real store life, most admins use order finished statuses which are different from payment received. Like: "shipped"", "delivered", "shipped by x", "shipped by y" etc..

Which is why I'm suggesting setting a payment_completed flag on all of "shipped", "delivered", etc. 

But what I want to avoid is where each time we have a problem like this, we add another flag that means the same thing.  We already have a download flag.  And I bet that if people set it, it would exactly match what you want from your statistics flag.  So I'd rather rename download to payment_completed and use it both for gating downloads and for determining what to show in revenue statistics. 

Another alternative would be to change how the status of the order is handled from a single monolithic status to a set of statuses.  Payment status:  preparing; processing; deferred; completed; rejected; etc.  Ship status:  waiting for payment; packing; waiting for pickup; shipped; delivered.  Refund status, etc. 

1 hour ago, raiwa said:

It's not only the dashboard module, there are also the Reports pages "Customers Orders Total" and "Products purchased" affected. 

And what if people don't want those to be affected the same way?  What if they want those reports (which aren't total revenue) to include incomplete orders?  Are we then going to make two more flags just for those?  I would rather add a Show All/Show only payment completed to those.  Then people could choose which way to show it. 

As a matter of general principle, we've been trying to get away from third party modules relying on core configuration to operate.  So if there are third party modules that have the same problem, they should find their own solution.  I would be willing to compromise that for a payment_completed flag that would be used internally.  But a "Show in Statistics" flag?  The module should figure that out on its own. 

Always back up before making changes.

Link to comment
Share on other sites

24 minutes ago, ecartz said:

I would be willing to compromise that for a payment_completed flag that would be used internally.

I got it now. I understood first you mean a payment completed status.

Any additional flag would be fine.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...