added switches for descriptions

This commit is contained in:
O K
2025-09-25 18:37:42 +03:00
parent ae31cb0bb5
commit 6a6b301cdd

View File

@@ -69,12 +69,12 @@ class ProductLinkCheckerProductDataGenerateModuleFrontController extends ModuleF
// Grouping meta fields for clarity // Grouping meta fields for clarity
'meta_description' => $product->meta_description, 'meta_description' => $product->meta_description,
'title' => $product->name, 'title' => $product->name,
'description' => $product->description, 'description' => Tools::getValue('plc_no_description') ? null : $product->description,
'description_short' => $product->description_short, 'description_short' => Tools::getValue('plc_no_description_short') ? null : $product->description_short,
'mpn' => $product->mpn, 'mpn' => $product->mpn ?? null,
'reference' => $product->reference, 'reference' => $product->reference ?? null,
'ean13' => $product->ean13, 'ean13' => $product->ean13 ?? null,
'upc' => $product->upc, 'upc' => $product->upc ?? null,
'id_language' => (int)$id_lang, 'id_language' => (int)$id_lang,
'id_shop' => (int)$id_shop, 'id_shop' => (int)$id_shop,
'link' => $this->context->link->getProductLink($product), 'link' => $this->context->link->getProductLink($product),
@@ -94,13 +94,13 @@ class ProductLinkCheckerProductDataGenerateModuleFrontController extends ModuleF
'meta_description' => $product->meta_description, 'meta_description' => $product->meta_description,
// Title and descriptions are also from the main product // Title and descriptions are also from the main product
'title' => $product->name, 'title' => $product->name,
'description' => $product->description, 'description' => Tools::getValue('plc_no_description') ? null : $product->description,
'description_short' => $product->description_short, 'description_short' => Tools::getValue('plc_no_description_short') ? null : $product->description_short,
// These fields are specific to the combination // These fields are specific to the combination
'mpn' => $combination['mpn'], 'mpn' => $combination['mpn'] ?? null,
'reference' => $combination['reference'], 'reference' => $combination['reference'] ?? null,
'ean13' => $combination['ean13'], 'ean13' => $combination['ean13'] ?? null,
'upc' => $combination['upc'], 'upc' => $combination['upc'] ?? null,
'id_language' => (int)$id_lang, 'id_language' => (int)$id_lang,
'id_shop' => (int)$id_shop, 'id_shop' => (int)$id_shop,
'link' => $this->context->link->getProductLink($product, null, null, null, (int)$id_lang, (int)$id_shop, (int)$combination['id_product_attribute']), 'link' => $this->context->link->getProductLink($product, null, null, null, (int)$id_lang, (int)$id_shop, (int)$combination['id_product_attribute']),