Smart Cart Discounting with Shopify Discount Codes
The Smart Cart supports various types of Shopify discount codes, allowing your customers to input these codes directly in the cart to see their discounts before proceeding to checkout. Here are the Shopify discount types that are supported by the Smart Cart:
Order Discounts: Discounts that apply to an entire order.
Product Discounts: Discounts that apply to a single product in an order.
Buy X, Get Y Discounts: Discounts based on the total number and type of products in an order.
Customer-Specific Discounts: Discounts that are specific to certain customers or customer segments.
Free Shipping Discounts: Discounts that reduce the shipping price to $0, making shipping free for the customer.
Important Information!
We Recommend Enabling the Storefront API
For the best discounting experience, we highly recommend enabling the Storefront API (outlined below). Here’s why:
Accurate, Real-Time Discounting: The API ensures that discount codes are validated instantly, preventing errors and delays during checkout.
Support for Multiple Discounts: It allows your customers to apply multiple discounts at once, enhancing their shopping experience.
Improved Checkout Process: Real-time feedback helps customers know immediately if their discount code is valid, reducing confusion and improving satisfaction.
The Storefront API is only available with v2 Smart Carts. If you're using an earlier version, you'll need to upgrade to v2 Smart Cart to access this feature.
⚠️ Issue: Products Not Removed from Cart After Discount
If you're NOT using the Storefront API, you might notice that products which no longer qualify for a discount (like a free gift) are not being removed from the cart after the discount is applied. This happens because the discounting method you're using is deprecated.
To fix this issue and streamline your discounting process, we strongly recommend enabling the Storefront API. It will ensure:
Discounts are applied correctly in real time.
Products are removed from the cart when they no longer meet the discount criteria.
A cleaner, more robust discounting function overall.
🛠️ Alternative Workarounds
If enabling the Storefront API isn’t an option, consider these workaround tactics:
Flag Orders for Manual Review
Set up a system to flag orders that don’t qualify for the free gift or discount, so you can manually review and correct them later.Adjust Discount Thresholds
Raise the discount or free gift threshold so you're comfortable with the possibility of the discount being applied in edge cases, even when it’s not strictly valid.
Pre-requisites
Create Discounts in Shopify: Use the Shopify Admin portal to create various types of discounts such as Order Discounts, Product Discounts, Buy X Get Y Discounts, Customer-Specific Discounts, and Free Shipping Discounts.
Enable Discounts: Make sure to enable the discounts you've created so that they are active and ready to be applied by customers.
To utilize these discounting features with the Smart Cart, you'll need to create and manage your discounts within the Shopify Admin portal. The Smart Cart simply displays the discount codes that you have set up and enabled in Shopify. It does not perform the discounting action itself.
Warning: 🚫 When running other Shopify Discounts in parallel with a Rebuy Shopify Functions discount, you will need to set your other discounts to be combinable to ensure that they do not override Rebuy's Shopify Functions discounts. While Rebuy's discounts are automatically set to combine, Rebuy cannot control the settings of your other Shopify Discounts.
Additional Note: To ensure discount compatibility, navigate to admin.shopify/discounts and verify if the discounts are set to combine. If a discount fails to combine (e.g., free gifts tied to thresholds), this might block eligibility for other promotions. Always review discount configurations to allow stacking where necessary.
To change your Shopify Discount combination settings, navigate to the specific discount's Combinations settings within your Shopify Admin and enable the appropriate combination option(s):
For more information on Discount combinations, please refer to Shopify's documentation here.
Step-by-Step Guide to Integrate Shopify Discounts with Rebuy Smart Cart
Create Discounts in Shopify
Log into your Shopify Admin.
Go to "Discounts" and select "Create discount."
Choose the discount type (e.g., Order, Product, Buy X Get Y).
Set up the discount details (percentage off, fixed amount, etc.).
Enabling Discount Codes and Storefront API in Rebuy:
Log into your Rebuy Admin.
Navigate to Smart Cart settings.
Click 'add component' in the footer section.
Click on the 'Discount Code Input' option.
Once enabled, the Storefront API setting will automatically be enabled as well. This ensures that:
Discount calculations are done in real time within the cart.
Customers can apply multiple discounts at once.
Note: You can disable the Storefront API setting if desired, but it is recommended for accurate discounting. You can read more about this below.
Save your settings.
What is the Storefront API?
The Storefront API is a powerful feature of Shopify that allows for real-time validation of discount codes, providing an enhanced shopping experience for your customers. Here’s why it matters:
Real-Time Discount Validation: Discount codes are validated instantly, ensuring accuracy without delays.
Complex Discount Logic: Supports multiple discounts at once, even complex discount rules, making sales and promotions more flexible.
Instant Feedback: Customers receive immediate feedback on whether their discount codes are valid or not, improving the checkout experience.
With the Storefront API enabled, you ensure that discounts are applied correctly and customers are always kept in the loop, providing a smooth, transparent checkout process.
Configure Discount Language Settings
In Rebuy Smart Cart settings:
Set the Discount Code Label (e.g., "Enter Discount Code").
Customize the Discount Button Label (e.g., "Apply Discount").
Specify the Discount Invalid Message (e.g., "Invalid Discount Code").
Rebuy's Native Discounting Features
Rebuy offers configurable discount features to streamline the application of promotions such as tiered discounts, percentage reductions, and free products within the Smart Cart. Below is a comprehensive guide to setting up and resolving common issues related to discount settings.
Setting Up Discounts
Widgets: In each widget’s Discount tab, you can set fixed or percentage-based discounts quickly, allowing for effortless customization of your promotional strategies within each widget.
Tiered Progress Bar in Smart Cart: Within the Smart Cart, the Tiered Progress Bar enables you to set up promotions that reward customers as they reach specific cart milestones. Use this tool to offer order discounts, free products, or even free shipping. For free shipping incentives, simply set up the relevant free shipping rates within Shopify, and Rebuy will take care of displaying them to customers in real time.
Buy More Save More in Smart Cart: The Buy More Save More feature within the Smart Cart incentivizes customers to increase their order size by offering discounts on multiple items. This is a powerful tool to encourage higher cart values and repeat purchases.
FAQs:
Q: Can multiple discount codes be applied in Smart Cart?
A: Yes, multiple discount codes can be applied in the Smart Cart, but only if the Storefront API is enabled.
When the Storefront API is active:
Multiple discount codes can be applied at once.
The API ensures that each discount is validated in real time and applied accurately.
However, without the Storefront API, only one discount code can typically be used per order. To get the most flexible and dynamic discount experience, we recommend enabling the Storefront API.
Q: How do I build a Shopify discount?
A: Visit the Shopify Help Center here for more information on creating and managing discount codes.
Q: What does the "Disable Discount Calculation" setting do?
A: This setting disables all discount calculations in the Smart Cart. When enabled, the cart will always show the message "Code Applied in Checkout" when a discount code is added. This can be helpful for stores with complex discount interactions. The discount code will still be applied during checkout.
Q: Why are products not being removed from the cart after discounts are applied?
A: This is typically caused by not using the Storefront API. The deprecated discounting method doesn't automatically remove products from the cart when they no longer qualify for the discount (e.g., a free gift). To resolve this, enable the Storefront API for real-time discount validation and automatic cart adjustments.
Q: Does Rebuy control how discounts stack?
A: No, Rebuy does not control how Shopify handles the stacking or overriding of multiple discount types, such as discount codes, Buy X Get Y (BMSM), and order-level discounts. Discount behavior is determined by Shopify’s logic.
Q: Is it expected that product-based discounts only appear at the line item level, while order-based discounts appear in the subtotal footer when the Discount Summary is enabled?
A: Yes, this is expected behavior. The Discount Summary displays order-level discounts only—hence the label “# order discounts applied.” This matches the experience in Shopify Checkout, where:
Order-level discounts are shown as a summary in the subtotal/footer area.
Product-level discounts are reflected directly in the line item prices and not summarized separately.
Shopify does not offer a separate summary for product-level discounts, so Rebuy mirrors that behavior.
Q: What is the Storefront API?
A: The Storefront API is a feature in Shopify that enables real-time validation of discount codes during checkout. It ensures discounts are applied correctly, including complex rules and multiple discounts. This API improves the customer experience by providing instant feedback on discount validity.
Q: What happens if I don’t enable the Storefront API?
A: Without the Storefront API, you may experience issues where discount codes are not applied correctly or where products that no longer qualify for discounts (like free gifts) remain in the cart. This occurs due to an outdated discounting method. Please enable Storefront API to resolve this.
Q: My discount code isn’t working as expected. What should I do?
A: If your discount code isn't applying correctly, check if the Storefront API is enabled. If it’s not, enabling the API will allow discounts to be validated in real-time, ensuring accuracy. If the API is enabled and you’re still having issues, double-check the discount conditions and thresholds in your Shopify settings.
Q: I’m using v1 Smart Cart, can I apply multiple discount codes?
A: No, v1 Smart Cart does not support the Storefront API, meaning multiple discount codes cannot be applied at once. To enable this feature, you will need to upgrade to v2 Smart Cart.
Q: Can I Use the Storefront API on a Legacy Smart Cart?
A: No, the Storefront API is not compatible with legacy Smart Carts (v1). It is only available with v2 Smart Cart. To take advantage of real-time discount validation, multiple discount code applications, and other advanced features, you will need to upgrade to v2 Smart Cart.