Jump to content

Edit History

PS.6thFNGR

PS.6thFNGR

I even got a reply in the meantime. I did not tried it by myself but will do so tonight. Check this:

Replace the template.tpl Data with this. If the quote is breaking the lines, just see at GitHUb: https://github.com/PrestaShop/PrestaShop/issues/19017

Quote

<meta property="og:title" content="{$page.meta.title}"/> <meta property="og:description" content="{$page.meta.description}"/> <meta property="og:type" content="website"/> <meta property="og:url" content="{$urls.current_url}"/> <meta property="og:site_name" content="{$shop.name}"/> {if isset($product) && isset($product.cover) && $page.page_name == 'product'} <meta name="thumbnail" content="{$product.cover.bySize.large_default.url}" /> <link rel="previewimage" href="{$product.cover.bySize.large_default.url}" /> <meta property="og:image" content="{$product.cover.bySize.large_default.url}"/> {else} <meta property="og:image" content="{$urls.shop_domain_url}{$shop.logo}"/> {/if} <script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "name" : "{$shop.name}", "url" : "{$urls.pages.index}", "logo" : { "@type":"ImageObject", "url":"{$urls.shop_domain_url}{$shop.logo}" } } </script> <script type="application/ld+json"> { "@context":"http://schema.org", "@type":"WebPage", "isPartOf": { "@type":"WebSite", "url": "{$urls.pages.index}", "name": "{$shop.name}" }, "name": "{$page.meta.title}", "url": "{$urls.current_url}" } </script> {if $page.page_name =='index'} <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url" : "{$urls.pages.index}", "image": { "@type": "ImageObject", "url":"{$urls.shop_domain_url}{$shop.logo}" }, "potentialAction": { "@type": "SearchAction", "target": "{'--search_term_string--'|str_replace:'{search_term_string}':$link->getPageLink('search',true,null,['search_query'=>'--search_term_string--'])}", "query-input": "required name=search_term_string" } } </script> {/if} {if isset($product) && $page.page_name == 'product'} <script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "Product", "name": "{$product.name}", "description": "{$page.meta.description}", "category": "{$product.category_name}", "sku": "{$product.reference}", {if $product.ean13} "gtin13": "{$product.ean13}", {/if} {if isset($product.cover)}"image" :"{$product.cover.bySize.home_default.url}",{/if} {if $product_manufacturer->name}"brand": { "@type": "Thing", "name": "{$product_manufacturer->name|escape:'html':'UTF-8'}" },{/if} {if isset($nbComments) && $nbComments && $ratings.avg}"aggregateRating": { "@type": "AggregateRating", "ratingValue": "{$ratings.avg|round:1|escape:'html':'UTF-8'}", "reviewCount": "{$nbComments|escape:'html':'UTF-8'}" },{/if} {if isset($product.weight) && ($product.weight != 0)} "weight": { "@context": "https://schema.org", "@type": "QuantitativeValue", "value": "{$product.weight}", "unitCode": "{$product.weight_unit}" },{/if} {*{if empty($combinations)}*} {if $product.show_price} "offers": { "@type": "Offer", "priceCurrency": "{$currency.iso_code}", "name": "{$product.name|strip_tags:false}", "price": "{$product.price_amount}", "url": "{$product.url}", "priceValidUntil": "{$smarty.now + (60*60*24*15)|date_format:"%Y-%m-%d"}", {if $product.images|count > 0} "image": {strip}[ {foreach from=$product.images item=p_img name="p_img_list"} "{$p_img.large.url}"{if not $smarty.foreach.p_img_list.last},{/if} {/foreach} ]{/strip}, {/if} {if $product.ean13} "gtin13": "{$product.ean13}", {else if $product.upc} "gtin13": "0{$product.upc}", {/if} "sku": "{$product.reference}", {if $product.condition == 'new'}"itemCondition": "http://schema.org/NewCondition",{/if} {if $product.show_condition > 0} {if $product.condition == 'used'}"itemCondition": "http://schema.org/UsedCondition",{/if} {if $product.condition == 'refurbished'}"itemCondition": "http://schema.org/RefurbishedCondition",{/if} {/if} "availability":{if $product.quantity > 0} "http://schema.org/InStock"{else} "http://schema.org/OutOfStock"{/if}, "seller": { "@type": "Organization", "name": "{$shop.name}" } } {/if} } </script> {/if} {if isset($breadcrumb.links[1])} <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {foreach from=$breadcrumb.links item=path name=breadcrumb} { "@type": "ListItem", "position": {$smarty.foreach.breadcrumb.iteration}, "name": "{$path.title}", "item": "{$path.url}" }{if !$smarty.foreach.breadcrumb.last},{/if} {/foreach}] } </script> {/if}

Greets

