Offers: Integrating Widgets
Learn how to add the Intelligems Offer Quantity Buttons to your product pages and Offer Progress Bar to your cart.
Last updated
Learn how to add the Intelligems Offer Quantity Buttons to your product pages and Offer Progress Bar to your cart.
Last updated
Intelligems offers quantity buttons for product pages so customers can quickly add multiple units to cart and achieve various discount tiers.
Intelligems offers a progress bar for Shopify carts and slide-out carts that will show your customers how much more they need to purchase to achieve specific discounts, prompting them to buy more to get the best deal without ever leaving their cart. See below for an example of what this looks like!
You'll need the Intelligems JavaScript snippet installed in your theme to render the Quantity Buttons & Progress bar. If you haven't already added it, see our integration guide here.
Paste the following code snippet into your Shopify theme code in the theme file that renders your product pages where you want the quantity buttons to go. It should be in the <form type="/cart/add">
.
You can customize the Intelligems Offer quantity buttons in the Widget Library located in the left menu. Stylizing options include:
Button styles
Button primary, secondary and border colors
Customizable for both desktop and mobile
Note that quantity buttons will only reflect your store's default currency, so if you are choosing to use quantity buttons for your Offer Personalization or Offer test, you should also set up targeting for your store's default currency.
Paste the following code snippet into your Shopify theme code, in the theme file that renders your cart. This file may be called something like cart.liquid
, slideout-cart.liquid
, cart-template.liquid
, etc. We recommend adding this near to the top of the cart in most instances.
If you already have a progress bar, remember to comment out the existing progress bar to avoid showing two!
There are a few different customizations you can make to the progress bar. See more on each of the options below.
You can customize the Intelligems Offer progress bar in the Widget Library located in the left menu, or by selecting 'Edit Bar Style' while setting up a new offer modification and toggling the progress bar on. Stylizing options available include:
Bar styles
Bar color for active and inactive
Bar background color
Breakpoint color for active and inactive
Container background color
Tooltip background color
Customizable for both desktop and mobile
In addition to customizing the look and feel of your progress bar, you can also customize what messaging appears along with it. The first step in doing this is customizing the variables you will use. The variables are the words that can be put anywhere within your messages and will be filled in dynamically with the correct value when rendered within the template string. All variables have default values that we will fall back on if you leave that option blank.
There are four variables:
Unit Name (#unitName): The name of your items.
The default value for this is 'items'.
Ex. 'Buy 2 more packs to get 10% off' or 'Buy 2 more bars to get 10% off'.
More (#more): The word in place of 'more'.
The default value for this is 'more'.
Ex. 'Buy 2 extra items to get 10% off' or 'Buy 2 additional items to get 10% off'.
Quantity (#quantity): This is the amount needed to qualify for the next discount tier. This is not customizable by users and is calculated by Intelligems according to whether the campaign is set up as an item or subtotal requirement.
Ex. 'Buy 2 more items to get 10% off' or 'Spend $10 more to get 10% off'.
Discount (#discount): This is the discount amount for a customer when they get to the next discount tier. This is not customizable by users and is calculated by Intelligems according to whether the campaign is set up as a currency or percentage discount.
Ex. 'Buy 2 more items to get $10 off' or 'Buy 2 more items to get 10% off'.
Once your variables are set up, you can setup your messages, which are the sentences that will appear above your progress bar. You can construct a message by stringing together words and variables. Variables can be accessed by typing '#' and then selecting from the preexisting list of variables. Variables can be placed wherever you want and can be used however many times. All messages have default values that we will fall back on if you leave that option blank.
There are three messages:
Buy More: The sentence that will be rendered when there are discount tiers to unlock. It will render the next tier that the customer is eligible for.
The default value for this is 'Buy #quantity #more #unitName to get #discount off'.
Ex. 'Buy 2 additional packs to get 10% off' or 'Spend $10 more to get $5 off'.
All Tiers Unlocked: The sentence that will render in place of the 'Buy More' message when a user has unlocked all tiers. This will also render below the progress bar in addition to the 'Buy More' message for each individual tier accomplishment.
The default value for this is:
If all tiers have been unlocked, the default value is 'Congratulations, you’ve unlocked #discount off'. This will render above the progress bar.
If at least one tier has been unlocked, but not all tiers have been unlocked, the default value is 'You now have #discount off'. This will render below the progress bar, while the 'Buy More' message renders above the progress bar.
Ex. 'Congrats! You've got 20% off!' or 'You have unlocked 5% off!'.
Tooltip: The sentences that will show on hover of each tier breakpoint in the progress bar.
The default value for this is:
If the minimum purchase requirement or tier type is 'Subtotal of items', the default value is 'Spend #quantity to get #discount off'.
If minimum purchase requirement or tier type is 'Quantity of items', the default value is 'Buy #quantity to get #discount off'.
Ex. 'Buy 3 to get $10 off' or 'Spend $50 to get 10% off'.
If you use Rebuy for your slide out cart, you will need to follow these steps to add the Offer progress bar.
Create a Rebuy custom smart cart template. Follow this article for instructions.
Edit the template to replace the Rebuy progress bar with the Intelligems Offer progress bar. See Step 1 above.
Add the subtotal class to the progress bar settings in the Intelligems app. See Step 2 above.