FOXYSTOCK | A MODX REVOLUTION EXTRA
Why was this made? We were working on a project, and it became a requirement to track stock levels, and put some logic around those levels. Foxy Cart is great for dealing with all the payment side of things, but does nothing with regards to inventory management. This was made to bridge that gap and bring this feature to MODX.
Example usage : [ [!foxyStock? key=`your uniquekey`] ]
- key = Unique datafeed key from Foxy Cart
- tvCode = Name of the TV used for holding the unique product code. Default = foxyStock_code
- tvInventory = Name of the TV used for holding the inventory. Default = foxyStock_inventory
- logFile = Location of logFile, if you do not want logging, pass a blank call to this. Default = assets/foxyStock.log
Included TV's : [ [*foxyStock_code] ] & [ [*foxyStock_inventory] ] - You must allocate these to a template before you can use them
Included Chunks : [ [$foxyStock_form] ] - This shows you a form with add to cart button, and current inventory level. If you alter your TV's you will need to adjust the tv calls in this chunk.
- Assign tv's to a template
- Set individual product code and adjust base inventory level
- Create document with snippet call in, copy URL of that page.
- Login to foxy cart and ensure the correct store is selected (if you manage multiple)
- Select "advanced"
- Tick "Would you like to enable your store datafeed?"
- Paste the URL of the snippet call into "datafeed url"
- Copy API Key and put into snippet call.
- You're good to go!