Signup

Hide pickup, delivery and shipping for gift cards, virtual items and digital items


The majority of merchants sell virtual gift cards to their customers which require no shipment and can not be picked up or delivered. If you are in the same boat follow the steps below.


Easy option

  1. Open Store Pickup + Delivery and click Settings
  2. Click Developers
  3. If you want to hide the widget for a specific product you can add a comma separated list of product SKUs in the field shown below:
  4. Alternative if you prefer to disable the widget for all digital products click Hide widget when cart contains only digital items
  5. Click Save

Advanced option

  1. Within Shopify click Online Store
  2. Click Actions and then Edit code
  3. Open the cart.liquid file and locate the line <div id="storePickupApp"></div>
  4. Find and replace <div id="storePickupApp"></div>with the following code:
    {% assign cart_contains_gift_card = false %}
    {% assign cart_contains_physical_items = false %}
    
    {% for item in cart.items %}
     {% if item.product.handle contains "gift-card" %}
       {% assign cart_contains_gift_card = true %}
     {% else %}
       {% assign cart_contains_physical_items = true %}
     {% endif %}
    {% endfor %}
    
    {% if cart_contains_physical_items %}
    <div id="storePickupApp"></div>
    {% endif %}
  5. Click Save


Additional notes

Now when a customers shopping basket contains only a gift card the Store Pickup + Delivery widget won't be displayed. Your customers can proceed to the checkout process as normal. 

If your customers basket contains both a gift card and another physical item the Store Pickup + Delivery widget will appear.

A
Andrew is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.