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


PHP Mage_Sales_Model_Quote::getAppliedRuleIds方法代码示例

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


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

示例1: getPoints

 /**
  * Retrieve points delta for action
  *
  * @param int $websiteId
  * @return int
  */
 public function getPoints($websiteId)
 {
     $pointsDelta = 0;
     if ($this->_quote) {
         // known issue: no support for multishipping quote // copied  comment, not checked
         if ($this->_quote->getAppliedRuleIds()) {
             $ruleIds = explode(',', $this->_quote->getAppliedRuleIds());
             $ruleIds = array_unique($ruleIds);
             $data = Mage::getResourceModel('enterprise_reward/reward')->getRewardSalesrule($ruleIds);
             foreach ($data as $rule) {
                 $pointsDelta += (int) $rule['points_delta'];
             }
         }
     }
     return $pointsDelta;
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:22,代码来源:Salesrule.php

示例2: toOrder

 /**
  * Convert quote model to order model
  *
  * @param   Mage_Sales_Model_Quote $quote
  * @return  Mage_Sales_Model_Order
  */
 public function toOrder(Mage_Sales_Model_Quote $quote, $order = null)
 {
     if (!$order instanceof Mage_Sales_Model_Order) {
         $order = Mage::getModel('sales/order');
     }
     /* @var $order Mage_Sales_Model_Order */
     $order->setStoreId($quote->getStoreId())->setQuoteId($quote->getId())->setRemoteIp($quote->getRemoteIp())->setCustomerId($quote->getCustomerId())->setCustomerEmail($quote->getCustomerEmail())->setCustomerFirstname($quote->getCustomerFirstname())->setCustomerLastname($quote->getCustomerLastname())->setCustomerGroupId($quote->getCustomerGroupId())->setCustomerTaxClassId($quote->getCustomerTaxClassId())->setCustomerNote($quote->getCustomerNote())->setCustomerNoteNotify($quote->getCustomerNoteNotify())->setCustomerIsGuest($quote->getCustomerIsGuest())->setBaseCurrencyCode($quote->getBaseCurrencyCode())->setStoreCurrencyCode($quote->getStoreCurrencyCode())->setOrderCurrencyCode($quote->getQuoteCurrencyCode())->setStoreToBaseRate($quote->getStoreToBaseRate())->setStoreToOrderRate($quote->getStoreToQuoteRate())->setCouponCode($quote->getCouponCode())->setGiftcertCode($quote->getGiftcertCode())->setIsVirtual($quote->getIsVirtual())->setIsMultiPayment($quote->getIsMultiPayment())->setAppliedRuleIds($quote->getAppliedRuleIds());
     Mage::dispatchEvent('sales_convert_quote_to_order', array('order' => $order, 'quote' => $quote));
     return $order;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:16,代码来源:Quote.php

示例3: _getQuoteRewardsRuleIds

 /**
  * 
  * @param Mage_Sales_Model_Quote $quote
  */
 protected function _getQuoteRewardsRuleIds($quote)
 {
     $all_rule_ids = explode(',', $quote->getAppliedRuleIds());
     $all_rr_ids = array();
     foreach ($all_rule_ids as $rule_id) {
         $salesrule = $this->getRule($rule_id);
         if ($salesrule->isPointsRule()) {
             $all_rr_ids[] = $rule_id;
         }
     }
     return $all_rr_ids;
 }
开发者ID:rajarshc,项目名称:Rooja,代码行数:16,代码来源:Validator.php


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