I want to have a shop page (default product template) and a ‘page page’ (custom template), per Product.
For example, a Product’s shop page (products/myproduct) will have its title and description and the add to cart link.
This all already works perfectly (no need for a template per Product, they all share the default product template)
The Product’s Page (pages/myproduct) should show the product’s title and description, but also information from its metafields like it’s technical specification and feature list.
I tried to achieve this by creating a single template which contains only one custom section which I wrote in liquid.
The custom section allows you to select the Product, and then the correct metafield info is shown on the page.
However, because the section is part of the template, I can’t change the Product without it changing for all pages, so I seem to need a way for the ‘Page’ in Shopify Admin to link to a Product, rather than the section inside the template linking to the Product.
I am happy editing liquid as I created the custom section myself, I just don’t know how to achieve the links that I need to have the Product’s actual information as set in the metafields available on a Page without needing to duplicate the exact same template per Product.
EDIT: Solved! I didn’t realise you can create metafields for Pages as well as for Products, so I added a metafield to each page which allows me to select the product from there, and then adjusted my custom liquid section to use page.metafields.custom.linked_product.value instead of having a selector inside the template.