FoxyStock | A MODX Revolution Extra

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.

If you should have any question please get in touch, or alternatively view the project on github.

Example usage : [ [!foxyStock? key=`your uniquekey`] ]

Attributes :

  1. key = Unique datafeed key from Foxy Cart
  2. tvCode = Name of the TV used for holding the unique product code. Default = foxyStock_code
  3. tvInventory = Name of the TV used for holding the inventory. Default = foxyStock_inventory
  4. 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.

Instructions :

  1. Assign tv's to a template
  2. Set individual product code and adjust base inventory level
  3. Create document with snippet call in, copy URL of that page.
  4. Login to foxy cart and ensure the correct store is selected (if you manage multiple)
  5. Select "advanced"
  6. Tick "Would you like to enable your store datafeed?"
  7. Paste the URL of the snippet call into "datafeed url"
  8. Copy API Key and put into snippet call.
  9. You're good to go!

Leave a Comment