Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database consistency and reports


zzfritz

Recommended Posts

Posted

The admin report for products purchased relies on the counts kept in the products table for each item, but this count is not decremented when orders are deleted. So, it is not consistent with the count you would get by traversing the (undeleted) orders themselves.

 

(We noticed this after making a bunch of orders while testing, then deleting them. After going live, the products ordered in the test still show up as best sellers despite their having not been sold at all.)

 

I believe the required fix would be in the function tep_remove_order, which does restock the order's products (when the box is checked) by incrementing products_quantity in the products table. It should also decrement the products_ordered.

Archived

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

×
×
  • Create New...