public function initGroupTable() { $combinations_groups = $this->product->getAttributesGroups($this->context->language->id); $attributes = array(); $impacts = Product::getAttributesImpacts($this->product->id); foreach ($combinations_groups as &$combination) { $target =& $attributes[$combination['id_attribute_group']][$combination['id_attribute']]; $target = $combination; if (isset($impacts[$combination['id_attribute']])) { $target['price'] = $impacts[$combination['id_attribute']]['price']; $target['weight'] = $impacts[$combination['id_attribute']]['weight']; } } $this->context->smarty->assign(array('currency_sign' => $this->context->currency->sign, 'weight_unit' => Configuration::get('PS_WEIGHT_UNIT'), 'attributes' => $attributes)); }