sumonsbgc/shopify-recent-viewed-product

Dealing with Sold out Items

Opened this issue · 0 comments

Sold out items will appear as $0.00.

I am trying to figure out a way to get the price of the recently viewed item so I can be like

{%- if product.price == 0 -%}
<span class="price-item price-item--regular" >
Sold Out
</span >
{%- else -%}

           {% raw %}
           
                         <span class="price-item price-item--regular">{{if price_varies}} 
                          {{/if}}${Shopify.formatMoney(price)}</span>
           {% endraw %}

{%- endif %-}

This doesn't work because of product.price grabs the product price of the product you are on instead of the product on the card.