Q: I noticed that all turn 14 part numbers have a prefix in front of the manufacturer number for example vibrant is Vibxxxx. Is there a way to tag the vibrant products with the actual vibrant part number so that they show up in a search by keyword other than going though and doing it all manually? I am unable to have any of the vibrant products show up in a search on my website unless I include the prefix.
A: We include a Manufacturer Part Number tag on each product by default (you can turn tags on/off in the Content tab).
This can be used to include the MPN in the product description. Here is some sample code that can do the trick:
<ul class="product-tags">
{% for tag in product.tags %}
{% if tag contains 'MPN' %}
<li>Manufacturer Part Number: {{ tag | slice: 4,100}}</li>
{% endif %}
{% endfor %}
</ul>
This is based off of https://shopify.github.io/liquid/filters/slice/ and is inserted into the code for your Shopify theme under Actions- edit code. Where the code goes may vary from theme to theme but we tried it near the product title in the product-template.liquid section. This helps with the site search.
Also see demo video: https://www.youtube.com/watch?v=_HeAKHTELr0&t=51s
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article