Skip to content
Everett Griffiths edited this page Jun 19, 2014 · 1 revision

updateInventory

Called as a per-product hook from the parseFoxycartDatafeed Snippet, this hook (snippet) will decrement the quantity of a product during each purchase. The requires that the product_code passed to Foxycart is the Moxycart product ID.

INPUT PARAMETERS:

  • product_code : integer must match Moxycart product id
  • product_quantity : integer to indicate how many were purchased.

When called as a per-product hook from the parseFoxycartDatafeed Snippet, a whole bunch more options will be passed, but they are ignored by this Snippet.