Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reset "date added" and Reset "Products Viewed"


JamesS

Recommended Posts

Posted

Hello All -

 

I have finally finished my site and in the process I have:

 

1. Added products on different dates. AND

2. Clicked on products many times during beta testing.

 

I would like to reset the 'date added' in the database so the 'What's New' box and 'Favorites for [month]' are refreshed to todays date. I also would like for the number of times products have been 'viewed' to be reset to 0 so I can see what guests are truly looking at when they begin visiting.

 

Does anyone know the commands to reset these two items in the database? Your help is appreciated.

 

James

Posted
Hi James,

 

Try running these two commands in phpmyadmin:

 

To reset 'date added':

 

>> update products set products_date_added=now()

 

To Reset product views:

 

>> update products_description set products_viewed=0

 

 

Thank you that worked great - can you help me with one more though...?

 

Product Date Modified - I tried to update product_date_modified=now() but it did not like it. What would I type to reset that date?

Posted

The field in the database is actually products_last_modified not products_date_modified.

 

Try:

 

>> update products set products_last_modified=now()

 

or just set them all to NULL with:

 

>> update products set products_last_modified=NULL

Posted
The field in the database is actually products_last_modified not products_date_modified.

 

Try:

 

>> update products set products_last_modified=now()

 

or just set them all to NULL with:

 

>> update products set products_last_modified=NULL

 

Thanks -

 

I should have spent a few more minutes doing a stare and compare. I noticed that right after I hit 'send'

 

Thanks for your help.

 

James

Posted
Hi Sandbag... Great tips.

 

Now how can you reset all the reports????

- Products viewed

- Products Purchased

- Customer Orders-total

 

Products viewed - listed above.

Products purchase - delete all orders in the osCommerce admin.

Customer order-totals - delete all orders in the osCommerce admin.

Posted
Products viewed - listed above.

Products purchase - delete all orders in the osCommerce admin.

Customer order-totals - delete all orders in the osCommerce admin.

Yes... Products Viewed and Customer order-totals are taken care of.

But Products purchased doesn't get resetted by what you posted here. (Take a look... it can't be the same as customer order-totals reset) :)

  • 6 months later...

Archived

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

×
×
  • Create New...