Dawn Theme : Show Compare price in cart (and if possible discount from compare price)

fostino
Excursionist
16 1 11

Dawn Theme : Show Compare price in cart (and if possible discount from compare price)

also in subtotal calculation

Replies 8 (8)

KetanKumar
Shopify Partner
36843 3636 11978

@fostino 

yes please try this code

https://liquify.design/shopify-developer-guide-display-percentage-discount-shopify/

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
fostino
Excursionist
16 1 11

@KetanKumar i want to show compare price on cart page

ashdance333
Tourist
3 0 0

Hello, I'm using the Dawn theme also. 

How can I remove the 'Compare At' price on all products? I do not want the strikethrough price to show anywhere.

 

I have deleted the Compare At option from all products in the bulk editor, and it removed the "Sale" tag but still shows the compare at price.

Then I tried entering a $0 Compare Price for each product variant, and now it just shows the main price twice...

 

Please help, and thanks 🙂

Anngee
Visitor
2 0 2

Hello,

Try this... I am using Dawn too. I played around with it today and finally what I found out is (at  least it worked for me) when going to your "All Products", click on "All" then "Edit Products", match all the prices on "Price" and " Compare Prices" without deleting them, just make sure it the SAME PRICE NUMBER" for both variants then SAVE. It worked for me. Hope it works for you too, good luck... let me know 🙂

ashdance333
Tourist
3 0 0

Hey Anngee, thanks so much for replying! 

I tried what you described and it didn't quite work.. Now it displays 3 of the exact same price and the middle one is crossed out.. *insert shrug emoji* lol I'm going to go back and make sure I implemented your advice correctly.

I've been able to figure most things out, but I've been stumped on this one for days. I so appreciate your help. Hopefully there will be more support for this theme soon.

Anngee
Visitor
2 0 2

Hi ashdance333,

I'm so sorry it didn't work out for  you. Mine is still up and running as I hope lol. I am sure you will get it soon. Good luck.

Anngee

ashdance333
Tourist
3 0 0

Thanks again Anngee! What ultimately did the trick for me was replacing the "component-price.css" code with the original theme code.

I searched for "price" in the Edit Code section, and reverted those code files (just 2) back to their original versions. Component-price.css was the one that did it tho.

The code file wasn't giving me the option to see older versions, so I had to download an empty Dawn theme, copy and paste the original code from that.

I know you're good to go, but wanted to leave my solution in case someone searches this. 

I'm so glad we're both up and running! XD

-Ashley

poojasingh
Shopify Partner
1 0 0

May be it will help,
<td class="cart__final-price text-right small--hide" data-cart-item-line-price>
{% if item.product.compare_at_price_max > 0 %}
Regular Price: {{ item.product.compare_at_price_max | money }}
Discount: {{ item.product.compare_at_price_max | minus:item.final_line_price | money }}
<div {% if item.original_line_price != item.final_line_price %}class="hide" {% endif %}data-cart-item-regular-price-group>
Sale Price: <span data-cart-item-regular-price>{{ item.original_line_price | money }}</span>
</div>
{% endif %}
</td>