Buy More Save More (BMSM) is a feature within the Rebuy Smart Cart that enables shoppers to receive discounts when they buy more items from a store. To use BMSM, the Smart Cart must be live. Buy More Save More cannot be implemented outside of the Smart Cart, that would require a customization to be implemented by you.
Currently, if you use Buy More Save More, you must select individual products for each tier which could be tedious if you have many products to add. This document will outline a workaround for that while we work to enhance the feature to allow for more flexibility.
Let's get started with implementing the Buy More Save More feature within the Rebuy Smart Cart:
Instructions
Step 1: Enable Buy More Save More
From the Rebuy Admin, open the Smart Cart you are working in and toggle on the Buy More Save More feature.
Step 2: Configure Deals
Next, configure the BMSM deals. You are able to specify different “quantity buys” for shoppers, such as “Buy 2 items, get 5% off” or “Buy 3 items, get 10% off”. Simply create a new deal and specify the conditions of the offer.
Disclaimer: Shopify Scripts
If you're looking to leverage Shopify Scripts to handle your Buy More Save More (BMSM) discounting, you need to select at least one (1) product when configuring the BMSM settings. However, if you plan to use Shopify Discount codes to handle the discounting, you can leave the selected products option blank.
Step 3: Saving your settings
After setting up your BMSM configuration, ensure you click save before moving on.
Step 4: Discounting the Buy More Save More Feature
If you’re looking to take advantage of Shopify’s Discounts feature in combination with the Buy More Save More feature, we have some simple guidelines to help you get started. Please remember to add ALL of your products, and consider these instructions carefully.
Set Up Shopify Discounts
To begin, follow the link below for detailed instructions on how to set up Shopify Discounts. Then proceed to Step 5.
Leverage Shopify Scripts
If you’d prefer to use Shopify Scripts, select the “Generate Discount Script” button which will automatically generate and copy the script for you.
Editing Your Buy More Save More Script
You'll need to make a small edit to the Script. Near the bottom of the Script, you'll need to delete four lines of code from the "Campaigns" array.
Based on the example above, you would need to delete lines 559, 560, 561, and 562. Your line numbers may vary but it will always be the ProductIdSelector.new()
and the lines between it that need removing.
Once complete the Script should look like this.
Step 5: Adding code to Smart Cart
The final step is to add the below code to the Smart Cart > Advanced Settings > Ready section. This code will automatically add the Buy More Save More buttons to products as they're added to the Smart Cart.
/* Enable BMSM for all products in Smart Cart */
function everyItemIsBMSM () {
setTimeout(() => {
/* pull the cart items */
const items = Rebuy.SmartCart.items();
items.forEach(item => {
/* ensure the current item is NOT already in BMSM */
if (!Rebuy.SmartCart.settings.buy_more_save_more.discount_products.find(discountedItem => discountedItem.product_id === item.product_id)) {
console.log(`ADDING ${item.title} TO BMSM`)
/* create a new BMSM object from the current item */
const newBMSMItem = {
json: {
admin_graphql_api_id: item.product.admin_graphql_api_id,
body_html: item.product.body_html,
cache_info: item.product.cache_info,
collection_ids: item.product.collection_ids,
created_at: item.product.created_at,
handle: item.product.handle,
id: item.product.id,
image: item.product.image,
link: item.product.link,
options: item.product.options,
owner: item.product.owner,
product_type: item.product.product_type,
published_scope: item.product.published_scope,
status: item.product.status,
tags: item.product.tags,
template_suffix: item.product.template_suffix,
title: item.product.title,
updated_at: item.product.updated_at,
variants: item.product.variants,
vendor: item.product.vendor
},
product_id: item.product_id,
quantity: item.product.quantity,
variant_ids: []
}
/* push the new obj into the BMSM array */
Rebuy.SmartCart.settings.buy_more_save_more.discount_products.push(newBMSMItem)
} else {
console.log(`${item.title} ALREADY HAS BMSM`)
}
})
}, 400)
}
everyItemIsBMSM() /* runs on page load */
document.addEventListener('rebuy:cart.change', everyItemIsBMSM) /* runs on cart change */
The final result will be all items in Smart Cart will show the Buy More Save More buttons and be discounted due to either the Shopify Script or the Shopify Discount you implemented within your Shopify Admin.
Step 6: Hiding BMSM buttons for certain products
Following this help doc, all products should now show the Buy More Save More buttons when added to Smart Cart. However there might be some products (gifts, seasonal, etc) you don't want available for Buy More Save More.
To remedy this you can tag those products (in Shopify) and then use CSS to hide the Buy More Save More buttons for any product with that tag.
Product tags from Shopify appear as classnames on products in Smart Cart. If your product is tagged "winter" for example, in Smart Cart the winter tag will be the classname tag-winter
. All product tags will be classnames that begins with tag-
so you can selectively target specific items in Smart Cart with CSS.
Using the winter tag as an example, this is the CSS needed to hide the BMSM buttons for items tagged as winter in Shopify.
.tag-winter .rebuy-cart__flyout-item-buy-more-save-more {
display: none;
}
If your product was tagged "promotional" that would turn into the classname .tag-promotional
and the CSS would be this.
.tag-promotional .rebuy-cart__flyout-item-buy-more-save-more {
display: none;
}