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


PHP Mage_Sales_Model_Quote::getCustomerTaxClassId方法代码示例

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


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

示例1: getProductTaxRate

 private function getProductTaxRate()
 {
     /** @var $taxCalculator Mage_Tax_Model_Calculation */
     $taxCalculator = Mage::getSingleton('tax/calculation');
     $request = $taxCalculator->getRateRequest($this->quote->getShippingAddress(), $this->quote->getBillingAddress(), $this->quote->getCustomerTaxClassId(), $this->quote->getStore());
     $request->setProductClassId($this->getProduct()->getTaxClassId());
     return $taxCalculator->getRate($request);
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:8,代码来源:Item.php

示例2: getCustomerTaxClassId

 public function getCustomerTaxClassId()
 {
     /** @var $customer Mage_Customer_Model_Customer */
     $customer = Mage::getSingleton('customer/session')->getCustomer();
     if ($taxClassId = $customer->getTaxClassId()) {
         $this->setCustomerTaxClassId($taxClassId);
         return $this->getData('customer_tax_class_id');
     }
     return parent::getCustomerTaxClassId();
 }
开发者ID:giuseppemorelli,项目名称:EuropeanTax,代码行数:10,代码来源:Quote.php

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

示例4: _getProductTaxClassId

 protected function _getProductTaxClassId()
 {
     if (is_null($this->_productTaxClassId)) {
         // Init product tax class
         // -------------------------
         $productTaxClass = Mage::getModel('tax/class')->getCollection()->addFieldToFilter('class_name', 'eBay Product Tax Class')->addFieldToFilter('class_type', Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT)->getFirstItem();
         if (is_null($productTaxClass->getId())) {
             $productTaxClass->setClassName('eBay Product Tax Class')->setClassType(Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT);
             $productTaxClass->save();
         }
         // -------------------------
         // Init customer tax class
         // -------------------------
         if (is_null($customerTaxClassId = $this->_quote->getCustomerTaxClassId())) {
             $customerTaxClass = Mage::getModel('tax/class')->getCollection()->addFieldToFilter('class_name', 'eBay Customer Tax Class')->addFieldToFilter('class_type', Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER)->getFirstItem();
             if (is_null($customerTaxClass->getId())) {
                 $customerTaxClass->setClassName('eBay Customer Tax Class')->setClassType(Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER);
                 $customerTaxClass->save();
             }
             $customerTaxClassId = $customerTaxClass->getId();
         }
         // -------------------------
         // Init tax rate
         // -------------------------
         $taxRate = Mage::getModel('tax/calculation_rate')->load('eBay Tax Rate', 'code');
         $taxRate->setRate((double) $this->_taxPercent)->setCode('eBay Tax Rate')->setTaxCountryId('US');
         $taxRate->save();
         // -------------------------
         // Combine tax classes and tax rate in tax rule
         // -------------------------
         $taxRule = Mage::getModel('tax/calculation_rule')->load('eBay Tax Rule', 'code');
         $taxRule->setCode('eBay Tax Rule')->setTaxCustomerClass(array($customerTaxClassId))->setTaxProductClass(array($productTaxClass->getId()))->setTaxRate(array($taxRate->getId()));
         $taxRule->save();
         // -------------------------
         $this->_productTaxClassId = $productTaxClass->getId();
     }
     return $this->_productTaxClassId;
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:38,代码来源:Order.php

示例5: _getBuckarooFeeTaxRequest

 /**
  * Get the tax request object for the current quote.
  *
  * @param Mage_Sales_Model_Quote $quote
  *
  * @return bool|Varien_Object
  */
 protected function _getBuckarooFeeTaxRequest(Mage_Sales_Model_Quote $quote)
 {
     $store = $quote->getStore();
     $codTaxClass = Mage::getStoreConfig(self::XPATH_BUCKAROO_TAX_CLASS, $store);
     /**
      * If no tax class is configured for the Buckaroo fee, there is no tax to be calculated.
      */
     if (!$codTaxClass) {
         return false;
     }
     $taxCalculation = $this->getTaxCalculation();
     $customerTaxClass = $quote->getCustomerTaxClassId();
     $shippingAddress = $quote->getShippingAddress();
     $billingAddress = $quote->getBillingAddress();
     $request = $taxCalculation->getRateRequest($shippingAddress, $billingAddress, $customerTaxClass, $store);
     $request->setProductClassId($codTaxClass);
     return $request;
 }
开发者ID:technomagegithub,项目名称:olgo.nl,代码行数:25,代码来源:Abstract.php


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