How to fix this error

Highlighted
New Member
1 0 0

Hi all, 

Hoping someone can help here as I've spent days trying to figure it out and have reached out to customer support but no luck yet.  

Problem:  Variants (color, size, etc) not showing up on website.  

Background:  I have a number of products that have variants assigned.  Although I am successfully able to save the variants under admin, they do not show up on the website (customer interface).   I understand there may be something wrong with my product liquid file, but I have not been able to identify the problem.  In discussions with Shopify support they have also not been able to determine the cause.   Reverting to a prior version of the file does not correct issue as I am not sure what changed or when it occurred but the oldest version still does not correct the problem.   I have had these same products with variants a while back so I know I am doing that side of it right.   It was suggested that I upload a new theme or reload the current but to me that's like formatting a hard drive and I don't want to do that unless it's last option.   
here’s a copy of my product theme code ... I’m new to this and would appreciate the help 

here’s the copy ! 

{% comment %}

  The contents of the product.liquid template can be found in /sections/product-template.liquid

{% endcomment %}

 

{% section 'product-template' %}

{% section 'product-recommendations' %}<div class="yotpo yotpo-main-widget" data-product-id="{{ product.id }}" data-name="{{ product.title | escape }}" data-url="{{ shop.url }}{{ product.url }}" data-image-url="{{ product.featured_image | product_img_url: 'large' |replace: '?', '%3F' | replace: '&amp;','%26'}}" data-description="{{ product.description | escape }}" data-price="{{ variant.price | money_without_currency }}" data-currency="{{ shop.currency }}"></div<script text="text/javascript">

  var _learnq = _learnq || [];

 

  var item = {

    Name: {{ product.title|json }},

    ProductID: {{ product.id|json }},

    Categories: {{ product.collections|map:'title'|json }},

    ImageURL: "https:{{ product.featured_image.src|img_url:'grande' }}",

    URL: "{{ shop.secure_url }}{{ product.url }}",

    Brand: {{ product.vendor|json }},

    Price: {{ product.price|money|json }},

    CompareAtPrice: {{ product.compare_at_price_max|money|json }}

  };

 

  _learnq.push(['track', 'Viewed Product', item]);

  _learnq.push(['trackViewedItem', {

    Title: item.Name,

    ItemId: item.ProductID,

    Categories: item.Categories,

    ImageUrl: item.ImageURL,

    Url: item.URL,

    Metadata: {

      Brand: item.Brand,

      Price: item.Price,

      CompareAtPrice: item.CompareAtPrice

    }

  }]);

</script>

 

 

0 Likes