Shopify themes, liquid, logos, and UX
Hi All!
I appreciate the help anyone can provide! I'm looking to make the Vendor/Brand name from product pages clickable and lead to auto-populated collections by vendor. I'm using this code:
{% if product.vendor %}
<div class="vendor-name">
Brand: <a href="/collections/vendors?q={{ product.vendor | handleize }}">{{ product.vendor }}</a>
</div>
{% endif %}
The problem is, for single-word vendors, it populates just fine, but if a vendor name is more than one word, it leads to a 404 page. I'm sure it's just a small thing I'm missing, but any ideas there? Thanks again!
Solved! Go to the solution
This is an accepted solution.
Hi @MontanaGC 👋 Confirm if it's a url encoding problem, try manually replacing the space, or dashes, with the space url encoding: %20.
The vendor value is being put into a query parameter so it needs to be url encoded not handelize as that inserts dashes and the vendor name does not have spaces in it.
https://shopify.github.io/liquid/filters/url_encode/ , e.g. q={{ product.vendor | url_encode }}
If you need this debugged further or theme customization then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
This is an accepted solution.
Hi @MontanaGC 👋 Confirm if it's a url encoding problem, try manually replacing the space, or dashes, with the space url encoding: %20.
The vendor value is being put into a query parameter so it needs to be url encoded not handelize as that inserts dashes and the vendor name does not have spaces in it.
https://shopify.github.io/liquid/filters/url_encode/ , e.g. q={{ product.vendor | url_encode }}
If you need this debugged further or theme customization then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
This worked like a charm! Thanks, Paul!
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025