Example #1
0
 /**
  * Create and return new order item based on profile item data and $itemInfo
  * for initial payment
  *
  * @param Varien_Object $itemInfo
  * @return Mage_Sales_Model_Order_Item
  */
 protected function _getInitialItem($itemInfo)
 {
     $price = $itemInfo->getPrice() ? $itemInfo->getPrice() : $this->getInitAmount();
     $shippingAmount = $itemInfo->getShippingAmount() ? $itemInfo->getShippingAmount() : 0;
     $taxAmount = $itemInfo->getTaxAmount() ? $itemInfo->getTaxAmount() : 0;
     $item = Mage::getModel('sales/order_item')->setStoreId($this->getStoreId())->setProductType(Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL)->setIsVirtual(1)->setSku('initial_fee')->setName(Mage::helper('sales')->__('Recurring Profile Initial Fee'))->setDescription('')->setWeight(0)->setQtyOrdered(1)->setPrice($price)->setOriginalPrice($price)->setBasePrice($price)->setBaseOriginalPrice($price)->setRowTotal($price)->setBaseRowTotal($price)->setTaxAmount($taxAmount)->setShippingAmount($shippingAmount);
     $option = array('label' => Mage::helper('sales')->__('Payment type'), 'value' => Mage::helper('sales')->__('Initial period payment'));
     $this->_addAdditionalOptionToItem($item, $option);
     return $item;
 }
Example #2
0
 /**
  * Retrieve subtotal price include tax html formated content
  *
  * @param Varien_Object $item
  * @return string
  */
 public function displaySubtotalInclTax($item)
 {
     $baseTax = $item->getTaxBeforeDiscount() ? $item->getTaxBeforeDiscount() : ($item->getTaxAmount() ? $item->getTaxAmount() : 0);
     $tax = $item->getBaseTaxBeforeDiscount() ? $item->getBaseTaxBeforeDiscount() : ($item->getBaseTaxAmount() ? $item->getBaseTaxAmount() : 0);
     return $this->displayPrices($item->getBaseRowTotal() + $baseTax, $item->getRowTotal() + $tax);
 }
Example #3
0
 /**
  * Get sales item (quote item, order item etc) row total price including tax
  *
  * @param   Varien_Object $item
  * @return  float
  */
 public function getSubtotalInclTax($item)
 {
     if ($item->getRowTotalInclTax()) {
         return $item->getRowTotalInclTax();
     }
     //Since tax amount contains weee tax
     $tax = $item->getTaxAmount() + $item->getDiscountTaxCompensation() - $this->_getWeeeHelper()->getTotalRowTaxAppliedForWeeeTax($item);
     return $item->getRowTotal() + $tax;
 }
Example #4
0
 /**
  * Get sales item (quote item, order item etc) row total price including tax
  *
  * @param   Varien_Object $item
  * @return  float
  */
 public function getSubtotalInclTax($item)
 {
     if ($item->getRowTotalInclTax()) {
         return $item->getRowTotalInclTax();
     }
     $tax = $item->getTaxAmount() + $item->getDiscountTaxCompensation();
     return $item->getRowTotal() + $tax;
 }
 public function renderExport(Varien_Object $_item)
 {
     return Mage::helper('mageworx_customerplus')->displayPrices($_item->getBaseRowTotal() - $_item->getBaseDiscountAmount() + $_item->getBaseTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount(), $_item->getRowTotal() - $_item->getDiscountAmount() + $_item->getTaxAmount() + $_item->getWeeeTaxAppliedRowAmount(), $_item->getOrderId());
 }