Shoppable recipes on Shopify with an add all to cart button
A recipe answers the question every food shopper has: what do I make with it? Here is how to turn your recipes into a way to sell, with every product in the bag in one tap, with any theme.
Small food and drink brands write recipes anyway: cookies with the chocolate, a rub with the coffee, noodles with the chili crisp. Most of them sit in a blog with a link or two in the method. A shoppable recipe goes further. It lists the products it uses beside the method, with one button that puts them all in the cart. This guide covers the Shopify setup with any Online Store 2.0 theme: where recipes live, how to link them to products, the options for an add all button, and what search engines need. The last part shows how our theme, Platter, handles it.
1. Write recipes as blog posts
Shopify has no recipe type, but a blog works well. Create a blog called “Recipes” and write each recipe as a post (Shopify: blog posts):
- Title: the name of the dish, as people search for it. “Brown butter chocolate chunk cookies”, not “Our new favorite”.
- Featured image: the finished dish. Shopify uses it on the blog page and when the post is shared on social media.
- Excerpt: one or two sentences. Themes show it in lists and previews.
- Content: the ingredients with quantities, then the method in numbered steps.
- Tags: such as “Baking” or “Quick”, so shoppers can find similar recipes.
Write the full ingredient list in the post, even with products linked below. The products are what you sell; the eggs and flour still belong in the recipe.
2. Link each recipe to the products it uses
A link in the method is invisible to the theme: it can’t show the product’s price or add it to the cart. Store the products in a blog post metafield instead.
- In Shopify admin, go to Settings, then Metafields and metaobjects (called Custom data on some stores), then Blog posts.
- Click Add definition. Name it “Products used”, choose the type Product, and then List of values (Shopify: metafield definitions).
- Add a second definition for the total time, such as “Time”, of the type single line text.
- Open each recipe and pick its products in the Metafields card.
Themes can read these fields: the article object in Shopify’s theme language has its own metafields (Shopify: the article object). Which field names a theme reads depends on the theme, so check its documentation before you name your definitions.
3. Put every product in the cart at once
There are three ways to give a recipe an “add all” button.
- A theme that does it. The theme reads the products metafield and adds them all with one request. The button can then follow stock and price as they change.
- A cart link. Shopify’s cart permalinks fill a cart from a link such as
/cart/70881412:1,70881382:1, each pair a variant ID and a quantity. On its own the link goes to checkout; add?storefront=trueto land in the cart instead (Shopify: cart permalinks). It works with any theme, but it is a fixed link: it does not know when a product sells out, so check it when your range changes. - An app. Some bundle and recipe apps add a button like this. Check what they add to every page load.
Whichever you use, a good button does three things:
- Says what it adds, with the count and the total: “Add both to bag” beats “Buy”.
- Skips what is sold out, and says so, instead of failing.
- Adds one-time purchases. A product sold only on a subscription can’t go into the cart without a plan, so leave it out of recipes.
4. Show the recipes on product pages
The link works best both ways. A shopper on the chocolate bar’s page wants to know what to make with it. Ask your theme for a section that lists the recipes that use the product, read from the same metafield. If your theme has none, Shopify’s free Search & Discovery app can at least suggest complementary products (Shopify: product recommendations).
5. Recipes and search results
Google can show a recipe as a rich result when the page carries schema.org Recipe markup. The required properties are the image and the name of the dish, and recommended ones include the ingredients and the total time (Google: recipe structured data).
A theme that marks up blog posts with Shopify’s structured_data filter outputs each one as a schema.org Article, not a Recipe (Shopify: structured_data). For recipe results, add Recipe markup with an app or custom code.
How Platter handles it
Platter is our theme for food and drink brands with a small catalog. In Platter, a recipe is a blog post that lists the products it uses, and every recipe page has one button that adds them all to the bag. Each demo store features a recipe on its home page: Hollis Chocolate’s brown butter chocolate chunk cookies use its Tumaco and Sea Salt and Nib bars, Fernhill Coffee’s coffee-rubbed short ribs use its House Espresso and Cerrado, and Low Ember’s chili crisp noodles with black garlic use its Chili Crisp and Black Garlic Gochujang.
Two metafields, no app. Platter reads two blog post metafields: Products used, with the namespace and key platter.products, a list of products, and Time, platter.time, single line text. The namespace, key and type must match exactly.
The recipe page. It shows the title, the time, the date, the photo and the method. Beside the method sits a “Uses” list with each product’s photo on its own color, its measure, size, allergens and price. A product shows “Contains: None” only when you have marked it allergen-free; missing allergen data never reads as safe.
One button that tells the truth. The button’s label follows the products and their stock: “Add both to bag” for two products, “Add all 3 to bag” for more, each with the total, and “Add the 2 in stock” when some are sold out. Sold-out products are left out. The button adds one of each product, and the first available option of a product with options. 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.
One-time products only. The button adds one-time purchases. Don’t list a product that sells only on a subscription: Shopify refuses it, and the button fails.
Recipes on product pages. The default product template has a Recipes for this product section, headed “What to make with it”. It lists posts from the blog you pick that use the product, or that are tagged with the product’s handle, checking the 50 newest posts and showing 1 to 6. One match 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.
A recipe on the home page. The Recipe section features one recipe with its products and the same button. You can give it its own image and text.
The recipes list. The blog page lists each recipe with its photo, time, a short extract and the products it uses, each with its color chip. Your post tags show at the top as filters. Search shows recipes too, under “Recipes and articles”.
Every step is in Recipes and Add all to bag, and the home page section in Set up your home page in Platter.
When Platter is not the right fit
Platter’s button adds one of each product. It does not scale quantities to servings, and it does not sell a recipe as a kit at its own price. Recipe pages use Shopify’s Article structured data, not Recipe markup. If recipes are your main product, with ratings, servings and recipe search results, pair Platter with a recipe app or use a theme built for it.
Sources: Shopify Help Center on blog posts, metafield definitions and product recommendations; Shopify developer docs on cart permalinks, the article object and the structured_data filter; Google Search Central, recipe structured data.