Re: Link product vendor and product type on product page

Link product vendor and product type on product page

dangkhiem
Shopify Partner
26 0 10

Hello!

On the product page, I want to add a link that contains all the products with the same Vendor and product Type as the current product.
Currently I am using 2 pieces of code:
{{ product.type | link_to_type }} and {{ product.vendor | link_to_vendor }}. I want a link that contains products that satisfy both of the above conditions.
Example: The current product on the product page is "Roland RP107 Electric Piano". Product of Vendor Roland and product Type is Electric Piano.

I would like to have a link containing all the products whose Vendor is Roland and the product Type is Digital Piano.

My website: vietmusic.vn, theme: Dawn.
Thank!

Reply 1 (1)

dangkhiem
Shopify Partner
26 0 10

I have found a way. You can try if you want:
add "Custom liquid" => then insert this code:

<a href= "https://shopify.com/collections/all?filter.p.product_type={{ product.type }}&filter.p.vendor={{ product.vendor }}">{{ product.type }} {{ product.vendor }}</a>

Replace "shopify.com" with your domain name.