/**
  * @return array
  */
 protected function _getOrderTaxes()
 {
     $result = array();
     foreach ($this->_orderTaxes as $taxPercent => $orderTax) {
         $orderTaxItem = new ShopgateExternalOrderTax();
         $orderTaxItem->setLabel($orderTax['tax_name']);
         $orderTaxItem->setTaxPercent($taxPercent);
         $orderTaxItem->setAmount($orderTax['price_tax_excl']);
         $result[] = $orderTaxItem;
     }
     return $result;
 }
Example #2
0
 /**
  * @param Mage_Sales_Model_Order $order
  * @return array
  */
 protected function _getOrderTaxFormatted($order)
 {
     $taxObjects = array();
     $info = $order->getFullTaxInfo();
     if (!empty($info)) {
         foreach ($info as $_tax) {
             $tax = new ShopgateExternalOrderTax();
             $tax->setAmount($_tax['amount']);
             $tax->setLabel($_tax['rates'][0]['title']);
             $tax->setTaxPercent((double) $_tax['percent']);
             array_push($taxObjects, $tax);
         }
     }
     return $taxObjects;
 }
Example #3
0
 public function visitExternalOrderTax(ShopgateExternalOrderTax $t)
 {
     // get properties and iterate (no complex types in ShopgateExternalOrderTax objects)
     $this->array = $this->iterateSimpleProperties($t->buildProperties());
 }