Recipes and Add all to bag
In Platter, a recipe is a blog article that lists the products it uses. The recipe page shows those products beside the method, with one button that adds them all to the bag. Each product page can then show the recipes that use it.
1. Create the recipe definitions
Recipes use two article metafields. Create them once per store.
- In Shopify admin, go to Settings → Custom data. On some stores this page is called Metafields and metaobjects.
- Click Blog posts, then Add definition.
- Create Products used: Namespace and key
platter.products, type Product, List of values. - Create Time: Namespace and key
platter.time, type Single line text.
The namespace, key and type must match exactly.
2. Write a recipe
- Go to Online Store → Blog posts. Create a blog for your recipes, for example “Recipes”, if you don’t have one.
- Add a blog post in that blog. Write the method in the content.
- Add a featured image. Platter uses it at the top of the recipe and in lists.
- Write a short excerpt. Platter shows it in the home page Recipe section and on product pages.
- In the Metafields card, pick the products in Products used and enter the total time in Time, for example “40 minutes”.
- Save and make the post visible.
3. The recipe page
The recipe page shows the title, the time, the date, the photo and the method. Beside the method sits a “Uses” list with each product’s photo, measure, size, allergens and price.
Under the list is one button. Its label follows the products:
- “Add both to bag, $18” for two products.
- “Add all 3 to bag, $27” for more.
- “Add the 2 in stock, $18” when some are sold out. Sold-out products are left out.
The button adds one of each product to the bag. For a product with options, it adds the first available option. With the cart drawer, the drawer opens. With the cart page, the bag count in the header updates and the shopper stays on the recipe.
The Article section has one setting, Show share links. Blog comments show when you turn them on for the blog in Shopify admin.
4. The recipes list
The blog page lists every recipe with its photo, time, a short extract and the products it uses, each with its color chip. If your posts have tags, the tags appear at the top as filters.
5. Recipes on product pages
The product template includes the Recipes for this product section. Open a product page in the editor and set:
- Heading, which defaults to “What to make with it”.
- Recipe blog, the blog that holds your recipes.
- Recipes to show, from 1 to 6.
The section shows posts from that blog that list the product in Products used. It also shows posts tagged with the product’s handle, for example a post tagged dark-72 for the product at /products/dark-72. It checks the 50 newest posts in the blog.
One matching recipe shows as a wide band with its photo, excerpt and time. Two or more show as a list. With no match, the section doesn’t show.
6. The Recipe section on the home page
The home page Recipe section features one recipe with its products and the same Add all button. See Set up your home page in Platter.
Was something unclear? Tell us, or write to support@halfspeed.studio.