Follow

Insert Liquid code into collection page (to show Gifts on catalog page)

Normally When you install, the app will automatic insert the liquid code to your theme. However in a few case, the app could not insert correctly, so you can do it manually following this instruction.

It will be a file in the Snipsets folder, for example: product-loop.liquid, product-grid-list.liquid or even collection.liquid.

Find the code that shows the image. It looks like.

<img src="{{ product.featured_image | product_img_url: 'large' }}" alt="{{ product.title | escape }}" />

Then add this code below:

<div name="secomapp-fg-image-{{ product.id }}" style="display: none;"> {{ "icon-freegift.png" | asset_url | img_tag: "Free Gift", "sca-fg-img-label" }} </div>

Add this code before or after details tag (<div class="details">)

<div class="sca-fg-cat-list" style="display:none;" name="secomapp-fg-data-{{ product.id }}" prod-show='list'> </div>
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk