From b58621f08e9729160a2e469d06274ed4521f318c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Fri, 23 Jan 2026 23:12:19 +0100 Subject: [PATCH 1/3] Fix conditions in JSON --- templates/_partials/microdata/product-jsonld.tpl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/_partials/microdata/product-jsonld.tpl b/templates/_partials/microdata/product-jsonld.tpl index 3f5f3253..e96ec190 100644 --- a/templates/_partials/microdata/product-jsonld.tpl +++ b/templates/_partials/microdata/product-jsonld.tpl @@ -90,10 +90,14 @@ "sku": "{if $product.reference}{$product.reference}{else}{$product.id}{/if}", "mpn": "{if $product.mpn}{$product.mpn}{elseif $product.reference}{$product.reference}{else}{$product.id}{/if}", {if $product.ean13}"gtin13": "{$product.ean13}",{elseif $product.upc}"gtin13": "0{$product.upc}",{/if} - {if $product.condition == 'new'}"itemCondition": "https://schema.org/NewCondition",{/if} - {if $product.show_condition > 0} - {if $product.condition == 'used'}"itemCondition": "https://schema.org/UsedCondition",{/if} - {if $product.condition == 'refurbished'}"itemCondition": "https://schema.org/RefurbishedCondition",{/if} + {* + * If show_condition is false, product.condition is a string (e.g. "new"). + * If show_condition is true, product.condition is an array with keys type, label and schema_url + *} + {if $product.condition == 'new'} + "itemCondition": "https://schema.org/NewCondition", + {elseif !empty($product.show_condition)} + "itemCondition": "{$product.condition.schema_url}", {/if} "availability": "{$product.seo_availability}", "seller": { From 527ac18f96541dc3a27cc36b636f8996eba82389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Fri, 23 Jan 2026 23:12:36 +0100 Subject: [PATCH 2/3] Bump to 3.0.7 --- config/theme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/theme.yml b/config/theme.yml index b24ae1eb..a8b35e3f 100644 --- a/config/theme.yml +++ b/config/theme.yml @@ -1,6 +1,6 @@ name: classic display_name: Classic -version: 3.0.6 +version: 3.0.7 author: name: "PrestaShop SA and Contributors" email: "contact@prestashop.com" From f8d57a426d1cd84fde2bd73e2f73a2d30a8e159a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Fri, 23 Jan 2026 23:20:14 +0100 Subject: [PATCH 3/3] Simplify itemCondition logic in product-jsonld.tpl Refactor itemCondition logic to simplify condition checks. --- templates/_partials/microdata/product-jsonld.tpl | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/templates/_partials/microdata/product-jsonld.tpl b/templates/_partials/microdata/product-jsonld.tpl index e96ec190..27f15c51 100644 --- a/templates/_partials/microdata/product-jsonld.tpl +++ b/templates/_partials/microdata/product-jsonld.tpl @@ -90,15 +90,7 @@ "sku": "{if $product.reference}{$product.reference}{else}{$product.id}{/if}", "mpn": "{if $product.mpn}{$product.mpn}{elseif $product.reference}{$product.reference}{else}{$product.id}{/if}", {if $product.ean13}"gtin13": "{$product.ean13}",{elseif $product.upc}"gtin13": "0{$product.upc}",{/if} - {* - * If show_condition is false, product.condition is a string (e.g. "new"). - * If show_condition is true, product.condition is an array with keys type, label and schema_url - *} - {if $product.condition == 'new'} - "itemCondition": "https://schema.org/NewCondition", - {elseif !empty($product.show_condition)} - "itemCondition": "{$product.condition.schema_url}", - {/if} + {if !empty($product.show_condition) && !empty($product.condition)}"itemCondition": "{$product.condition.schema_url}",{/if} "availability": "{$product.seo_availability}", "seller": { "@type": "Organization",