I had to use the Dansie shopping cart in my last project, but the site has quite a few unique items. The products are in a MySQL database and I'd like to be able to change the value of the field that controls whether a product is visible to browsing.
The actual cart script for Dansie can't be modified, and the only option I can find for inventory management is a flat file it can use to decrement a product quantity for items you specify as limited.
The cart will check this file and at least prevent someone from trying to buy it using an "out of stock" message, but I need more than that.
Since I can't modify the actual cart script, I was thinking I could make a new script that would read the "limited.dat" file and search out any product that has reached zero quantity, and then change the field in the MySQL database, after which the template pages would no longer display that item while browsing.
What I need to know is - how can I trigger the script to run only when the limited.dat file has been modified? Any suggestions on a way to write the script in the simplest method possible would also be appreciated