PS.6thFNGR

PS.6thFNGR

Told you to use GitHub

I even got a reply in the meantime. I did not tried it by myself but will do so tonight. Check this:

Replace the template.tpl Data with this. If the quote is breaking the lines, just see at GitHUb: https://github.com/PrestaShop/PrestaShop/issues/19017

Quote

<meta property="og:title" content="{$page.meta.title}"/> <meta property="og:description" content="{$page.meta.description}"/> <meta property="og:type" content="website"/> <meta property="og:url" content="{$urls.current_url}"/> <meta property="og:site_name" content="{$shop.name}"/> {if isset($product) && isset($product.cover) && $page.page_name == 'product'} <meta name="thumbnail" content="{$product.cover.bySize.large_default.url}" /> <link rel="previewimage" href="{$product.cover.bySize.large_default.url}" /> <meta property="og:image" content="{$product.cover.bySize.large_default.url}"/> {else} <meta property="og:image" content="{$urls.shop_domain_url}{$shop.logo}"/> {/if} <script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "name" : "{$shop.name}", "url" : "{$urls.pages.index}", "logo" : { "@type":"ImageObject", "url":"{$urls.shop_domain_url}{$shop.logo}" } } </script> <script type="application/ld+json"> { "@context":"http://schema.org", "@type":"WebPage", "isPartOf": { "@type":"WebSite", "url": "{$urls.pages.index}", "name": "{$shop.name}" }, "name": "{$page.meta.title}", "url": "{$urls.current_url}" } </script> {if $page.page_name =='index'} <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url" : "{$urls.pages.index}", "image": { "@type": "ImageObject", "url":"{$urls.shop_domain_url}{$shop.logo}" }, "potentialAction": { "@type": "SearchAction", "target": "{'--search_term_string--'|str_replace:'{search_term_string}':$link->getPageLink('search',true,null,['search_query'=>'--search_term_string--'])}", "query-input": "required name=search_term_string" } } </script> {/if} {if isset($product) && $page.page_name == 'product'} <script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "Product", "name": "{$product.name}", "description": "{$page.meta.description}", "category": "{$product.category_name}", "sku": "{$product.reference}", {if $product.ean13} "gtin13": "{$product.ean13}", {/if} {if isset($product.cover)}"image" :"{$product.cover.bySize.home_default.url}",{/if} {if $product_manufacturer->name}"brand": { "@type": "Thing", "name": "{$product_manufacturer->name|escape:'html':'UTF-8'}" },{/if} {if isset($nbComments) && $nbComments && $ratings.avg}"aggregateRating": { "@type": "AggregateRating", "ratingValue": "{$ratings.avg|round:1|escape:'html':'UTF-8'}", "reviewCount": "{$nbComments|escape:'html':'UTF-8'}" },{/if} {if isset($product.weight) && ($product.weight != 0)} "weight": { "@context": "https://schema.org", "@type": "QuantitativeValue", "value": "{$product.weight}", "unitCode": "{$product.weight_unit}" },{/if} {*{if empty($combinations)}*} {if $product.show_price} "offers": { "@type": "Offer", "priceCurrency": "{$currency.iso_code}", "name": "{$product.name|strip_tags:false}", "price": "{$product.price_amount}", "url": "{$product.url}", "priceValidUntil": "{$smarty.now + (60*60*24*15)|date_format:"%Y-%m-%d"}", {if $product.images|count > 0} "image": {strip}[ {foreach from=$product.images item=p_img name="p_img_list"} "{$p_img.large.url}"{if not $smarty.foreach.p_img_list.last},{/if} {/foreach} ]{/strip}, {/if} {if $product.ean13} "gtin13": "{$product.ean13}", {else if $product.upc} "gtin13": "0{$product.upc}", {/if} "sku": "{$product.reference}", {if $product.condition == 'new'}"itemCondition": "http://schema.org/NewCondition",{/if} {if $product.show_condition > 0} {if $product.condition == 'used'}"itemCondition": "http://schema.org/UsedCondition",{/if} {if $product.condition == 'refurbished'}"itemCondition": "http://schema.org/RefurbishedCondition",{/if} {/if} "availability":{if $product.quantity > 0} "http://schema.org/InStock"{else} "http://schema.org/OutOfStock"{/if}, "seller": { "@type": "Organization", "name": "{$shop.name}" } } {/if} } </script> {/if} {if isset($breadcrumb.links[1])} <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {foreach from=$breadcrumb.links item=path name=breadcrumb} { "@type": "ListItem", "position": {$smarty.foreach.breadcrumb.iteration}, "name": "{$path.title}", "item": "{$path.url}" }{if !$smarty.foreach.breadcrumb.last},{/if} {/foreach}] } </script> {/if}

Greets

×
×
  • Create New...