当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Sales_Model_Quote::getGrandTotal方法代码示例

本文整理汇总了PHP中Mage_Sales_Model_Quote::getGrandTotal方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote::getGrandTotal方法的具体用法?PHP Mage_Sales_Model_Quote::getGrandTotal怎么用?PHP Mage_Sales_Model_Quote::getGrandTotal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Sales_Model_Quote的用法示例。


在下文中一共展示了Mage_Sales_Model_Quote::getGrandTotal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _updateQuote

 protected function _updateQuote(Mage_Sales_Model_Quote $quote)
 {
     if (!Mage::helper('recapture')->isEnabled()) {
         return $this;
     }
     if (!$quote->getId()) {
         return;
     }
     //sales_quote_save_before gets called like 5 times on some page loads, we don't want to do 5 updates per page load
     if (Mage::registry('recapture_has_posted')) {
         return;
     }
     Mage::register('recapture_has_posted', true);
     $mediaConfig = Mage::getModel('catalog/product_media_config');
     $storeId = Mage::app()->getStore();
     $transportData = array('first_name' => $quote->getCustomerFirstname(), 'last_name' => $quote->getCustomerLastname(), 'email' => $quote->getCustomerEmail(), 'external_id' => $quote->getId(), 'grand_total' => $quote->getGrandTotal(), 'products' => array(), 'totals' => array());
     $cartItems = $quote->getAllVisibleItems();
     foreach ($cartItems as $item) {
         $productModel = $item->getProduct();
         $productImage = (string) Mage::helper('catalog/image')->init($productModel, 'thumbnail');
         //check configurable first
         if ($item->getProductType() == 'configurable') {
             if (Mage::getStoreConfig('checkout/cart/configurable_product_image') == 'itself') {
                 $child = $productModel->getIdBySku($item->getSku());
                 $image = Mage::getResourceModel('catalog/product')->getAttributeRawValue($child, 'thumbnail', $storeId);
                 if ($image) {
                     $productImage = $mediaConfig->getMediaUrl($image);
                 }
             }
         }
         //then check grouped
         if (Mage::getStoreConfig('checkout/cart/grouped_product_image') == 'parent') {
             $options = $productModel->getTypeInstance(true)->getOrderOptions($productModel);
             if (isset($options['super_product_config']) && $options['super_product_config']['product_type'] == 'grouped') {
                 $parent = $options['super_product_config']['product_id'];
                 $image = Mage::getResourceModel('catalog/product')->getAttributeRawValue($parent, 'thumbnail', $storeId);
                 $productImage = $mediaConfig->getMediaUrl($image);
             }
         }
         $optionsHelper = Mage::helper('catalog/product_configuration');
         if ($item->getProductType() == 'configurable') {
             $visibleOptions = $optionsHelper->getConfigurableOptions($item);
         } else {
             $visibleOptions = $optionsHelper->getCustomOptions($item);
         }
         $product = array('name' => $item->getName(), 'sku' => $item->getSku(), 'price' => $item->getPrice(), 'qty' => $item->getQty(), 'image' => $productImage, 'options' => $visibleOptions);
         $transportData['products'][] = $product;
     }
     $totals = $quote->getTotals();
     foreach ($totals as $total) {
         //we pass grand total on the top level
         if ($total->getCode() == 'grand_total') {
             continue;
         }
         $total = array('name' => $total->getTitle(), 'amount' => $total->getValue());
         $transportData['totals'][] = $total;
     }
     Mage::helper('recapture/transport')->dispatch('cart', $transportData);
     return $this;
 }
开发者ID:recaptureio,项目名称:magento_connector,代码行数:60,代码来源:Observer.php

示例2: isAvailable

 /**
  * Check whether method is available
  *
  * @param Mage_Sales_Model_Quote|null $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     /* custom code written to round price here as roundPrice function was changed */
     $_grand_price = Mage::app()->getStore()->roundPrice($quote->getGrandTotal());
     $_grand_price = round($_grand_price, 2);
     return parent::isAvailable($quote) && !empty($quote) && $_grand_price == 0;
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:13,代码来源:Free.php

