Synchronizing Product Bundle Inventory

Follow

Comments

21 comments

  • Avatar
    Lisa Hill

    so how long does it take for the sync to take place, meaning how long from order until the inventory is taken out of shopify?

  • Avatar
    Zetya Support

    Hi Lisa,

    Normally within a minute or so.

    Gavin.

  • Avatar
    Marcel Kalveram

    I have inserted the code as described above, but I get an error with the javascript from the gist.

    It says the funktion "getProduct" doesn't exist. I have examined the Shopify object and it does indeed not t have any function of this kind.

    (See screenshot: https://www.dropbox.com/s/2w5fpm9wsvymvc5/Bildschirmfoto%202013-03-01%20um%2013.26.57.png)

    Is it possible that Shopify has updated its javascript API and this code doesn't work anymore?

    Please let me know what else you need to debug this issue.

  • Avatar
    Zetya Support

    @Marcel That is wierd.

    Can you try adding 

    {{ 'api.jquery.js' | shopify_asset_url | script_tag }}

    to the <head> section of your theme.

  • Avatar
    Marcel Kalveram

    Thanks for the hint. I haven't touched the code and now had a different error,

    which is that "selectCallback" wasn't defined. Removing the "var" keyword for this function and making it global seems to solve the problem.

    I'm not sure what is going on exactly and why I suddenly don't have the problem with "getProduct" anymore. Will investigate further.

  • Avatar
    Sebastian Hansen

    Hi,

    is the inventory of each product reduced by one if I crete a task for product bundles? Because all the products which are included in the bundle were reduced like the task reserve one of each.

    Thanks

  • Avatar
    Zetya Support

    Hi Sebastian,

    Yes, each of the component products will have their inventory reduced by the same quantity as the bundled product has on the order.

    Gavin.

  • Avatar
    Darnell BigDyce Jackson

    Installed the script as suggested above, and it seems to be working when I try to add the bundle to my cart and it says "Sold Out", but somehow I'm still getting orders for the bundle. Any ideas?

  • Avatar
    Christopher Sun

    Darnell -

    my guess is that this has to do with how shopify handle's abandoned orders and cookied carts.

    A while ago, we noticed that if we made products out of stock on product pages, but had shopify settings set to allow purchases after the product was out of inventory (or set with infinite inventory as is recommended during use of this plugin), customers would still be able to purchase the item.  My theory as to the cause:

    1.  Customer A adds item X to cart

    2.  Customer B adds item X to cart

    3.  Customer A buys the last item X

    4.  Customer B, who already has the item in his/her cart, then checks out.

    Honestly, I have no idea how to get around this :-/

  • Avatar
    Christopher Sun

    Gavin -

    I noticed something and am wondering if you guys can push a fix....

    the bundling script you wrote returns a bundle object including two variables:  "available" and "quantity".  This is your current recommended javascript does not take into consideration the item multiplier when returning the quantity variable:

    for (i = 0; i < results.length; i++) {

    if (results[i].available == false) {

    available = false;

    quantity = 0;

    break;

    } else {

    if (quantity > results[i].quantity) {

    quantity = results[i].quantity;

    }

    }

    }

     

    With my fix:

    if (results[i].available == false) {

    available = false;

    quantity = 0;

    break;

    } else {

    var tempqty = results[i].quantity/results[i].multiplier;

    if (quantity > tempqty) {

    quantity = tempqty;

    }

    }

     

    (sorry about the shitty syntax.. im javascript noob).  Reason this is needed:  I need to not only check bundle availability, but also check that the customer isnt adding to cart more than is available via bundling.

  • Avatar
    Zetya Support

    Hi Christopher,

    Thanks for that. I've updated the code.

    Gavin.

  • Avatar
    Grace Wegener

    Hi, I'm confused as to how bundle inventory can be synchronized.  Can you please explain the difference between option 1 and option 2? I'm having Shopify track inventory on all products that make up the bundles as well as the bundles themselves...

    Option 1: Additional Variants

    With this option you set up the bundle components as additional variants on the base product with the inventory quantity initially set the same as the base product variant. The Sync Inventory task is then configured to update these additional variants. If you set it up this way set the inventory policy of the additional variants should be set to Don't track inventory **(since Shopify Assistant is now doing it) and the base variant should be set to _Shopify tracks this product's inventory**_.

    For example, if you sell a camera you would have one variant for the camera itself called "Camera". If you now offer a bundle that includes a case you would create a new variant called "Camera + Case" and create a Sync Inventory task with the bundle product as the camera + first variant, and the components would be the second variant. When an order comes through for the bundle it will update the bundle product (camera only).

     

    Option 2: Separate Products

    If you sell a bundle that is a separate product, you create the new product and specify the bundle as a variant, however you do not need to track inventory on the bundled product. Simply configure which product variants should be updated when the order is received.

  • Avatar
    Zetya Support

    Hi Grace,

    I might be easier to ignore the options and think about what the sync inventory task does which is to monitor orders and when it sees one with a variant configured as a bundle product then it adjusts the inventory of each of the component variants.

    It does not change anything that Shopify does so if you have the variant set to track inventory then it will also adjust inventory.

    If you could  create a ticket letting us know what you are selling in terms of bundles we can provide more specific advice for your situation.

    Thanks, Gavin.

  • Avatar
    Frantisek

    Hi, I wanted to create the bundled product for my site, but the Additional Variants does not work for me. I have 1 product in 6 different sizes (variants) + I want to add another variants which is With Bag and Without Bag. I was not able to find a way to configure it with the task.

    So I tried to use the Separate Products, which worked fine, just with 1 flaw - I was still able to order the product even if qty was 0. I tried to add your script, but I only got a "// Javascript document" in left corner of the website. 

    Are you able to help me? I followed the instructions for adding the script but there must be still something else.

    Thank you 

  • Avatar
    Zetya Support

    Hi Frantisek

    Please raise a support ticket and we'll be happy to take a look.

    Thanks

    Zetya Support 

  • Avatar
    Katalin Cseke

    This might be a silly question, but does this work if I am using Amazon to track inventory? Is there any way to create bundles and have inventory tracked separately? Thanks for your help!

  • Avatar
    Zetya Support

    Hi Katalin

    The app synchronizes inventory levels within your Shopify store.  It does not work with 3rd parties.

    Thanks

    Jack 

  • Avatar
    Jose

    Hi guys,

    Is there a way where the bundle inventory is synced up when the different products that make the bundle up are re-stocked?

    Thanks

    Jose

     

  • Avatar
    Zetya Support

    Hi Jose

    No that is not supported.  Inventory is managed in Shopify and not the app.

    Thanks

    Shopify Concierge

  • Avatar
    Jose

    Cool, makes sense :) - forgot to ask something... any idea where the OptionSelectors code is for the Canopy theme?

  • Avatar
    Zetya Support

    @Jose - Sorry no, not without looking at the theme.  If you require specific help for your shop, please create a ticket.

Please sign in to leave a comment.