Subtotal

Location

Find the section that contains the subtotal. This section will include the subtotal price (see above) and, typically, the word "Subtotal" or "Total". The exact html varies per theme. To hide the subtotal section when the promotion summary is displayed, the subtotal section must be marked. The subtotal price must also be marked.

Snippet

Use the following class to mark the subtotal section:

limoniapps-discountninja-cart-subtotal

Use the following class to mark the subtotal price:

limoniapps-discountninja-cart-subtotal-price

Built-in order discounts

Snippet

Use the following CSS class to hide the section (or sections), that render order discounts. This avoids that the subtotal shows order discounts twice, once from the built-in discounts and once from Discount Ninja.

limoniapps-discountninja-whenpromotionsincart-hide

Example

The following example shows how all the elements come together:

<div class="other classes limoniapps-discountninja-cart-subtotal">
  ... Total ...
  <div class="other classes limoniapps-discountninja-cart-subtotal-price">
  ... {{ cart.total_price }} ...
  </div>
</div>
...
<div class="limoniapps-discountninja-whenpromotionsincart-hide">
  {%- if cart.cart_level_discount_applications.size > 0 -%}
    <ul class="discounts">
      {%- for discount in cart.cart_level_discount_applications -%}
        <li class="discounts__discount">
          {%- render 'icon-discount' -%}
          {{ discount.title }}
          (-{{ discount.total_allocated_amount | money }})
        </li>
      {%- endfor -%}
    </ul>
  {%- endif -%}
</div>

Last updated