Apply Discounts at cart

Highlighted
Explorer
60 4 4

 <div class="discounts">
{%- if cart.cart_level_discount_applications != blank -%}
<p class="onsale">{{ 'cart.general.discounts' | t }}</p>
<ul>
{%- for discount_application in cart.cart_level_discount_applications -%}
<li class="onsale"><i class="fa fa-tag"></i> {{ discount_application.title }}
(-{{ discount_application.total_allocated_amount | money }})</li>
{%- endfor -%}
</ul>
{%- else -%}
{% if cart.total_discounts > 0 %}
<div class="cart_savings">
<h4 class="onsale"><em>{{ 'cart.general.savings' | t }}</em></h4>
<h4 class="cart-savings-amount onsale"><em>{{ cart.total_discounts | money }}</em></h4>
</div>
{% endif %}
{%- endif -%}
</div>

0 Likes
Highlighted
Tourist
8 0 1

Is it possibe you could help me understand where to put the code? i can use automatic discounts if that is more simple.

0 Likes
Highlighted
Shopify Partner
194 2 11

 Hi @snakizzel

I understand the situation you are in. We are Autoketing team, offering an app Upsell Cross-sell Smart Tool that may be helpful for you. The discount will appear right away in the product that customers are purchasing. This app also helps you sell more and more products with cross-sell and upsell tactics. 

Here are the link of the app: https://apps.shopify.com/upsell-cross-sell-smart-tool?utm_source=ecommerceuniversity&utm_medium=foru...

0 Likes
Highlighted
New Member
10 0 0

 

To show a discount box in the cart you need to make ajax query to checkout and then create a hidden div. Append html of the checkout there and then parse amounts. Also, there are some apps which add this functionality. You may check for instance this one:

https://apps.shopify.com/discount-in-cart

 

It works both with a cart drawer and a cart page. Also has automatic installation. 

0 Likes