Hello Shopify exports
I added store name variable at product description and it’s success working well
{{ product.description | replace: '[shop_name]', shop.name }}
but I want to make it click able when I click it should navigate to store url I tried below code but it not success
{{ product.description | replace: '[shop_name]', shop.name link: shop.url }}
can please help me to solving that
Best regards
Osama
Check your syntax, missing a pipe character and wrong filter name
https://shopify.dev/docs/api/liquid/filters/link_to
{{ product.description | replace: '[shop_name]', shop.name | link_to: shop.url }}
Hi @osamaboshi
You can use the below code to get the exact output you want
{% capture shopname %}
{{ shop.name }}
{% endcapture %}
{{ product.description | replace: '[shop_name]', shopname }}
1 Like
This make all Description paragraph clickable
Hi @osamaboshi
You can apply my code because it is already checked and working.
Yes , Correct
I test it and it’s working, and I apply it
But I was try to find code with one line
Thank you for your efforts
I tried to export products to csv file it show the variable [shop_name] at Body (HTML) instead of text of shop name
@osamaboshi
Exporting the products will not convert the [shop_name] to the link. The liquid code will output on the front end and will not convert at the back end. Exporting will create a copy of data to CSV only.