[Feature Request] Make it possible to run app theme extension for featured product section

I have an app that runs app theme extension code on product pages, manipulating product images.

I would like to run my code also on the featured product section on the homepage, but I haven’t found a way to do it yet.

Basically, I should be able to select featured products as a template here.

I ran into the same issue a couple of weeks ago. What I ended up doing was creating a second app block, basically a copy of the one I use on product templates, but with an extra block setting (of type product) that lets the merchant pick a product from a dropdown. That way, the block can use block.settings.product instead.

It’s definitely a workaround, and it can be confusing for merchants to know which block to use. To make it simpler, I keep the block with the product selector hidden by default, and only enable it for merchants who want to use the app on non-product pages.

{% schema %}
{
  "name": "Block name",
  "disabled_on": {
    "templates": ["product"]
  },
  "target": "section",
  "settings": [
    {
      "type": "product",
      "id": "product",
      "label": "Select featured Product"
    }
  ],
  "available_if": "{{ app.metafields.namespace.enable_block_on_non_product_pages }}"
}
{% endschema %}

1 Like

Thanks @Gulam_Hussain_Quinn this is great solution