Articles on: Popular Use cases

Hide/Disable widget for certain products

This is used to hide the widget for certain products which do not require date or delivery method selection.
E.g: gift cards

NOTE: If a customer adds the product to the cart along with another product for which you want to hide the widget, then the widget will be visible.

Easy Way - (Recommended)



STEP 1: Go to product overrides settings then click on add an override.




STEP 2:

Enter the SKUs of the products for which you want to hide the widget.
Enable the hide widget checkbox as shown below.


visibility override

This will hide the widget if any of the product with given SKU is there in the cart.

Advanced Way - Optional



You can hide the widget based on dynamic conditions by editing your liquid template of cart.

Following is one example where we are hiding the widget if one of the product contains HIDE_DATE_WIDGET tag.

{%-capture 'carttags' -%}
  {%- for item in cart.items -%}
    {{item.product.tags}}
  {%- endfor -%}
{%- endcapture -%}

{%- if carttags contains 'HIDE_DATE_WIDGET' -%}
  <div id="birdchime-slots-box" class="birdchime-slots-box-hide"></div>
{% else %}
  <div id="birdchime-slots-box"></div>
{%- endif -%}


This is highly flexible and powerful way to customize the enablement or disablement of the widget. Based on the requirement you can tailer down the conditions.

{% assign hide_widget = true %}

{%- for item in cart.items -%}
  {%- unless item.product.tags contains 'HIDE_DATE_WIDGET' -%}
   {%- unless hide_widget -%}
     {% assign hide_widget = false %}
   {%- endunless -%}
  {%- endif -%}
{%- endfor -%}


{%- if hide_widget -%}
  <div id="birdchime-slots-box" class="birdchime-slots-box-hide"></div>
{% else %}
  <div id="birdchime-slots-box"></div>
{%- endif -%}


Need Help?



If you are facing issues with the setup like the slot picker not appearing or the slots not working as per your requirement. We provide setup assistance for free. Please ping us via in-app chat bubble or mail us at support@birdchime.com for setup assistance.

Updated on: 12/04/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!