Beispiel #1
0
 protected function _toHtml()
 {
     $totals = $this->getTotals();
     $total = $totals['grand_total']->getValue();
     $address = $totals['grand_total']->getAddress();
     $subtotal = $totals['subtotal']->getValue();
     if ($this->getQuote()->getSubtotal() < Mage::helper('fastcheckout')->confDefaultMinPrice()) {
         $obj = Mage::getModel('sales/quote_address_total');
         $obj->setCode('shipping');
         $obj->setTitle('Доставка');
         $obj->setValue(Mage::helper('fastcheckout')->confTax());
         $obj->setAddress($address);
         $address->setShippingAmount(Mage::helper('fastcheckout')->confTax());
         $totals['shipping'] = $obj;
         $total = $totals['grand_total']->getValue();
         $totals['grand_total']->setValue($total + Mage::helper('fastcheckout')->confTax());
         $total = $total + Mage::helper('fastcheckout')->confTax();
     }
     $obj = Mage::getModel('sales/quote_address_total');
     $obj->setCode('other_total');
     $obj->setTitle('Итоговая сумма:');
     $obj->setValue($subtotal);
     $obj->setArea('other_footer');
     $obj->setAddress($address);
     $totals['other_total'] = $obj;
     $this->setMyTotals($totals);
     Mage::helper('fastcheckout')->setPrice($subtotal . ' руб.');
     return parent::_toHtml();
 }