I’m working on a custom section in my Shopify theme (version 2.0.2, “Refresh” theme by Shopify). I’ve set up a custom product selection feature that allows users to select products from the theme settings, and it displays them in a custom product display section. However, despite selecting products in the theme editor, the front-end still shows “No product selected” placeholders, and the product information (e.g., product name and image) does not display.
Here’s a snippet of my current code:
I’ve confirmed that the product IDs are being selected properly in the theme settings and that the all_products object should be available.
Questions:
- What could be causing the selected products not to display on the front end, even though they’re chosen in the theme settings?
- Are there any limitations or known issues with using all_products in a custom section that might prevent product data from rendering correctly?
- Would using product metafields be a more reliable solution for accessing product data in this scenario, and if so, how should I implement it?
Any insights or guidance would be greatly appreciated!