I created a filter through metafield and then manually added it to the theme code. Now my filter is running normally and can display the filter items properly, but it can’t show the products correctly. Even though I configured it correctly in the background products, I have asked the shopify technical team to check it for me. They said my configuration is normal and they suspect it’s a code issue. They can’t help solve it. Is there any expert who can help me solve this problem?
Hey @user3447
Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.
Best Regards,
Moeed
Of course!
Yes I can also see that your products aren’t showing upon filtering, although the filter URL works perfectly fine so I’m sure there’s some other issue. Can you share your collaborator request code in my private messages so I can have a look on my end and sort that out for you?
Best,
Moeed
Sure. Please wait a moment.
Looks like you’re passing metaobject handle as filter value, but should pass its id instead.
When your form submitted it redirects, say to:
https ://carpartvibe.com/collections/all?filter.p.m.custom.car_fitment=car-fitment-3qiuslnz
When I check the checkbox on collection page, the URL is this:
https ://carpartvibe.com/collections/all?filter.p.m.custom.car_fitment=gid%3A%2F%2Fshopify%2FMetaobject%2F133003739389
You just need to use .id instead of .handle when you create AllFittments variable
Thank you for your assistance! Your solution has successfully helped me resolve the problem. Thank you so much for your professional support!