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


PHP Mage_Sales_Model_Quote::getData方法代码示例

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


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

示例1: _addErrorMessage

 /**
  * Add error message if estimation has error
  *
  * @param Mage_Sales_Model_Quote $quote
  * @return $this
  */
 protected function _addErrorMessage($quote)
 {
     if ($quote->getData('estimate_tax_error')) {
         $this->_getErrorsHelper()->addErrorMessage($quote);
     }
     return $this;
 }
开发者ID:onepica,项目名称:avatax,代码行数:13,代码来源:Abstract.php

示例2: resetQuote

 protected function resetQuote(Mage_Sales_Model_Quote $quote)
 {
     if (!$quote->getData('__applied_rules_reset__')) {
         $quote->setAppliedRuleIds('');
         $quote->setData('__applied_rules_reset__', true);
     }
 }
开发者ID:aoepeople,项目名称:aoe_salesrule,代码行数:7,代码来源:Discount.php

示例3: getCouponCode

 public function getCouponCode($all = false)
 {
     if (in_array(Mage::app()->getRequest()->getActionName(), array('couponPost', 'add_coupon'))) {
         if ($all) {
             return parent::getData('coupon_code');
         }
         $coupons = explode(',', parent::getData('coupon_code'));
         if (count($coupons)) {
             //return the last added, for the right validation
             return $coupons[count($coupons) - 1];
         }
     }
     return parent::getData('coupon_code');
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:14,代码来源:Amasty_Coupons_Model_Sales_Quote.php

示例4: isQuoteAdyenSubscription

 /**
  * @param Mage_Sales_Model_Quote $quote
  *
  * @return mixed|Varien_Object
  */
 public function isQuoteAdyenSubscription(Mage_Sales_Model_Quote $quote)
 {
     if (!$quote->hasData('_is_adyen_subscription')) {
         foreach ($quote->getAllItems() as $quoteItem) {
             /** @var Mage_Sales_Model_Quote_Item $quoteItem */
             $additionalOptions = $quoteItem->getOptionByCode('additional_options');
             if (!$additionalOptions) {
                 continue;
             }
             $options = unserialize($additionalOptions->getValue());
             foreach ($options as $option) {
                 if ($option['code'] == 'adyen_subscription' && $option['option_value'] != 'none') {
                     $quote->setData('_is_adyen_subscription', true);
                     $quoteItem->setData('_adyen_subscription', $option['option_value']);
                     return $quote->getData('_is_adyen_subscription');
                 }
             }
         }
         $quote->setData('_is_adyen_subscription', false);
     }
     return $quote->getData('_is_adyen_subscription');
 }
开发者ID:sandermangel,项目名称:adyen-magento-subscription,代码行数:27,代码来源:Observer.php

示例5: fullStopOnError

 /**
  * Returns full stop on error
  *
  * @param Mage_Sales_Model_Quote $quote
  * @return bool
  */
 public function fullStopOnError($quote)
 {
     if ($quote->getData('estimate_tax_error') && $this->_getFullStopOnErrorMode($quote->getStoreId())) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:onepica,项目名称:avatax,代码行数:14,代码来源:Errors.php

示例6: _anonymizeQuote

 /**
  * @param Mage_Sales_Model_Quote $quote
  * @param array $randomData
  */
 protected function _anonymizeQuote($quote, $randomData)
 {
     /** @var $quote Mage_Sales_Model_Quote */
     foreach ($this->_getQuoteMapping() as $quoteKey => $randomDataKey) {
         if (!$quote->getData($quoteKey)) {
             continue;
         }
         if (strlen($randomDataKey)) {
             $quote->setData($quoteKey, $randomData[$randomDataKey]);
         } else {
             $quote->setData($quoteKey, '');
         }
     }
     $quote->getResource()->save($quote);
     $this->_anonymizedQuoteIds[] = $quote->getId();
 }
开发者ID:buro71a,项目名称:Anonymizer,代码行数:20,代码来源:Anonymizer.php

示例7: isCcSaveAllowed

 /**
  * Check if the "Save this card" feature is allowed
  * (for any not-guest order, child customerstored method should be active)
  *
  * @param Mage_Sales_Model_Quote $quote
  * @param string $paymentMethodCode
  * @return bool
  */
 public function isCcSaveAllowed($quote, $paymentMethodCode)
 {
     if (!$paymentMethodCode) {
         return false;
     } else {
         // @todo Adjust this code if 'customerstored' methods naming convention will change
         $customerstoredPaymentMethodCode = $paymentMethodCode . '_customerstored';
     }
     if ($quote && !($quote->getData('checkout_method') == Mage_Checkout_Model_Type_Onepage::METHOD_GUEST || $quote->getData('customer_is_guest')) && Mage::getStoreConfig("payment/{$customerstoredPaymentMethodCode}/active", $quote->getStoreId())) {
         return true;
     }
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:21,代码来源:Data.php


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