diff --git a/controllers/front/category.php b/controllers/front/category.php new file mode 100644 index 0000000..c2773ef --- /dev/null +++ b/controllers/front/category.php @@ -0,0 +1,86 @@ +id, $id_lang, $id_shop); + if (Tools::getValue('plc_only_active') && !$category->active) { + continue; + } + $data = [ + 'id_category' => $category->id, + 'id_parent' => $category->id_parent, + 'active' => $category->active, + ]; + Tools::getValue('plc_name') ? $data['name'] = $category->name : null; + Tools::getValue('plc_link_rewrite') ? $data['link_rewrite'] = $category->link_rewrite : null; + Tools::getValue('plc_description') ? $data['description'] = $category->description : null; + Tools::getValue('plc_additional_description') ? $data['additional_description'] = $category->additional_description : null; + Tools::getValue('plc_meta_title') ? $data['meta_title'] = $category->meta_title : null; + Tools::getValue('plc_meta_description') ? $data['meta_description'] = $category->meta_description : null; + + + + $categoriesData[] = $data; + } + } + } + $response = new JsonResponse($categoriesData); + $response->send(); + exit; + } +} diff --git a/controllers/front/productdatagenerate.php b/controllers/front/product.php similarity index 98% rename from controllers/front/productdatagenerate.php rename to controllers/front/product.php index b5e369b..e463be9 100644 --- a/controllers/front/productdatagenerate.php +++ b/controllers/front/product.php @@ -7,7 +7,7 @@ * with detailed information for external services. */ -class ProductLinkCheckerProductDataGenerateModuleFrontController extends ModuleFrontController +class ProductLinkCheckerProductModuleFrontController extends ModuleFrontController { public function init() {