Exemplo n.º 1
0
 /**
  * Update WEEE amounts discount percents
  *
  * @param   \Magento\Framework\Event\Observer $observer
  * @return  $this
  */
 public function updateDiscountPercents(\Magento\Framework\Event\Observer $observer)
 {
     if (!$this->_weeeData->isEnabled()) {
         return $this;
     }
     $productCondition = $observer->getEvent()->getProductCondition();
     if ($productCondition) {
         $eventProduct = $productCondition;
     } else {
         $eventProduct = $observer->getEvent()->getProduct();
     }
     $this->_weeeTax->updateProductsDiscountPercent($eventProduct);
     return $this;
 }