Skip to main content
All CollectionsSmart CartDiscounting & Buy More Save More
Enable Buy More Save More on all Products
Enable Buy More Save More on all Products

This will guide you on how to implement Buy More Save More for all products.

Jason Khan avatar
Written by Jason Khan
Updated over 2 weeks ago

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.

⚠️ WARNING: This workaround is only compatible with Shopify Automatic Discounts. It is not compatible with Rebuy's integration with Shopify Functions for discounting. Please ensure you have toggled off "Use Shopify Functions" in your Buy More Save More settings in the Smart Cart.


Instructions

Step 1: Enable Buy More Save More in Smart Cart

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 You need to select at least one (1) product (as a placeholder) when configuring the settings to ensure the BMSM editor does not show a "Please select at least one product for this discount" error that will prevent you from saving changes.


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.


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 object 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

// Runs on cart change
document.addEventListener('rebuy:cart.change', everyItemIsBMSM);

The final result will be all items in Smart Cart will show the Buy More Save More buttons and be discounted due to the Shopify Automatic 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;
}

You will also need to ensure that the product(s) you are looking to exclude from BMSM are excluded from the associated Shopify Automatic Discount within your Shopify Admin, as this will ensure that Shopify does not discount the product(s) in cart.

Did this answer your question?