I am developing an OpenCart driven shop into a clothes rental store.
Each product has two product options:
‘Start Date’ - this is in date format YYYY-MM-DD
‘Number of Days’ - this will either be 2, 5 or 8, and will have different prices per duration.
What is needed: Upon order completion, I need to insert 3 elements into an additional table in the MySQL database named oc_calendar.
I need to insert the product ‘code’, the ‘start date’, and the ‘end date’ (this will be the start date plus the number of days specified in length of hire) for each item ordered.
This is so that I can run an availability checker on each product page.