示例3: _buildParams

 /**
  * @param Mage_Sales_Model_Quote $quote
  * @return array
  */
 protected function _buildParams($quote)
 {
     $billingAddress = $quote->getBillingAddress();
     $gender = 'female';
     if ($quote->getCustomerGender() == self::GENDER_MALE) {
         $gender = 'male';
     }
     $street = preg_split("/\\s+(?=\\S*+\$)/", $billingAddress->getStreet1());
     $params = array('gender' => $gender, 'firstname' => $billingAddress->getFirstname(), 'lastname' => $billingAddress->getLastname(), 'country' => $billingAddress->getCountry(), 'street' => $street[0], 'housenumber' => $street[1], 'zip' => $billingAddress->getPostcode(), 'city' => $billingAddress->getCity(), 'birthday' => $this->_formatDob($quote->getCustomerDob()), 'currency' => 'EUR', 'amount' => $this->_formatAmount($quote->getGrandTotal()));
     return $params;
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:15,代码来源:Authorization.php

示例4: testCollectTotalsWithVirtual

 /**
  * @magentoDataFixture Mage/Catalog/_files/product_virtual.php
  * @magentoDataFixture Mage/Sales/_files/quote.php
  */
 public function testCollectTotalsWithVirtual()
 {
     $quote = new Mage_Sales_Model_Quote();
     $quote->load('test01', 'reserved_order_id');
     $product = new Mage_Catalog_Model_Product();
     $product->load(21);
     $quote->addProduct($product);
     $quote->collectTotals();
     $this->assertEquals(2, $quote->getItemsQty());
     $this->assertEquals(1, $quote->getVirtualItemsQty());
     $this->assertEquals(20, $quote->getGrandTotal());
     $this->assertEquals(20, $quote->getBaseGrandTotal());
 }
开发者ID:nemphys,项目名称:magento2,代码行数:17,代码来源:QuoteTest.php

示例5: start

 /**
  * Reserve order ID for specified quote and start checkout on PayPal
  *
  * @return mixed
  */
 public function start()
 {
     $this->_quote->collectTotals();
     if (!$this->_quote->getGrandTotal() && !$this->_quote->hasNominalItems()) {
         Mage::throwException(Mage::helper('payone_core')->__('PayPal does not support processing orders with zero amount. To complete your purchase, proceed to the standard checkout process.'));
     }
     $this->_quote->reserveOrderId()->save();
     $service = $this->getFactory()->getServicePaymentGenericpayment($this->_config);
     $mapper = $service->getMapper();
     $request = $mapper->mapExpressCheckoutParameters($this->_quote);
     $response = $this->getFactory()->getServiceApiPaymentGenericpayment()->request($request);
     if ($response instanceof Payone_Api_Response_Genericpayment_Redirect) {
         $this->_redirectUrl = $response->getRedirecturl();
         $this->_workorderid = $response->getWorkorderId();
     }
 }
开发者ID:kirchbergerknorr,项目名称:payone-magento,代码行数:21,代码来源:Checkout.php

示例6: mapExpressCheckoutParameters

 /**
  * @param Mage_Sales_Model_Quote $quote
  */
 public function mapExpressCheckoutParameters($quote, $workOrderId = null)
 {
     $request = $this->getRequest();
     $this->mapDefaultParameters($request);
     $paydata = new Payone_Api_Request_Parameter_Paydata_Paydata();
     if (null === $workOrderId) {
         $paydata->addItem(new Payone_Api_Request_Parameter_Paydata_DataItem(array('key' => 'action', 'data' => Payone_Api_Enum_GenericpaymentAction::PAYPAL_ECS_SET_EXPRESSCHECKOUT)));
     } else {
         $paydata->addItem(new Payone_Api_Request_Parameter_Paydata_DataItem(array('key' => 'action', 'data' => Payone_Api_Enum_GenericpaymentAction::PAYPAL_ECS_GET_EXPRESSCHECKOUTDETAILS)));
         $request->setWorkorderId($workOrderId);
     }
     $request->setPaydata($paydata);
     $request->setAid($this->getConfigPayment()->getAid());
     $request->setClearingtype(Payone_Enum_ClearingType::WALLET);
     $request->setAmount($quote->getGrandTotal());
     $request->setCurrency($quote->getQuoteCurrencyCode());
     $request->setWallet(new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet(array('wallettype' => Payone_Api_Enum_WalletType::PAYPAL_EXPRESS, 'successurl' => Mage::helper('payone_core/url')->getMagentoUrl('*/*/return'), 'errorurl' => Mage::helper('payone_core/url')->getMagentoUrl('*/*/error'), 'backurl' => Mage::helper('payone_core/url')->getMagentoUrl('*/*/cancel'))));
     return $request;
 }
开发者ID:kirchbergerknorr,项目名称:Payone_Core,代码行数:22,代码来源:Genericpayment.php

示例7: start

 /**
  * Reserve order ID for specified quote and start checkout on PayPal
  *
  * @param string
  * @param string
  * @param bool|null $button specifies if we came from Checkout Stream or from Product/Cart directly
  * @return mixed
  */
 public function start($returnUrl, $cancelUrl, $button = null)
 {
     $this->_quote->collectTotals();
     if (!$this->_quote->getGrandTotal() && !$this->_quote->hasNominalItems()) {
         Mage::throwException($this->_helper->__(self::EBAYENTERPRISE_PAYPAL_ZERO_CHECKOUT_NOT_SUPPORTED));
     }
     $this->_quote->reserveOrderId()->save();
     $this->_getApi();
     $setExpressCheckoutReply = $this->_api->setExpressCheckout($returnUrl, $cancelUrl, $this->_quote);
     if ($button) {
         // mark the payment to indicate express checkout was initiated from
         // outside the normal checkout flow
         // (e.g. clicked paypal checkout button from product page)
         $setExpressCheckoutReply[self::PAYMENT_INFO_BUTTON] = 1;
     }
     $this->_quote->getPayment()->importData($setExpressCheckoutReply);
     $this->_quote->getPayment()->save();
     return $setExpressCheckoutReply;
 }
开发者ID:adderall,项目名称:magento-retail-order-management,代码行数:27,代码来源:Checkout.php

示例8: getShoppingCartXML

 /**
  * Get Shopping Cart XML
  * @param Mage_Sales_Model_Quote $quote
  * @return string
  */
 public function getShoppingCartXML($quote)
 {
     $dom = new DOMDocument('1.0', 'utf-8');
     $ShoppingCart = $dom->createElement('ShoppingCart');
     $dom->appendChild($ShoppingCart);
     $ShoppingCart->appendChild($dom->createElement('CurrencyCode', $quote->getQuoteCurrencyCode()));
     $ShoppingCart->appendChild($dom->createElement('Subtotal', (int) (100 * $quote->getGrandTotal())));
     // Add Order Lines
     $items = $quote->getAllVisibleItems();
     /** @var $item Mage_Sales_Model_Quote_Item */
     foreach ($items as $item) {
         $product = $item->getProduct();
         $ShoppingCartItem = $dom->createElement('ShoppingCartItem');
         $ShoppingCartItem->appendChild($dom->createElement('Description', $item->getName()));
         $ShoppingCartItem->appendChild($dom->createElement('Quantity', (int) $item->getQty()));
         $ShoppingCartItem->appendChild($dom->createElement('Value', (int) bcmul($product->getFinalPrice(), 100)));
         $ShoppingCartItem->appendChild($dom->createElement('ImageURL', $product->getThumbnailUrl()));
         // NOTE: getThumbnailUrl is DEPRECATED!
         $ShoppingCart->appendChild($ShoppingCartItem);
     }
     return str_replace("\n", '', $dom->saveXML());
 }
开发者ID:AndreKlang,项目名称:Payex-Modules-Test,代码行数:27,代码来源:Order.php

示例9: sendPaymentFailedEmail

 /**
  * Send email id payment was failed
  *
  * @param Mage_Sales_Model_Quote $checkout
  * @param string $message
  * @param string $checkoutType
  * @return Mage_Checkout_Helper_Data
  */
 public function sendPaymentFailedEmail($checkout, $message, $checkoutType = 'onepage')
 {
     $translate = Mage::getSingleton('Mage_Core_Model_Translate');
     /* @var $translate Mage_Core_Model_Translate */
     $translate->setTranslateInline(false);
     $mailTemplate = Mage::getModel('Mage_Core_Model_Email_Template');
     /* @var $mailTemplate Mage_Core_Model_Email_Template */
     $template = Mage::getStoreConfig('checkout/payment_failed/template', $checkout->getStoreId());
     $copyTo = $this->_getEmails('checkout/payment_failed/copy_to', $checkout->getStoreId());
     $copyMethod = Mage::getStoreConfig('checkout/payment_failed/copy_method', $checkout->getStoreId());
     if ($copyTo && $copyMethod == 'bcc') {
         $mailTemplate->addBcc($copyTo);
     }
     $_reciever = Mage::getStoreConfig('checkout/payment_failed/reciever', $checkout->getStoreId());
     $sendTo = array(array('email' => Mage::getStoreConfig('trans_email/ident_' . $_reciever . '/email', $checkout->getStoreId()), 'name' => Mage::getStoreConfig('trans_email/ident_' . $_reciever . '/name', $checkout->getStoreId())));
     if ($copyTo && $copyMethod == 'copy') {
         foreach ($copyTo as $email) {
             $sendTo[] = array('email' => $email, 'name' => null);
         }
     }
     $shippingMethod = '';
     if ($shippingInfo = $checkout->getShippingAddress()->getShippingMethod()) {
         $data = explode('_', $shippingInfo);
         $shippingMethod = $data[0];
     }
     $paymentMethod = '';
     if ($paymentInfo = $checkout->getPayment()) {
         $paymentMethod = $paymentInfo->getMethod();
     }
     $items = '';
     foreach ($checkout->getAllVisibleItems() as $_item) {
         /* @var $_item Mage_Sales_Model_Quote_Item */
         $items .= $_item->getProduct()->getName() . '  x ' . $_item->getQty() . '  ' . $checkout->getStoreCurrencyCode() . ' ' . $_item->getProduct()->getFinalPrice($_item->getQty()) . "\n";
     }
     $total = $checkout->getStoreCurrencyCode() . ' ' . $checkout->getGrandTotal();
     foreach ($sendTo as $recipient) {
         $mailTemplate->setDesignConfig(array('area' => Mage_Core_Model_App_Area::AREA_FRONTEND, 'store' => $checkout->getStoreId()))->sendTransactional($template, Mage::getStoreConfig('checkout/payment_failed/identity', $checkout->getStoreId()), $recipient['email'], $recipient['name'], array('reason' => $message, 'checkoutType' => $checkoutType, 'dateAndTime' => Mage::app()->getLocale()->date(), 'customer' => $checkout->getCustomerFirstname() . ' ' . $checkout->getCustomerLastname(), 'customerEmail' => $checkout->getCustomerEmail(), 'billingAddress' => $checkout->getBillingAddress(), 'shippingAddress' => $checkout->getShippingAddress(), 'shippingMethod' => Mage::getStoreConfig('carriers/' . $shippingMethod . '/title'), 'paymentMethod' => Mage::getStoreConfig('payment/' . $paymentMethod . '/title'), 'items' => nl2br($items), 'total' => $total));
     }
     $translate->setTranslateInline(true);
     return $this;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:49,代码来源:Data.php

示例10: getRequestPayment

 /**
  * Gets all needed Informations for payment Block of the Request
  *
  * @param Mage_Sales_Model_Quote|Mage_Sales_Model_Order $object
  * @param float amount
  * @param string $request
  * @return array
  */
 public function getRequestPayment($object, $amount = '', $request = '')
 {
     $paymentMethod = $object->getPayment()->getMethod();
     $payment = array();
     switch ($paymentMethod) {
         case 'ratepay_rechnung':
             $payment['method'] = 'INVOICE';
             break;
         case 'ratepay_rate0':
         case 'ratepay_rate':
             if ($request == 'PAYMENT_REQUEST') {
                 $payment['installmentNumber'] = Mage::getSingleton('ratepaypayment/session')->{'get' . Mage::helper('ratepaypayment')->convertUnderlineToCamelCase($paymentMethod) . 'NumberOfRatesFull'}();
                 $payment['installmentAmount'] = Mage::getSingleton('ratepaypayment/session')->{'get' . Mage::helper('ratepaypayment')->convertUnderlineToCamelCase($paymentMethod) . 'Rate'}();
                 $payment['lastInstallmentAmount'] = Mage::getSingleton('ratepaypayment/session')->{'get' . Mage::helper('ratepaypayment')->convertUnderlineToCamelCase($paymentMethod) . 'LastRate'}();
                 $payment['interestRate'] = Mage::getSingleton('ratepaypayment/session')->{'get' . Mage::helper('ratepaypayment')->convertUnderlineToCamelCase($paymentMethod) . 'InterestRate'}();
                 if ($this->isDynamicDue()) {
                     $payment['paymentFirstDay'] = Mage::getSingleton('ratepaypayment/session')->getRatepayPaymentFirstDay();
                 } else {
                     $payment['paymentFirstDay'] = '28';
                 }
             }
             $payment['method'] = 'INSTALLMENT';
             if (Mage::getSingleton('ratepaypayment/session')->getDirectDebitFlag()) {
                 $payment['debitType'] = 'DIRECT-DEBIT';
             } else {
                 $payment['debitType'] = 'BANK-TRANSFER';
             }
             break;
         case 'ratepay_directdebit':
             $payment['method'] = 'ELV';
             break;
     }
     if ($object instanceof Mage_Sales_Model_Order) {
         $payment['currency'] = $object->getOrderCurrencyCode();
     } else {
         $payment['currency'] = $object->getQuoteCurrencyCode();
     }
     if (is_numeric($amount)) {
         $payment['amount'] = $amount;
     } else {
         $payment['amount'] = $object->getGrandTotal();
     }
     // Ensure that the basket amout is never less than zero
     // In certain cases (i.e. in case of maloperation) the amount can become < 0
     if ($payment['amount'] < 0) {
         $payment['amount'] = 0;
     }
     return $payment;
 }
开发者ID:ratepay,项目名称:magento-module,代码行数:57,代码来源:Mapping.php

示例11: CreateMagentoShopRequest


//.........这里部分代码省略.........
     }
     if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && !empty($_POST["billing"]["company"])) {
         $request->setCompanyName1(trim($_POST["billing"]["company"], '-'));
     }
     $request->setTelephonePrivate((string) trim($quote->getBillingAddress()->getTelephone(), '-'));
     if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && !empty($_POST["billing"]["telephone"])) {
         $request->setTelephonePrivate(trim($_POST["billing"]["telephone"], '-'));
     }
     $request->setEmail((string) $quote->getBillingAddress()->getEmail());
     if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && !empty($_POST["billing"]["email"])) {
         $request->setEmail((string) $_POST["billing"]["email"]);
     }
     Mage::getSingleton('checkout/session')->setData('gender_amasty', '');
     if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty') {
         $g = isset($_POST["billing"]["gender"]) ? $_POST["billing"]["gender"] : '';
         $request->setGender($g);
         Mage::getSingleton('checkout/session')->setData('gender_amasty', $g);
     }
     if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && !empty($_POST["billing"]["prefix"])) {
         if (strtolower($_POST["billing"]["prefix"]) == 'herr') {
             $request->setGender('1');
             Mage::getSingleton('checkout/session')->setData('gender_amasty', '1');
         } else {
             if (strtolower($_POST["billing"]["prefix"]) == 'frau') {
                 $request->setGender('2');
                 Mage::getSingleton('checkout/session')->setData('gender_amasty', '2');
             }
         }
     }
     $extraInfo["Name"] = 'ORDERCLOSED';
     $extraInfo["Value"] = 'NO';
     $request->setExtraInfo($extraInfo);
     $extraInfo["Name"] = 'ORDERAMOUNT';
     $extraInfo["Value"] = number_format($quote->getGrandTotal(), 2, '.', '');
     $request->setExtraInfo($extraInfo);
     $extraInfo["Name"] = 'ORDERCURRENCY';
     $extraInfo["Value"] = $quote->getBaseCurrencyCode();
     $request->setExtraInfo($extraInfo);
     $extraInfo["Name"] = 'IP';
     $extraInfo["Value"] = $this->getClientIp();
     $request->setExtraInfo($extraInfo);
     $sesId = Mage::getSingleton('checkout/session')->getData("byjuno_session_id");
     if (Mage::getStoreConfig('byjuno/api/tmxenabled', Mage::app()->getStore()) == 'enable' && !empty($sesId)) {
         $extraInfo["Name"] = 'DEVICE_FINGERPRINT_ID';
         $extraInfo["Value"] = Mage::getSingleton('checkout/session')->getData("byjuno_session_id");
         $request->setExtraInfo($extraInfo);
     }
     /* shipping information */
     if (!$quote->isVirtual()) {
         $extraInfo["Name"] = 'DELIVERY_FIRSTNAME';
         $extraInfo["Value"] = $quote->getShippingAddress()->getFirstname();
         if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && empty($_POST["shipping"]["same_as_billing"])) {
             if (!empty($_POST["shipping"]["firstname"])) {
                 $extraInfo["Value"] = $_POST["shipping"]["firstname"];
             }
         }
         $request->setExtraInfo($extraInfo);
         $extraInfo["Name"] = 'DELIVERY_LASTNAME';
         $extraInfo["Value"] = $quote->getShippingAddress()->getLastname();
         if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && empty($_POST["shipping"]["same_as_billing"])) {
             if (!empty($_POST["shipping"]["lastname"])) {
                 $extraInfo["Value"] = $_POST["shipping"]["lastname"];
             }
         }
         $request->setExtraInfo($extraInfo);
         $extraInfo["Name"] = 'DELIVERY_FIRSTLINE';
