CART JSON doesn't include compare at price in item object

Highlighted
Tourist
11 0 2

I know your comment is really old now but how hilarious is it that this has still not been rectified... and the fact people have the cheek to ask why you'd want such a normal thing is ridiculous. You've probably moved (maybe ran away) on from Shopify now but just to let you know - in their big yearly talk they do, they announced they've now got robots in warehouses and are planning on making a Shopify bank!? .... maybe they should focus on building a proper platform instead, who knows xD

2 Likes
Highlighted
Tourist
3 0 1

@BlKOut wrote:

It's good for me I managed to make it all work perfectly ! 

For whom who are on Venture

Here the cart-template.liquid :

Hope you'll managed to make it works :D




Thank you! It worked near perfect for me.

Just this one small issue (Venture). The prices are duplicated on desktop only, but not on mobile which is great. Any idea why?

Screenshot (615) - Copy.png

1 Like
Highlighted
Shopify Expert
130 0 27

your theme probably has different price displays for the different layouts. You probably have to add a class or remove the duplicate for desktop. If you post a link to your store I can look and see. 

0 Likes
Highlighted
Shopify Partner
15 0 3

@Deme3 

You've got a div that contains these prices duplicated in your file, and this div doesn't appear on mobile, replaced by the good one cause of a css command for sure. Check if you've got two div for this price and replace it by the good one.

As @HandHugs  said, if you could post to us the link of your store, we'll easily find out what's happenin' :)

0 Likes
Highlighted
Tourist
3 0 1

@HandHugs @BlKOut 

Good looking guys. Yeah I'd figured there's a dupe somewhere and tried testing removing some stuff but to no success (not much of a code guy haha).

Store is https://www.doggy-universe.com/

0 Likes
Highlighted
Shopify Partner
15 0 3

@Deme3 

You're good finally, the code works well, prices at left display single item price, and prices at right display line item price (if you change quantity, left prices will remain the same but right prices will be updated). If you don't want to show twice the prices when the customers has 1 quantity of this item, set in your javascript to not show this left prices if the quantity is set to one ! 

Hope you're good with it ;)

0 Likes
Highlighted
Tourist
3 0 1

@BlKOut 

Darn now I feel kinda silly as I hadn't realized it was a single item + line item price type thing- thought the code just wasn't agreeing with the store somehow.


@BlKOut wrote:

If you don't want to show twice the prices when the customers has 1 quantity of this item, set in your javascript to not show this left prices if the quantity is set to one ! 


Is this a quick fix you'd be able to help with?.. like which part to change? I really haven't much clue what to do here aha.

0 Likes