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