description = $description; $this->attribute = $attribute; return parent::__construct($context, $data); } public function getAttributeData($attribute_code){ return $this->attribute->get($attribute_code); } public function getShippingCategory(){ $_product = $this->description->getProduct(); $shipping_category = $_product->getResource()->getAttribute('shipping_category')->getFrontend()->getValue($_product); return $shipping_category; } }