Answer the question
In order to leave comments, you need to log in
How to change the default combination in a certain category in Prestashop?
How to change the default combination in a certain category in Prestashop?
Website Arthata.by
The essence of the problem and question:
There is a product with combinations of goods. I want to assign multiple product categories to this products. And based on the category, the desired combination should be selected when opening a product in this category or when viewing a product in this category.
I googled these lines of code, but I do not understand how to use:
public function setWsDefaultCombination($id_combination)
{
$this->deleteDefaultAttributes();
return $this->setDefaultAttribute((int) $id_combination);
}
if ($category->id == "21")
{$this->setDefaultAttribute(55);}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question