Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Zeroing Report Totals


stratusc

Recommended Posts

Posted

Finished install and SSL problems. How do you zero out all the totals produced from testing?

In particular Best Products Purchased Totals, Best Customer Orders-Total and Best Viewed Products? And I guess how do you do this every month or so or EOY?

Posted

You make a good point, one I thought about before but did not consider important enough to stop and work on (getting the site running is usually the highest priority).

 

For the Products Viewed report, the value is taken from the field products_viewed in the table products_description.

 

For the Products Ordered report, the value is taken from the field products_ordered in the table products.

 

For the Best Customers report, the amount of each customer's orders is summed by query to the customers table and the orders table. After testing, I would expect that all test orders are deleted, so this takes care of zeroing them. You would not be able to reset these in a functional store.

 

But the first two could be reset with simple SQL queries. Use this to reset the products viewed

UPDATE `products_description` SET products_viewed = '0' WHERE 1;

and use this to reset the products purchased

UPDATE `products` SET products_ordered = '0' WHERE 1;

  • 1 month later...
Posted

THANK YOU!!!!!!!!!!!!!!

This helped me fix my reports. For some strange reason they would not update. after clearing them they work fine now!!!!!!!!!

Thanks,

Steel :) :) :)

Archived

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

×
×
  • Create New...