Disable Multiship Call to Action in Drawer Cart for Certain Product Types
As you may know, Giftship’s Multiship functionality is not compatible with third-party bundling apps. In this tutorial, we’ll show you how to automatically hide the Multiship call to action in the drawer cart when a product with the type name “Bundle” is added. This solution listens for drawer open and item update events to re-check and apply the logic dynamically.
Important Note: This is an advanced tutorial designed for qualified Shopify developers with JavaScript experience. If you’re not working with a developer and need assistance, we can implement this for a flat fee of $100 USD. Payment can be made at: https://shop.gist-apps.com.
Step 1: Duplicate Your Live Theme
Always work on a duplicated development theme to ensure that your live store remains unaffected.
Step 2: Create and Upload the Snippet
- Go to the Assets folder in your theme.
- Create a new JavaScript file named giftship-drawer-disable-ms.js
- Copy and paste the following code into that file:
(() => { const CONFIG = { hiddenInputName: "hidden", hideClass: "hide_button" }; const MODULE = { init: function () { this.registerDrawerListeners(); }, registerDrawerListeners: function () { document.addEventListener('giftship.drawer-cart.opened', this.deferHandleDrawerEvent.bind(this)); document.addEventListener('giftship.drawer-cart.item-updated', this.deferHandleDrawerEvent.bind(this)); }, deferHandleDrawerEvent: function () { requestAnimationFrame(() => { this.handleDrawerEvent(); }); }, handleDrawerEvent: function () { const options = document.querySelectorAll(`.gs__cart-option[data-child-name="${CONFIG.hiddenInputName}"]`); let isEnabled = false; options.forEach(option => { const isHidden = option.classList.contains('gs__hidden-option'); if (!isHidden) { isEnabled = true; } }); const multiShipBtn = document.querySelector('.gs__drawer-footer-btn.gs__drawer-ms-btn'); if (!multiShipBtn) return; if (isEnabled) { multiShipBtn.classList.add(CONFIG.hideClass); } else { multiShipBtn.classList.remove(CONFIG.hideClass); } } }; MODULE.init(); })();
Step 3: Edit theme.liquid
to Include the Snippet
- Open
theme.liquid
in the theme editor. - Scroll to the bottom, just above the closing
</body>
tag. - Paste the following code:
<script src="{{ 'giftship-drawer-disable-ms.js' | asset_url }}"></script> {% style %} .gs__drawer button.hide_button { display:none !important; } {% endstyle %}
Step 4: Modify the Drawer Cart
In your drawer cart, create a hidden input block and configure the display rules so it only shows when the product type contains “Bundle“. Make sure the input name is set to “hidden“.
Can't find the answer in our documentation?
Contact Support Drawer Cart: Automatically Clear Datepicker After X Hours
Automatically Add Upsell (e.g. Insurance) in Drawer Cart
Disable Multiship Call to Action in Drawer Cart for Certain Product Types
How to Add Product Bundles Manually to Cart
Google Font Real-Time Personalizer
Remove Blocks Based on Country
Remove British Forces from Multi-Address Modal
Preset Bundles: Automatically Ensure All Products in an Upsell Block Are Added to Cart
How to Add Custom Scripts to Multiship
Conditionally Showing Datepicker Blocks Based on Product Types in Cart Using the Hidden Input Block
Showing Product Option Blocks Based on Customer Tags with the Hidden Input Block
Event API Example: Automatically Add an Ice Pack to Each Shipment in the Multiple shipping Address Process
Drawer Cart CSS Styling Options
Preventing Checkout Until Giftship Bundles are Loaded
Javascript Event API
Showing Product Option Blocks Based on Product Variants with the Hidden Input Block
Edit Gift Messages etc on Multiship and Cart Page in Giftship
Adding Bundles when a User Navigates to the Cart Page
How to show bundle price on product page as bundle is built
Conditionally Hide Giftship Options Based on Your Carts Contents
Giftship Checkout API ⚒️