开发者ID:istgin,项目名称:Byjuno,代码行数:67,代码来源:Observer.php

示例12: getMethodsForQuote

 /**
  * Get Available Methods for Type by Quote
  *
  * @param $type
  * @param Mage_Sales_Model_Quote $quote
  * @return array
  */
 public function getMethodsForQuote($type, Mage_Sales_Model_Quote $quote)
 {
     $country = $quote->getBillingAddress()->getCountry();
     $quoteTotal = $quote->getGrandTotal();
     $methodsForCountry = $this->getMethodsForCountry($type, $country);
     $methods = array();
     foreach ($methodsForCountry as $key => $method) {
         /** @var $method Payone_Core_Model_Config_Payment_Method_Interface */
         $maxOrderTotal = $method->getMaxOrderTotal();
         $minOrderTotal = $method->getMinOrderTotal();
         if (!empty($maxOrderTotal) and $maxOrderTotal < $quoteTotal) {
             continue;
             // quote total too high.
         }
         if (!empty($minOrderTotal) and $minOrderTotal > $quoteTotal) {
             continue;
             // quote total is too low.
         }
         $methods[] = $method;
     }
     return $methods;
 }
开发者ID:kirchbergerknorr,项目名称:payone-magento,代码行数:29,代码来源:Payment.php

