Skip to content

Instantly share code, notes, and snippets.

@trev-dev
Created October 4, 2017 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trev-dev/3280090e7df0ee347bf06dbbf94c0b3d to your computer and use it in GitHub Desktop.
Save trev-dev/3280090e7df0ee347bf06dbbf94c0b3d to your computer and use it in GitHub Desktop.
Variant Breakdown
current.product.variants = [{option1: 'Normal'}, {option1: 'Foil'}]; // Original Code
// Lets make some white space to make this easier ;) - then we're going to add our missing parameters.
current.product.variants = [
{
option1: 'Normal',
inventory_quantity: 0,
inventory_management: 'shopify'
},
{
option1: 'Foil',
inventory_quantity: 0,
inventory_management: 'shopify'
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment