Conditionally Hide Giftship Options Based on Your Carts Contents
In order to hide Giftship Options (multiple shipping address toggle, gift messages, datepicker, etc.) conditionally on your site based on the contents of your cart, you can detect the contents in different manners (properties, tags, collections, etc.), and then conditionally load some CSS on your store if certain conditions are met.
Here is an example that shows how to hide the multiple shipping address toggle if a subscription item is in the cart. The below checks for the presence of a “item.variant.requires_selling_plan” line item property. If this is present, we do not want to show the multiple shipping address toggle.
{% assign show_multi_address = 'true' %} {% for item in cart.items %} {% if item.variant.requires_selling_plan == true %} {% assign show_multi_address = 'false' %} {% endif %} {% endfor %} {% if show_multi_address == "false" %} <style> #gs__toggle-box { display: none !important; } </style> {% endif %}
Here is an example that shows how to only show both the multiple shipping address toggle and gift message feature if a product tagged with ‘gift’ is present in the cart.
{% assign show_giftship = 'true' %} {% for item in cart.items %} {% if item.product.tags contains 'gift' %} {% assign show_giftship = 'true' %} {% endif %} {% endfor %} {% if show_giftship == "false" %} <style> #gs__toggle-box { display: none !important; } #gsAppContainer { display: none !important; } </style> {% endif %}
Here is an example that shows how to only show the multiple shipping address toggle if a product type is equal to a certain type.
{% assign show_multi_address = 'true' %} {% for item in cart.items %} {% unless item.product.type == "Gourmet Gift Boxes" or item.product.type == "Other Hampers" %} {% assign show_multi_address = 'false' %} {% endunless %} {% endfor %} {% if show_multi_address == "false" %} <style> #gs__toggle-box { display: none !important; } </style> {% endif %}
Can't find the answer in our documentation?
Contact Support Remove British Forces from Multi-Address Modal
How to Add Custom Scripts to Multiship
Troubleshooting Missing Shipping Rates with Multiple Shipping
Edit Gift Messages etc on Multiship and Cart Page in Giftship
Fulfilling Multiple Shipping Address Orders
Viewing Reports with Multiple Shipping Address Orders
Discount Codes for Multiple Shipping Address Orders
Tax Calculation for Multi-Address Checkouts in the United States
Conditionally Hide Giftship Options Based on Your Carts Contents
Sending non-physical products to multiple recipients
Using Tax Overrides for Multiple Address Checkouts
Enable Order Notes for Shipping to Multiple Addresses
Making the Multiple Shipping Address Checkout Cart the Default
Selling Digital Gift Cards with the Multiple Shipping Address Process
Shopify Plus: Configuring Avalara to Honour Shopify’s Tax Settings