Venture | *BUG* Cart: "Compare at price" not showing

Highlighted
New Member
1 0 0

Any product set to be on 'SALE' ('Compare at Price' = $119.99 and 'Price' = $60.000) is not reflected in the shopping cart using the Venture theme.

 

You can easily replicate this with any store running Venture, including Shopify's demo store:

1. Go to the 'Venture theme' page on Shopify and add any product on sale to basket, then click 'View Cart'

2. In the shopping cart you cannot see if a product is on sale (no badge, tag, $119.99, nothing)

 

This seems to be a theme/shopify integration bug, because there is code in the cart-template.liquid to display the compare price accordingly:

 

cart-template.liquid: Lines 53 to 72:

 

<td class="cart__cell--total">
    {%- if item.original_line_price != item.final_line_price -%}
        <span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
        <del class="cart__item-total">{{ item.original_line_price | money }}</del>
        <span class="visually-hidden">{{ 'products.product.sale_price' | t }}</span>
        <span class="cart__item-total">{{ item.final_line_price | money }}</span>
    {%- else -%}
        <span class="cart__item-total">{{ item.original_line_price | money }}</span>
    {%- endif -%}
    [...]
</td>

 

 

Using the Glory Boxing Gloves from Shopify's demo store, the 'Compare at price' is set to $119.99 and 'Price' is set to $60.00. This should enter the first IF block, since the 'original price' is not equal to the 'final price'.

 

However, the second line of code in the snippet (or line 54 in the file) is never true for some reason:

 

{%- if item.original_line_price != item.final_line_price -%}

 

I printed both variables on my store and found that the problem is with:

 

item.original_line_price

 

item.original_line_price incorrectly returns the SALE value - 60.00. Which is why the IF block never gets executed and the code jumps directly to the ELSE condition and thus hiding the 'Compare at price'.


Anyone have any idea why item.original_line_price does not return the correct value and how to fix this please?

0 Likes
Highlighted
New Member
2 0 0

It is not a bug , they dont consider compare at price at all. 

The original price is the price and not compare at price.

The cart block is only for automatic discounts.

 

I solved this using this line, add it above the if block and it will work fine ;)

<del class="cart__item-total">{{ item.variant.compare_at_price | money }}</del>
0 Likes
Highlighted
New Member
2 0 0
<del class="cart__item-total">{{ item.variant.compare_at_price | times:item.quantity | money }}</del>

 Modified to this.

But it fails to refresh when the quantity is increased in the cart.

0 Likes
Highlighted
New Member
1 0 0

This will make it update on quantity change:

 

 

{{ item.variant.compare_at_price | times: item.quantity | money }}

 

 

0 Likes
Highlighted
New Member
2 0 0

Isn't this the same code used above, when i use it it doesnt update automatically when the quantity changes or when the user updates the page - how do i solve this?

0 Likes
Highlighted
New Member
2 0 0

I meant - If i change the quantity the price doesnt automatically change unless i update the whole page

0 Likes
Highlighted
New Member
2 0 0

I got same issue. Anyone manage to solve this?

Currently digging around the JavaScript lol

0 Likes