fix IDs logic.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Product Link Checker Generate Controller
|
||||
*/
|
||||
@@ -25,8 +26,8 @@ class ProductLinkCheckerGenerateModuleFrontController extends ModuleFrontControl
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$id_shop_filter = (int)Tools::getValue('id_shop');
|
||||
$id_lang_filter = (int)Tools::getValue('id_lang');
|
||||
$id_shop_filter = (int)Tools::getValue('plc_id_shop');
|
||||
$id_lang_filter = (int)Tools::getValue('plc_id_lang');
|
||||
|
||||
// Determine which shops to scan
|
||||
if ($id_shop_filter) {
|
||||
@@ -60,7 +61,7 @@ class ProductLinkCheckerGenerateModuleFrontController extends ModuleFrontControl
|
||||
// Get base product link
|
||||
$base_link = $this->context->link->getProductLink($product, null, null, null, $id_lang, $id_shop);
|
||||
$all_links[] = $base_link;
|
||||
|
||||
|
||||
// Get links for combinations if they exist
|
||||
if ($product->hasAttributes()) {
|
||||
$combinations = $product->getAttributesResume($id_lang);
|
||||
@@ -90,4 +91,4 @@ class ProductLinkCheckerGenerateModuleFrontController extends ModuleFrontControl
|
||||
echo json_encode(array_values(array_unique($all_links)), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user