示例13: buildAmount

 /**
  * Build Amount
  *
  * @param Mage_Sales_Model_Quote $quote
  * @return Amount
  */
 protected function buildAmount($quote)
 {
     $details = new Details();
     $details->setShipping($quote->getShippingAddress()->getShippingAmount())->setTax($quote->getShippingAddress()->getTaxAmount())->setSubtotal($quote->getSubtotalWithDiscount() + $quote->getShippingAddress()->getHiddenTaxAmount());
     /*- $quote->getShippingAddress()->getBaseGiftcertAmount()*/
     $amount = new Amount();
     $amount->setCurrency(Mage::app()->getStore()->getCurrentCurrencyCode())->setDetails($details)->setTotal($quote->getGrandTotal());
     return $amount;
 }
开发者ID:sickdaflip,项目名称:Iways_PayPalPlus-1.4.5,代码行数:15,代码来源:Api.php

示例14: _hasZeroGrandTotal

 /**
  * Check if the quote has zero grandtotal.
  * @param  Mage_Sales_Model_Quote $quote
  * @return bool
  */
 protected function _hasZeroGrandTotal(Mage_Sales_Model_Quote $quote)
 {
     return !$quote->validateMinimumAmount() || !$quote->getGrandTotal() && !$quote->hasNominalItems();
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:9,代码来源:Shortcut.php

示例15: _filterQuote

 /**
  * @param Mage_Sales_Model_Quote $quote
  *
  * @return Bronto_Common_Model_Email_Template_Filter
  */
 protected function _filterQuote(Mage_Sales_Model_Quote $quote)
 {
     if (!in_array('quote', $this->_filteredObjects)) {
         $this->setStoreId($quote->getStoreId());
         $currencyCode = $quote->getQuoteCurrencyCode();
         if (Mage::helper('bronto_common')->displayPriceIncTax($quote->getStoreId())) {
             $totals = $quote->getTotals();
             $this->setField('subtotal', $this->formatPrice($totals['subtotal']->getValue(), $currencyCode));
             $this->setField('grandTotal', $this->formatPrice($totals['grand_total']->getValue(), $currencyCode));
         } else {
             $this->setField('subtotal', $this->formatPrice($quote->getSubtotal(), $currencyCode));
             $this->setField('grandTotal', $this->formatPrice($quote->getGrandTotal(), $currencyCode));
         }
         $index = 1;
         foreach ($quote->getAllItems() as $item) {
             if (!$item->getParentItem()) {
                 $this->_filterQuoteItem($item, $index);
                 $index++;
             }
         }
         // Add Related Content
         $this->_items = $quote->getAllItems();
         $queryParams = $this->getQueryParams();
         $queryParams['id'] = urlencode(base64_encode(Mage::helper('core')->encrypt($quote->getId())));
         if ($store = $this->getStore()) {
             $this->setField('quoteURL', $store->getUrl('reminder/load/index', $queryParams));
         } else {
             $this->setField('quoteURL', Mage::getUrl('reminder/load/index', $queryParams));
         }
         // Setup quote items as a template
         if (class_exists('Bronto_Reminder_Block_Cart_Items', false)) {
             $layout = Mage::getSingleton('core/layout');
             /* @var $items Mage_Sales_Block_Items_Abstract */
             $items = $layout->createBlock('bronto/bronto_reminder_cart_items', 'items');
             $items->setTemplate('bronto/reminder/items.phtml');
             $items->setQuote($item->getQuote());
             $this->_respectDesignTheme();
             $this->setField("cartItems", $items->toHtml());
         }
         $this->_filteredObjects[] = 'quote';
     }
     return $this;
 }
开发者ID:bevello,项目名称:bevello,代码行数:48,代码来源:Filter.php


注:本文中的Mage_Sales_Model_Quote::getGrandTotal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。