Solved

Getting Catalog item by custom info

  • 24 March 2022
  • 1 reply
  • 181 views

Badge +2

I know the default is using the id,

but is there a way to use {% catalog item%}

and look for it with a custom information that the item has ie. SKU?

icon

Best answer by alex.hong 24 March 2022, 22:26

View original

1 reply

Userlevel 7
Badge +58

Hi there @Ofirrah,

Welcome to the Community!
I hope I’m understanding your question correctly. Are you saying you would like to filter products in your catalog by both SKU, and ID to make sure the product links are not sending customers to the wrong store?

Because SKU is contained in the additional details, and is not the same as the Product ID, it cannot be used for filtering in the Product Block. However, I may suggest an alternative solution which might help. This is also in part the answer to your second question regarding filtering by store ID. 

The catalog does allow you to filter based on product feed. 

?name=Screen+Shot+2022-01-29+at+12.24.31+PM.png

When you create a new Product Feed, you are able to add products based on which catalog they belong to:

?name=Screen+Shot+2022-01-29+at+12.25.23+PM.png​ 

Even if you have multiple products with the same name, they should probably be in different catalogs. So, all you would need to do is setup a product feed for specific catalogs, then filter based on this in your product block. For more information, please see: 

If you have products with the same name, in the same catalog, but do not have a way of identifying the unique product ID for each one so you can pull them in to your blocks accordingly, then I would advise considering a different organizational approach to managing your products.

 

Hope that helped,

Alex

Reply