Skip to main content
All CollectionsVarious and advanced settings
Adapt Functionality Based on Customer Tags or other Conditions
Adapt Functionality Based on Customer Tags or other Conditions
Updated over 6 months ago

While EliteCart functionality is generally set up within the app, you can adapt functionality based on conditions like

  • the page your customer is on

  • tags a logged-in customer might have

  • day of the week, time of day

  • locale of the customer

  • location of the customer

  • any other variables you can set via liquid

These are the variables you can set:

   <script>
window.eliteCartOverwrites = {
disableCart: true, // always disables analytics too
disableAnalytics: true,
hideUpsells: false,
hideAddons: true,
hideBanner: true,
hideRewardBar: true,
};
</script>

Example Wholesale Tag

Below is a liquid example code that disables EliteCart completely (your theme's cart or cart page will show instead) if a customer with tag "wholesale" is on the website. Note that the customer must be logged into their account.

{% assign isWholesaleCustomer = false %}

{% for tag in customer.tags %}
{% assign lowerTag = tag | downcase %}
{% if lowerTag == "wholesale" %}
{% assign isWholesaleCustomer = true %}
{% endif %}
{% endfor %}

{% if isWholesaleCustomer == true %}
<script>
window.eliteCartOverwrites = {
disableCart: true,
};
</script>
{% endif %}

Above code should be placed in your theme.liquid file, just before the closing of the body tag </body>

Note that even if you choose disableAnalytics or disableCart, we currently still track the order and order line item data, affecting e.g. the percentage of total orders that converted to upsells negatively.

Various Use Cases

1. Hide EliteCart for Wholesale Customers

Condition: Check if the logged-in customer is a wholesale customer.

Action: Hide whole cart, or specific parts of the cart.

Use the code example provided above to check for the “wholesale” tag and set the EliteCart variables accordingly.

2. Hide “Log in to get free shipping” Banner for logged in customers

Condition: Check if a customer is logged-in.

Action: Hide the banner.

4. Hide a banner that says "next day delivery" on Fridays, Saturdays and Sundays & from 4pm to midnight every day.

Condition: Use shopify liquid to check the day of the week. Beware of timezones if you sell internationally. See also here.

Action: Hide the banner

Did this answer your question?