Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unused ProductController::assignAttributesCombinations() method and call #36056

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 0 additions & 24 deletions controllers/front/ProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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.
*/
Expand Down