App reviews, troubleshooting, and recommendations
I want to add a page to my Remix app that allows the merchant to select which product pages to add my theme app extension on (like basic check boxed lists). I have the gui that shows their products and I have the theme app extension which they can manually customize on a given page, but I just need to find a way to smoothly connect them (perhaps by default my button goes below the add to cart button or something).
Is this possible? Or do all liquid injections have to be done manually by the merchant?
Hmmm, you could use store the products in an metafield and conditionally check with liquid:
Store the Values: In your app or through the Shopify admin, store the list of product IDs or handles in a metafield as a single string, with each value separated by a comma.
Liquid Code Example:
Suppose you have a metafield product_list in the settings namespace that contains a list of product handles. Here's how you could check if the current product is in that list:
{% assign product_list = settings.product_list | split: ',' %}
{% if product_list contains product.handle %}
<!-- Your code here to display or do something for the included product -->
{% endif %}
In this code:
settings.product_list refers to your metafield.
split: ',' turns the string into an array, splitting it at each comma.
product.handle is the handle of the current product.
The if statement checks if the product_list array contains the handle of the current product.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025