/** * set tax percent */ public function setTaxPercent() { parent::setTaxPercent((double) $this->getAdditionalInfo('tax_percent')); }
/** * set tax percentage */ public function setTaxPercent() { if ($this->item->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE && $this->item->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC) { $childIds = $this->item->getTypeInstance()->getChildrenIds($this->item->getId()); $taxRates = array(); foreach ($childIds as $childOption) { foreach ($childOption as $childId) { $product = Mage::getModel('catalog/product')->setStoreId($this->_getConfig()->getStoreViewId())->load($childId); $taxRates[] = $this->_getTaxRate($product); } } parent::setTaxPercent(max($taxRates)); } else { if (!($this->item->getTaxClassId() == Shopgate_Framework_Model_Export_Product_Xml::DEFAULT_TAX_CLASS_ID_NONE && $this->_parent)) { $taxPercent = $this->_getTaxRate($this->item); if (!empty($taxPercent)) { parent::setTaxPercent($this->_getTaxRate($this->item)); } } } }