Add field recipeIngredients
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div itemscope itemtype="<https://schema.org/Recipe>">
<span itemprop="name">Test2</span>
This classic banana bread recipe comes
from my mom -- the walnuts add a nice texture and flavor to the banana
bread.
Prep Time: 15 minutes
Cook time: 1 hour
Yield: 1 loaf
Tags: Low fat
Ingredients:
- <span itemprop="recipeIngredient">3 or 4 ripe strawberry, smashed</span>
- <span itemprop="recipeIngredient">500 g cheese </span>
- <span itemprop="recipeIngredient">3/4 cup of coca-cola</span>
- <span itemprop="recipeIngredient">4 orange</span>
...
Instructions:
Preheat the oven to 350 degrees. Mix in the ingredients in a bowl. Add
the flour last. Pour the mixture into a loaf pan and bake for one hour.
140 comments:
From Janel, May 5 -- thank you, great recipe!
...
</div>
<div id="shop-with-instacart-v1" data-affiliate_id="4964" data-source_origin="affiliate_hub" data-affiliate_platform="recipe_widget" ></div>
<script>
(function (d, s, id, a) { var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) { return; } js = d.createElement(s); js.id = id;
js.src = "<https://widgets.instacart.com/widget-bundle-v2.js>"; js.async = true;
js.dataset.source_origin = "affiliate_hub"; fjs.parentNode.insertBefore(js, fjs); })
(document, "script", "standard-instacart-widget-v1");
</script>
</body>
</html>
get data-affiliate_id from recipe object affiliateCode
if("type": "instacart")
[
{
"link": "<https://www.amazon.com/dp/B08L5M3MWZ/ref=nosim?tag=test-27-06-10-03-com>",
"image": "<https://waivio.nyc3.digitaloceanspaces.com/1690901017_2bca90ba-124c-447b-b070-7bc744197de9>",
"affiliateCode": "test-27-06-10-03-com",
"type": "instacart"
}
]
Button
<div id="shop-with-instacart-v1" data-affiliate_id="4964" data-source_origin="affiliate_hub" data-affiliate_platform="recipe_widget" ></div>
Script
<script>
(function (d, s, id, a) { var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) { return; } js = d.createElement(s); js.id = id;
js.src = "<https://widgets.instacart.com/widget-bundle-v2.js>"; js.async = true;
js.dataset.source_origin = "affiliate_hub"; fjs.parentNode.insertBefore(js, fjs); })
(document, "script", "standard-instacart-widget-v1");
</script>