From e9d060ee36e58f50bf949f1d13374c503d70a0be Mon Sep 17 00:00:00 2001 From: Gabriel Tenita Date: Tue, 30 Apr 2024 05:53:43 +0300 Subject: [PATCH] Removed assignAttributesCombinations() method and call --- controllers/front/ProductController.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 7777ea54ac1ba..aa20bed82a796 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -374,9 +374,6 @@ public function initContent() // Assign template vars related to the price and tax $this->assignPriceAndTax(); - // Assign attributes combinations to the template - $this->assignAttributesCombinations(); - // Add notification about this product being in cart $this->addCartQuantityNotification(); @@ -879,27 +876,6 @@ protected function assignAttributesGroups(?ProductLazyArray $product_for_templat } } - /** - * Get and assign attributes combinations informations. - */ - protected function assignAttributesCombinations() - { - $attributes_combinations = Product::getAttributesInformationsByProduct($this->product->id); - if (is_array($attributes_combinations) && count($attributes_combinations)) { - foreach ($attributes_combinations as &$ac) { - foreach ($ac as &$val) { - $val = str_replace(Configuration::get('PS_ATTRIBUTE_ANCHOR_SEPARATOR'), '_', Tools::str2url(str_replace([',', '.'], '-', $val))); - } - } - } else { - $attributes_combinations = []; - } - $this->context->smarty->assign([ - 'attributesCombinations' => $attributes_combinations, - 'attribute_anchor_separator' => Configuration::get('PS_ATTRIBUTE_ANCHOR_SEPARATOR'), - ]); - } - /** * Assign template vars related to category. */