Good morning,
Is there a way to easily remove certain products from the dynamic product recommendations?
Thank you
Hi Aden, We are checking your query with our Dev team. Apologies for the delay, we'll be back with you asap.
Jasmine | Plak theme support
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution
Hi Aden, Our dev team looked at your query. We are using Shopify product recommendation API for this feature. It currently doesn't support excluding products. However, there is a hack that may just work for you. Lets say you want to skip a product with ID=1234. Now, you can add this ID in the loop and skip it. This might not work when you have large number of products to skip. Sample code shared by the team is as below:
<ul class="grid grid--uniform grid--view-items"> {%- for product in recommendations.products limit: 10 -%} <li class="grid__item small--one-half medium-up--one-quarter"> {%- if [1234, 3434, 56565] contains product.id -%} {% render 'product-card-grid', product: product %} {%endif %} </li> {%- endfor -%} </ul>
Jasmine | Plak theme support
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution
Thank you! I had found another workaround since posting my question.
Welcome to the Shopify Forum Community provided by Plak ThemeLLC, a place where you can discuss about eCommerce and Shopify, solve technical issues, get help with Shopify Design, Apps integration, Marketing, Facebooks ad, Google ads and more.
Before posting, we invite you to read and follow the forum rules | We also support any questions related to Free Shopify themes :Dawn, Express, Minimal, Brooklyn, Narrative, Supply, Debut, Venture, Boundless and Simple