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


PHP Mage_Sales_Model_Quote::setData方法代码示例

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


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

示例1: 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

示例2: reactivateQuote

 /**
  * @param Mage_Sales_Model_Quote $quote
  */
 protected function reactivateQuote(Mage_Sales_Model_Quote $quote)
 {
     if ($quote->getId()) {
         /* @note: Reset reserved_order_id, Magento up to and including version 1.7 has a bug in Mage_Sales_Model_Resource_Quote::isOrderIncrementIdUsed()
          * They cast the orderIncrementId to (int), which breaks the checkout/cart for all non-numerical incrementIds
          * (Causes Integrity Constraint Violation, because orderIncrementId already exists */
         $quote->setData('reserved_order_id', '');
         $quote->setIsActive(true);
         $quote->save();
     }
 }
开发者ID:kirchbergerknorr,项目名称:Payone_Core,代码行数:14,代码来源:PaymentController.php

示例3: addInformationToObject

 /**
  * Given a model and id load the information from the database into this model
  *
  * @param Mage_Sales_Model_Order|Mage_Sales_Model_Quote $oObject
  * @param Sitewards_DeliveryDate_Model_Quote|Sitewards_DeliveryDate_Model_Order $oModel
  */
 protected function addInformationToObject($oObject, $oModel)
 {
     $aData = $oModel->getByObject($oObject->getId());
     foreach ($aData as $sKey => $sValue) {
         $oObject->setData($sKey, $sValue);
     }
 }
开发者ID:victso,项目名称:DeliveryDate,代码行数:13,代码来源:Observer.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: _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


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