Converting to Online 2.0 problems

I have an existing Shopify theme that I’m converting to Online 2.0. It’s not a very complex theme, and I have moved all templates to be .json files, and moved their content to section liquid templates with schema tags, as per the documentation for migrating.

However, when I go to my Navigation settings to set up filters, I still get the message The current theme doesn’t support filters

I also don’t see sections available to add to a section while editing a template in the theme editor, i.e. ‘No theme sections available for this template’, although my sections/blocks that I’ve added to a special page template work as expected ( I have a FAQ page that I can add blocks to an FAQ section just fine.

Additionally, when I added a new product_reference metafield to a product, I’m receiving the graphql gid instead of the product object as per the documentation. I’m getting this response https://shopify.dev/apps/metafields/definitions/types (product_reference)when I am expecting to get this https://shopify.dev/api/liquid/objects/metafield (product_reference)

It seems like there’s something I’m missing about converting to 2.0 and I can’t see why…

thanks

Hi @kayluhb may I have a look at your theme files so I can give you exact solution!

Regards

So here’s what I learned so far.

I didn’t see sections in my ‘Add a section’ editor because I didn’t have presets on my section template schema. Once I added those, I started seeing them in the editor.

For filtering, I just had to reference them in my template. Once I add this template rendered by a section, the filtering section of Shopify admin allowed me to edit them.


  {%- for filter in collection.filters -%}
    

      {{ filter.label }}
      

        {%- for filter_value in filter.values -%}
          - {{ filter_value.label }}
          
        {%- endfor -%}
      

    

  {%- endfor -%}

I still have no idea why my metafield is returning a gid instead of a product object and Shopify Plus support directed me here, so…