Post by fxdesigner » Tue Aug 07, 2012 7:39 am

Using Opencart 1.5.3.1

For any given "day" / date - we have 12 of ONE product available. If the last product is sold (meaning all 12) or for that matter if only 6 are sold in a SINGLE Calendar Day, is it possible to have MySQL / Opencart automatically RESET / RESTORE the quantity back to 12? - The CATCH??? The reset / restore must be for the NEXT day or later and NOT the same day the product sold out. The only variable is the DAY / Date. For Example Today is 8/6/12 by 11:59pm, this SINGLE product has sold 10 of 12 available units. The day (8/6/12) ends... THEREFORE at 12 Midnight or 12:01am on 8/7/12, the product quantity is reset/restored to 12 again (automatically) AND... NO human being involved with the process as described.

Thanks for any insight and expertise.

FX Designer

Newbie

Posts

Joined
Sun Jun 19, 2011 4:21 pm

Post by upl8t » Tue Aug 07, 2012 11:24 am

There's a couple of ways you could look at this... either write a php script running as a cron job that updates the db values per your criteria or do the same thing by scripting this inside of mysql's scheduler. Either one could work and no one has to touch it.

New member

Posts

Joined
Fri Aug 03, 2012 7:36 pm
Who is online

Users browsing this forum: Baidu [Spider] and 134 guests