Liquid, JavaScript, themes, sales channels
The theme we have purchased does not have a vendor name that we can code to click through to a collection for that vendor. It sits within a section where you have to choose Breadcrumbs, Collection or Vendor.
So I added a textline with a link to 'dynamic vendor' but this is not clickable.
I need it to:
a) Be clickable - currently it is not
b) When it is clicked to direct to a collection of the same name of the vendor not the query page that shopify generates.
Its the by VENDOR/ by FYG Home shown above I need to code.
Can anyone assist? Its driving me bonkers. I have a little coding knowledge mainly around css styling but I really want to learn more technical knowledge of liquid.
Solved! Go to the solution
This is an accepted solution.
I managed to achieve it in the end!
This worked for Palo Alto in product-grid-item.liquid
<a class="vendor__link" href="/collections/{{ product.vendor | handleize }}"> {{ product.vendor }} </a>
@GW_BAB wrote:The theme we have
What theme. What website.
So I added a textline with a link to 'dynamic vendor' but this is not clickable.
Where did you add code a dynamic-source,which file.
Keep always in mind others do not see what you see or know what you know.
Communicate in concrete terms don't leave others to guess when troubleshooting anything in life.
Always provide relevant context so others can understand, inspect or reproduce issues.
Make sure any links are publicly accessible by testing in an incognito window to see how another person would encounter it.
This will drastically increase the chances of a solution.
Guesswork, from the screenshot that would be in the product templates sections which varies wildly by theme e.g. sections/product.liquid or sections/main-product.liquid or even in snippets snippets/product-info, etc
In that file find "product__subheading" and it's vendor output and try liquid like the following
{{ product.vendor | link_to_vendor }}
https://shopify.dev/docs/api/liquid/filters/link_to_vendor
That's for just products , for products in a collection navigation url, e.g. /collections/all/product/producthandle , use the within filter
https://shopify.dev/docs/api/liquid/filters/within
Good Luck.
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
This is an accepted solution.
I managed to achieve it in the end!
This worked for Palo Alto in product-grid-item.liquid
<a class="vendor__link" href="/collections/{{ product.vendor | handleize }}"> {{ product.vendor }} </a>
You can mark your own posts as a solution.
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
User | RANK |
---|---|
36 | |
30 | |
12 | |
11 | |
8 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023