Skip to content

Commit 8c8ef41

Browse files
author
Prestarocket
committed
Merge branch 'release/3.0.2'
2 parents dc785e0 + a6a6ee4 commit 8c8ef41

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

templates/_partials/microdata-jsonld.tpl

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,27 @@
2929
<meta property="og:url" content="{$urls.current_url}"/>
3030
<meta property="og:site_name" content="{$shop.name}"/>
3131

32-
{if isset($product) && $page.page_name === 'product'}
33-
{if $product.images|count > 0}
34-
{foreach from=$product.images item=p_img name="p_img_list"}
35-
<meta property="og:image" content="{$p_img.large.url}"/>
36-
{/foreach}
32+
{if isset($product) && $page.page_name == 'product'}
33+
<meta property="og:type" content="product"/>
34+
{if $product.images|count > 0}
35+
{foreach from=$product.images item=p_img name="p_img_list"}
36+
<meta property="og:image" content="{$p_img.large.url}"/>
37+
{/foreach}
38+
<meta property="og:image:height" content="{$p_img.large.height}"/>
39+
<meta property="og:image:width" content="{$p_img.large.width}"/>
40+
41+
{/if}
42+
{if $product.show_price}
43+
<meta property="product:price:amount" content="{$product.price_amount}" />
44+
<meta property="product:price:currency" content="{$currency.iso_code}" />
45+
{if $product.has_discount}
46+
<meta property="product:price:standard_amount" content="{$product.regular_price_amount}" />
3747
{/if}
48+
{/if}
49+
{if $product_manufacturer->name}
50+
<meta property="product:brand" content="{$product_manufacturer->name|escape:'html':'UTF-8'}" />
51+
{/if}
52+
<meta property="og:availability" content="{if $product.quantity_all_versions > 0 || $product.allow_oosp > 0}instock{else}out of stock{/if}" />
3853
{elseif $page.page_name === 'category' && isset($category) && $category.image.large.url}
3954
<meta property="og:image" content="{$category.image.large.url}"/>
4055
{else}

0 commit comments

Comments
 (0)