Create unique product drawers/size charts with metafields
- We first need to create a new page containing your size chart by heading to Admin > Online store > Pages > Add page > Call this ‘Mens size chart’ or similar.
- Add content to the page as an image or as a table, using the built in content editing tools.
- Head to Admin > Settings > Metafields > Products > Add definition > Enter a name of your choice, like “Size charts”
- Add a description of your choice (used internally, as a reference so you know later on, why you created the metafield). Say something like “Guide to size charts”.
- Assign a “Content type” which defines the metafield’s purpose. Choose Reference > Page > Save changes. This metafield will now show on all products but will only become active on your storefront for customers to view once it is triggered (on a per-product basis), explained in the next steps.
- Head to a product that you wish to activate your metafield on: Admin > Products > Choose your product > You should see your new metafield listed at the bottom of the page.
- Click on your newly created, grey metafield content box which should display a dropdown list where you can choose your page to link to (like ‘Mens size chart’ we created in step 1).
- Save your changes to apply this to your product. Repeat steps 6-8 for any other products where you wish this to display.
- Return to your product in your theme editor area.
- Select the content block called “Size chart” (you may need to add this content block if you do not see it yet).
- Under Content, click the Connect dynamic source icon and select “Size charts” and save your changes. You should see your size chart page shown when you expand the “Size chart” drawer on the page preview window.