Pasting code to product template to display trust badges

Highlighted
Tourist
19 0 0

Hi there! 

I'm just wondering, where exactly should I paste the code with to image to my product.template.liquid code so it would display right under the product description?

I uploaded the image to assets and copy the address you can see in the image code below.

Thank you in advance!

<img scr="https://cdn.shopify.com/s/files/1/0474/5802/5623/t/2/assets/trust_badge.jpg?v=1601012851">      ----> the image

the template:

{% render 'product-template',
product: product,
description_style: section.settings.description_style,
image_position: section.settings.image_position,
image_container_width: section.settings.image_size,
section_id: product.id,
social: section.settings.social_enable,
thumbnail_position: section.settings.thumbnail_position,
thumbnail_arrows: section.settings.thumbnail_arrows,
video_looping: section.settings.enable_video_looping,
video_style: section.settings.product_video_style
%}

{% if settings.enable_product_reviews and settings.reviews_layout == 'full' %}
<hr id="Reviews-{{ product.id }}" class="hr--clear">
<div class="index-section product-reviews product-reviews--full">
<div class="page-width">
<div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>
</div>
</div>
{% endif %}

{% schema %}
{
"name": "Product pages",
"settings": [
{
"type": "select",
"id": "description_style",
"label": "Description position",
"default": "default",
"options": [
{
"value": "default",
"label": "Next to media"
},
{
"value": "full",
"label": "Below media"
}
]
},
{
"type": "checkbox",
"id": "social_enable",
"label": "Enable social sharing",
"default": true
},
{
"type": "header",
"content": "Media"
},
{
"type": "paragraph",
"content": "Learn more about [media types](https://help.shopify.com/en/manual/products/product-media)"
},
{
"type": "select",
"id": "image_position",
"label": "Position",
"default": "left",
"options": [
{
"value": "left",
"label": "Left"
},
{
"value": "right",
"label": "Right"
}
]
},
{
"type": "select",
"id": "image_size",
"label": "Size",
"default": "medium",
"options": [
{
"value": "small",
"label": "Small"
},
{
"value": "medium",
"label": "Medium"
},
{
"value": "large",
"label": "Large"
}
]
},
{
"type": "select",
"id": "thumbnail_position",
"label": "Thumbnail position",
"default": "beside",
"options": [
{
"value": "beside",
"label": "Next to media"
},
{
"value": "below",
"label": "Below media"
}
]
},
{
"type": "checkbox",
"id": "thumbnail_arrows",
"label": "Show thumbnail arrows"
},
{
"type": "checkbox",
"id": "enable_video_looping",
"label": "Enable video looping",
"default": true
},
{
"type": "select",
"id": "product_video_style",
"label": "Video style",
"default": "muted",
"options": [
{
"value": "muted",
"label": "Video without sound"
},
{
"value": "unmuted",
"label": "Video with sound"
}
],
"info": "Video with sound will not autoplay"
}
]
}
{% endschema %}

0 Likes
Highlighted
Shopify Partner
1080 169 194

Look for the product-template file instead. You will find the description code there.

Let me know! 

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help: contact@jhkcreate.com
K&J
0 Likes
Highlighted
Tourist
19 0 0

Screenshot 2020-09-25 at 09.02.51.png

It looks  to me like this is a product-template file? 

 

Thanks!

0 Likes
Highlighted
Shopify Partner
1080 169 194

Yes there is another one though, under Sections or Snippets. 

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help: contact@jhkcreate.com
K&J
0 Likes
Highlighted
Tourist
19 0 0

Thanks for that!

 

I did find that in snippets. However, after pasting it, it doesn't display anyway. Here's the code:

<div class="product-single__description rte">
{% render 'product-description-tabs', product: product %}
</div>

<img scr="https://cdn.shopify.com/s/files/1/0474/5802/5623/t/2/assets/trust_badge.jpg?v=1601012851">

{% render 'product-additional-content', product: product, section_id: section_id %}
{%- endunless -%}

0 Likes
Highlighted
Tourist
19 0 0

Could you please help me with that? What do you suppose I did wrong?

 

THank you!

0 Likes
Highlighted
Tourist
19 0 0

Hi JHKC, 

could you please check once more my answers and try to navigate me what could I possibly do wrong while pasting the code? I did it as described but the badges don't show up anyway. Thanks for your answer!

 

 

0 Likes