Shopify linking product using SEO handle coding

0 votes

I followed the directions for the second way to tag a product to a blog

This is the website I used https://happypoints.io/shopify-add-products-to-blog-post-c2-stt-66/ This is the code that was entered {% assign my_description = article.content | split: '=== split content ===' %}

 {% assign  my_description_size = my_description.size | minus: 2 %}
  {{ my_description | first}}
 <div class="show-product-list">           
   {% if article.tags.size > 0 %}             
       {% for tag in article.tags %}
       {% paginate collections.all.products by 100 %}
       {%- for product in collections.all.products -%}
           {% if product.handle == tag %}
              <div class="product_item">
               {% include 'product-card-list' %} 
             </div> 
           {% endif %}
       {%- endfor -%}
       {% endpaginate %} 
       {% endfor %}          
   {% endif %}
 </div>
   {{ my_description | last}}

after following all the directions I received an error message saying

Liquid error (sections/article-template.liquid line 42): Could not find asset snippets/product-card-list.liquid

I am not sure why the product wont link to the blog using the seo handle. I have copied and pasted this code correctly and still getting this error

Collection code:

{% if collection.title == blank %}
  {% assign collection_image = blank %}
{% elsif collection.image %}
  {% assign collection_image = collection.image %}
{% else %}
  {% assign collection_image = collection.products.first.featured_media.preview_image %}
{% endif %}

{% unless collection.title == blank %}
  {% include 'card-image', type: collection_image, grid_style: grid_style %}
{% else %}
  <div class="card__image-wrapper">
    {% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %}
    {{ 'collection-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
  </div>
{% endunless %}

<div class="card__info">
  <h3 class="card__name h4">{% if collection.title != blank %}{{ collection.title }}{% else %}{{ 'homepage.onboarding.collection_title' | t }}{% endif %}</h3>

  {% if section.settings.show_description and collection.description != blank %}
    <div class="rte card__description{% if width == '2' %} card__description--padding{% endif %}">
      {{ collection.description | strip_html | truncatewords: 15 }}
    </div>
  {% endif %}
</div>
Mar 12 in Digital Marketing by Kichu
• 19,040 points
131 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Digital Marketing

0 votes
1 answer

How to over-ride meta data in Wordpress, using Squirrly SEO

if (is_archive()){ add_filter('sq_title', 'filter_product_wpseo_metadesc'); function filter_product_wpseo_metadesc($wpseo_metadesc){ ...READ MORE

answered Mar 1 in Digital Marketing by narikkadan
• 37,660 points
231 views
0 votes
0 answers

How to over-ride meta data in Wordpress, using Squirrly SEO

I currently have a Wordpress website using ...READ MORE

Mar 4 in Digital Marketing by Kichu
• 19,040 points
48 views
0 votes
0 answers

SEO indexing fails with lazy load images using Intersection Observer API

To improve my site performance I'm trying ...READ MORE

Mar 5 in Digital Marketing by Kichu
• 19,040 points
165 views
0 votes
1 answer

Setting a Custom SEO Title Using Yoast Wordpress SEO API

Firstly disable WordPress SEO by Yoast, then ...READ MORE

answered Mar 11 in Digital Marketing by narikkadan
• 37,660 points
299 views
0 votes
0 answers

Internationalize target country for SEO using language url path

I'm adding now Internationalization support for English ...READ MORE

Mar 13 in Digital Marketing by Kichu
• 19,040 points
69 views
0 votes
1 answer

Wordpress SEO : Semrush audit report

actually autoptimize, and Wp Rocket are the ...READ MORE

answered Mar 1 in Digital Marketing by narikkadan
• 37,660 points
102 views
0 votes
1 answer

Where can I obtain a list of User Agents for SEO bots?

add crawler user agents and that would ...READ MORE

answered Mar 1 in Digital Marketing by narikkadan
• 37,660 points
116 views
0 votes
0 answers

One Hot Encoding in Apache Spark

The following code that I wrote for ...READ MORE

Feb 11, 2020 in Apache Spark by Manish
• 120 points
2,092 views
0 votes
0 answers

PHP json encode - Malformed UTF-8 characters, possibly incorrectly encoded

I am using json_encode($data) on an array ...READ MORE

Jun 27 in PHP by narikkadan
• 37,660 points
1,544 views
0 votes
1 answer

Trouble with excel macros (possibly encoding?)

To solve your issue: Replace your macro names ...READ MORE

answered Sep 26 in Others by narikkadan
• 37,660 points
67 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP