/** * @ describe the function ->. */ function getProductType() { $this->product_type_id = modApiFunc('Catalog', 'getCurrentProductTypeID'); $this->product_type_ext = parent::getProductType(); foreach ($this->product_type_ext as $group_id => $group) { foreach ($group['attr'] as $attr_id => $attr) { // specify the attributes, which can't have default values. if ($attr['view_tag'] == 'LargeImage' || $attr['view_tag'] == 'SmallImage' || $attr['view_tag'] == 'ImageAltText' || $attr['view_tag'] == 'ID' || $attr['view_tag'] == 'Name') { $this->product_type_ext[$group_id]['attr'][$attr_id]['input_type_name'] = 'read-only'; } // specify the attributes, which can't be invisible if ($attr['view_tag'] == 'ID' || $attr['view_tag'] == 'Name' || $attr['view_tag'] == 'SalePrice') { $this->product_type_ext[$group_id]['attr'][$attr_id]['vanishing'] = false; } else { $this->product_type_ext[$group_id]['attr'][$attr_id]['vanishing'] = true; } } } $product_type = modApiFunc('Catalog', 'getProductType', $this->product_type_id); $this->product_type_name = $product_type['name']; $this->product_type_descr = $product_type['description']; }
/** * @ describe the function ->. */ function getProductType() { $this->product_type_id = 1; $this->product_type_ext = parent::getProductType(); foreach ($this->product_type_ext as $group_id => $group) { foreach ($group['attr'] as $attr_id => $attr) { // specify the attributes, which can't have default values. if ($attr['view_tag'] == 'LargeImage' || $attr['view_tag'] == 'SmallImage' || $attr['view_tag'] == 'ImageAltText' || $attr['view_tag'] == 'ID' || $attr['view_tag'] == 'Name') { $this->product_type_ext[$group_id]['attr'][$attr_id]['input_type_name'] = 'read-only'; } // specify the attributes, which can't be invisible if ($attr['view_tag'] == 'ID' || $attr['view_tag'] == 'Name' || $attr['view_tag'] == 'SalePrice') { $this->product_type_ext[$group_id]['attr'][$attr_id]['vanishing'] = false; } else { $this->product_type_ext[$group_id]['attr'][$attr_id]['vanishing'] = true; } // delete all default values $this->product_type_ext[$group_id]['attr'][$attr_id]['default'] = ""; // specify all atributes as visible ones $this->product_type_ext[$group_id]['attr'][$attr_id]['visible'] = true; } } $this->product_type_name = ''; $this->product_type_descr = ''; }