Jump to content

Product last sale timestamp


venditdevs

Recommended Posts

Hi,

 

When a customer order is succesfull i want to add a timestamp into the database for that product.

 

EG:

*** Customer order contains product id's 100 and 101

*** Products with id 100 and 101 will get a last sell timestamp

 

I need it on productlevel. How can we achieve this ?

 

I think i need to hook it at hookActionUpdateQuantity...but ....how to go from there?

Link to comment
Share on other sites

If you don't want to modify the product table as I suggested, why not just create a dedicated table for that with [ product_id (FK), last_updated (DateTime) ?

You can feed it after an hook (application-level) or a trigger (db-level)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...