Set up Multiple Discounts manually
This is about setting up for the first time to the cart page. Apply Multiple Discounts to a theme that you want to publish in the front end(such as Debut, Minimal, Boundless, Brooklyn, Express,...)
Before setting up your discount rules, you need add the code snippet to your cart page by following below steps.
Select a theme to be setup Multiple Discounts
Under Sales channel, click Online Store-> Themes
In Theme library section, select a theme to show Multiple Discounts. Then click Actions->Edit code
Open cart template
Under folder Templates or Sections , click cart-template.liquid or cart.liquid to edit code.
Add the code snippet
To display offers in the cart, insert text data-md-cart-page into top div/html element of opened code page
Ex:
To display Discounts to each cart item, find in the code page the for loop together with cart row, put data-md-cart-item-key="{{ variant_id }}" into cart row line
Ex1:
Ex2:
Customize the place that displays Each item price, then insert data-md-price-item into html element that shows price of each item
Ex:
In the same row of cart item display, customize the place displaying total price of each cart item, insert data-md-total-price-item into that Html element.
Ex:
Edit cart footer, find Html element that has cart__footer
or cart-footer
class, then insert data-md-cart-footer into it
Edit cart subtotal, find Html element that has cart__subtotal
or cart-subtotal
class, then insert data-md-subtotal into it
Customize the Shipping fee, find Html element that wraps value {{ taxes_shipping_checkout }}, then insert data-md-cart-shipping in to it.
Ex1:
Ex2:
To display liquid template for free items and possible offer items in the cart, add the code anywhere in your theme's cart-template.liquid.
Customize where to display Free items container, this code is pasted in your theme's cart-template.liquid.
Customize where to display Possible offer items container, this code is pasted in your theme's cart-template.liquid.
Example:
Last updated