How to add skus to all product descriptions using liquid snippet

Topic summary

A store owner with 3000+ products needs SKUs to appear in product descriptions to improve search functionality. Currently, when customers search by SKU, the correct product doesn’t always rank first in results—sometimes other products mentioning that SKU in their descriptions appear higher.

Initial Problem:

  • Liquid snippets only render correctly in custom blocks, not within the description block itself
  • Manually adding SKUs to 3000+ descriptions isn’t feasible

Current Status:

  • The user successfully got SKUs to display in descriptions
  • However, the search function still doesn’t prioritize products by their own SKU
  • Manually typing the SKU into descriptions does improve ranking, but dynamically inserted SKUs don’t have the same effect

Remaining Issue:
The search algorithm isn’t recognizing or weighting the dynamically inserted SKU text, so products still rank incorrectly. The user is now seeking help to make search results prioritize products matching their own SKU. Site uses Woodstock theme on allparts.com.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

I need to add the SKU to the product description text. I already have the SKU showing via the product info section, but I need it to go in the text for the product description. To be clear, not in a different tab or a different section, I need it in the main product description.

Most of our customers know our SKU numbers and when they type in the SKU in the search box, the main SKU is usually not the first option that comes up, sometimes, it doesn’t come up in the search results at all. I figured out, if the SKU is in the description, it will show as the first product in the search results. However, we have over 3000 products, so it isn’t feasible to type in the SKU in every product description, therefore, I wanted to use a liquid snippet, like so:

Allparts {% if product.selected_or_first_available_variant.sku != blank %} product # {{ product.selected_or_first_available_variant.sku }} {% endif %}

Or something similar, but it only renders it correctly when I add that liquid snippet to a custom liquid block, in which case, it is no longer in the description block. It only works when it’s in the description block. My website is allparts.com and for reference, one of the products that has this problem is EP-0055.

For this particular product, this is happening because this SKU is mentioned in the description of several kits that we offer. In the search results, the kits are coming up before the EP-0055. However, there are also other random products that coming up before the EP-0055 as well, I don’t know why.

1 Like

@michelleallpart
Sorry you are facing this issue,
It would be my pleasure to help you.
Please share your site URL,
I will check out the issue and provide you with a solution here.

As mentioned in the issue description above :blush: , the URL is https://allparts.com

Ok, I figured out how to make it render correctly but the search results don’t see it somehow… it still shows EP-0055 after all the other products. When I manually type in the sku its moved to the first item in the search results, which is what I want.

1 Like

I did, twice. :blush:

@michelleallpart oh wow that would be great

Did you have a chance to look at it yet? (https://allparts.com) We use the Woodstock theme. I figured out how to show the SKU in the descriptions so all I need help with now is making the SKU searched for come up as the first search result.