Coding Help - Link Vendor Name to a Collection

Solved
GW_BAB
Shopify Partner
14 1 1

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.

 

GW_BAB_0-1697300159975.png

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. 

 

Accepted Solution (1)
GW_BAB
Shopify Partner
14 1 1

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>

View solution in original post

Replies 3 (3)
PaulNewton
Shopify Partner
5931 537 1240

 

 


@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


GW_BAB
Shopify Partner
14 1 1

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>

PaulNewton
Shopify Partner
5931 537 1240

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