This commit is contained in:
2025-04-01 00:38:54 +02:00
parent d4d4c0c09d
commit 87da06293a
22351 changed files with 5168854 additions and 7538 deletions

View File

@@ -0,0 +1,19 @@
<?php
class ProductController extends ProductControllerCore
{
public function canonicalRedirection($canonical_url = '')
{
if (is_object($this->product) && Configuration::get('X13LINKREWRITE_PRODUCT_R')) {
if (!$this->product->active) {
$category = new Category($this->product->id_category_default);
if ($category->active) {
Tools::redirect($this->context->link->getCategoryLink($category->id));
die();
}
}
}
parent::canonicalRedirection($canonical_url);
}
}