Disabling add to cart, buy now and checkout buttons conditionally

Hi All,

I am looking to setup up a new food related e-comm business but have not been able to find a solution to two critical problems yet. It will be a very small store may be 10 - 15 products at most to begin with.

The first problem is, I need the stop customers from buying products from website, if they have not chosen a specific product or a product from a specific collection. So the customer cannot add some products or checkout, if the required products are not in the cart.

For example, there is Collection A, Collection B and Collection C. The customer is required to have chosen a product in Collection A in order for them to add products from Collection B or Collection C to the cart, and if the customer then make changes and update the cart, I need them to not be able to Checkout if the product of Collection A deselected. I thought about making a verification at the cart to check for the product or collection, but haven’t had much success as I am very new to the Shopfiy code and don’t know much Javascript. If anyone has any advice please let me know.

The second problem relates to inventory management. The products in Collection A will have some products in Collection B and C included like a bundle. The main thing I want to do is share inventory or check inventory and update the inventory of the product / product variant and vice versa, some part of the products in Collection A may have single or multiple units of the products in Collection B and C. Stock is very limited for some products and we cannot afford to mess up the stock. so if stock of is not enough for the total amount of Product A, B and C added to the cart then I need to stop the customers from checking out.

For example, Product A in Collection A, has 1 x Product B in Collection B and 2 x Product C in Collection C. The customer has to purchase Product A (1x Product B + 2x Product C + something else), but the customer can also choose to add more of Product B or Product C as add-on units but not in the Product A bundle which is set. So the inventory of Product B and Product C needs to be adjusted, and the add-on units needs to be adjust the inventory of Product A to the lowest of the constituents, when calculating in cart or after purchase.

I have been looking into using bundle apps as possible means to solve the problem but haven’t had much luck. The bundle apps presents other problem of their own, since most apps I would like to use, simply add the constituent products into the cart, But I need the items in the products in Collection A to be fixed and cannot be changed, while at the same time the customers can add the items as add-on as long as there is stock. I have looked into apps that sync inventory but for my needs (90% of functions of the app would be unless at the moment) the price and ongoing cost is simply not justifiable. I have looked into apps that sync SKUs but they are not flexible enough to allow for multiples of the units of items. I have also looked into ‘box’ building bundle apps, but the first problem presents itself as I have to be able to limit the customers ability to purchase the constituent products. There is also compatibility issues with multiple languages, where I don’t need the translation apps, I can input the exact language fields myself.

Sorry, if the questions and examples are a bit messy. I am at wits end with this and I am hoping someone can give some ideas, whether coding or existing apps. Even solving the first problem would already be a great help or even just some ideas of where to begin would be great.

I have not set up the new store yet and is playing around and researching with a non-published themes in another live store.

Hi, I am no expert but this sounds like you are trying to build custom bundles on your page. I have found that this app https://apps.shopify.com/bundlebuilder comes with this out of the box. You can disable all add to carts and force your user to go through the flow of this app to add things to the cart on your webpage.

If you are unwilling to install the app and want to code it in yourself then you can explore the cart object given by the shopify liquid API. You could disable the regular add to cart button and use the cart object as well as the cart AJAX API to conditionally add items to cart and show errors.

Hi BSalim,

Thanks for the response.

I did have a looked at bundlebuilder’s demo site and it is still under consideration and it seems that it does offer the closest to the desired effect, but I have read that there were problems with language settings which is quite essential to our site. I shortlisted it for testing when I build the site later since I don’t want to add it to a live site. From what I can see from the demo site though it won’t be compatible with the desired pricing structure of our products, and in order to set it into the desired pricing structure, the inventory management would be messed up. As I have said I have looked at most of the bundle apps already, which is why I am having a headache.

Thanks for the suggestion about the coding side, I will look into it.

Thanks again.

Hi @MT1701

Did you try Bundle Kit?

Bundle Kit displays bundles as standalone products (with selectable variants) that can be seen in the catalogue.

Bundle Kit tracks the inventory levels of the bundle and the individual bundled items as they are sold in real-time to prevent overselling.

Additionally, Bundle Kit will list out the individual bundled item SKUs in the bundle order for your ease of fulfilment.

You can try the app for free at: https://apps.shopify.com/bundle-kit

Hope this helps!

Ana

This looks very promising for the bundle and inventory issue and seems to be exactly what I am looking for. I will give it a thorough look.

Just two quick questions. One, does the dummy product acts as a single product in the backend and with multi language support in the same way as other products in the shopify system? Two, the monthly order count of the charging structure, is this for all orders regardless of whether the app is used, ie the purchase of bundles?

Thanks for the suggestion. This could be the solution to one of my problems.

Hi @MT1701

Glad that you found Bundle Kit helpful!

To answer your questions:

  1. Yes, the dummy product is simply a normal Shopify product in which Bundle Kit leverages on top of, and therefore should essentially operate the same way as other products in the Shopify system.

  2. Yes it is for actual orders that may or may not be generated by the app. To determine if and how the inventory level of a bundle is to be adjusted, Bundle Kit inspects every single incoming order and computes in real-time.

I would say, managing bundles manually, without Bundle Kit, is time consuming, error-prone and more likely to be more costly. On top of that, Bundle Kit also manages the bundle price & weight automatically.

Hope this will help you out!

Let me know if you have other concerns. You can also email me at support@bigbraincommerce.com.

Best,

Ana

Hey @MT1701

I highly recommend checking PickyStory’s combo deal.

Combo Products enable you to bundle products as a single product, add to collections and advertise across your marketing channels. Aggregate several products as a pack/gift box and sell them through a dedicated product page as one product.

Examples:

  • Buy A+B+C for $50

  • Buy any pack from the Gifts collection for $99

You can also check our live example here

Feel free to reach if you have any questions or if you need help setting up your PickyStory bundles.