Skip to main content

Data Sources And The Cart

This article will go over how you can dynamically display recommendations based on cart-based rules such as Cart Subtotal and count.

Strauss Van Wagenen avatar
Written by Strauss Van Wagenen
Updated over 3 weeks ago

These rules will only work for cart-based widgets. From the widget selections of the Rebuy Online Store this would be "Cart", "Shopify Checkout", "Recharge Checkout", "Shopify Thank You", "Recharge Thank You", "Post Purchase" and "Global" widgets. A "Product Page" widget does not have access to the cart object. The product page widget only has access to the product page that is currently being viewed.

  • Cart item count

  • Cart line count

  • Cart items with tag count

  • Cart items from collection

  • Cart Subtotal

Cart Item Count

This is referring to the exact amount of items that are in the cart including items that are the same. So if the customer has 2 of the same item and 1 of another item then that would evaluate to 3 total according to this rule. This is the total of all the items regardless of having duplicates of any items.


Cart Line Count

This is referring to the number of different items in the cart. This rule counts the number of unique line items in the cart, regardless of quantity.

Example:
If a customer has 2 of Item A, it counts as 1 (one unique item).


Cart Number of Items With Tags

This rule lets you apply tag-based conditions to either of these rules:

  • Cart Line Item Count

  • Cart Total Item Count

Once selected, you'll be able to add a "With Tag" condition, entering a specific product tag into the field provided. This is useful for targeting specific product types in the cart.

After selecting Cart Total Item Count or Cart Line Item Count you will be able to select Add Condition Cart Line Count which will result in a text field for you to type the single tag into the field.


Cart Number of Items From Collection

This rule lets you apply from collection conditions to either of these rules:

  • Cart Line Item Count

  • Cart Total Item Count

After selecting Cart Total Item Count or Cart Line Item Count you will be able to select Add Condition and select From Collection which will result in a drop-down menu.


Cart Subtotal

This is typically paired with a free gift with purchase type of widget but the same idea applies if you would like to use the cart subtotal rules for other display type widgets.

With this rule, we have three options. (In greater than, Is less than, Is equal to)

  • Is greater than refers to if the cart subtotal is greater than $XX.XX

  • Is less than refers to if the cart subtotal is less than $XX.XX

  • Is equal to refers to if the cart subtotal is exactly equal to $XX.XX

Example of "Is Greater Than"

This rule will return the specific product if the cart subtotal is greater than $50.00. This is commonly used with a Gift With Purchase where the customer has to spend a certain amount in order to receive the free gift.

Example of "Is Less Than"

This rule will display relevant products that are less than $10.00 where the return statement has "Product price is less than or equal to $10.00." This could be helpful at checkout where you do not want to display products that are expensive and require more investigation to feel comfortable to add on.

Example of combining "Is Greater Than" & "Is Less Than"

This rule will only match if the cart subtotal is greater than $35.00 and the cart subtotal is less than $50.00. This can be helpful if you have a free shipping threshold and you are pushing the customer to spend enough to get free shipping. This rule is commonly paired with a Smart Cart Cart Flyout widget especially when the free shipping bar is activated.


FAQs

Can I set up a cart rule that applies based on the number of items or subtotal from a specific collection or product type?

  • Currently, Rebuy’s cart rules do not support targeting collections or product types directly (e.g., "if a product from X collection is in the cart, apply a related discount"). You can set rules based on the quantity of specific products, but not by collection or type.

Did this answer your question?