本文整理汇总了PHP中Mage_Sales_Model_Quote_Address类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote_Address类的具体用法?PHP Mage_Sales_Model_Quote_Address怎么用?PHP Mage_Sales_Model_Quote_Address使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Sales_Model_Quote_Address类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _processGiftRules
/**
* Process the gift rules
*
* @param Mage_Sales_Model_Quote_Address $address
*/
protected function _processGiftRules($address)
{
$quote = $address->getQuote();
$store = Mage::app()->getStore($quote->getStoreId());
$validator = Mage::getSingleton('gift/rule_validator')->init($store->getWebsiteId(), $quote->getCustomerGroupId());
$validator->process($address);
}
开发者ID:rbrown,项目名称:magento-gifts,代码行数:12,代码来源:Observer.php
示例2: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if ($address->getDamageWaiverAmount() > 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => $this->getLabel(), 'value' => $address->getDamageWaiverAmount()));
}
return $this;
}
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:7,代码来源:Damagewaiver.php
示例3: fetch
/**
* Add convenienceservice information to address
*
* @param Mage_Sales_Model_Quote_Address $address
* @return Magentix_Convenienceservice_Model_Sales_Quote_Address_Total_Convenienceservice
*/
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getConvenienceserviceAmount();
$convenienceservicechargepercentage = Mage::getStoreConfig('convenience/convenience_group/convenienceservicechargepercentage');
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('convenienceservice')->__("Service Tax ({$convenienceservicechargepercentage}% of Conv. Fee)"), 'value' => $amount));
return $this;
}
开发者ID:mSupply,项目名称:runnable_test_repo,代码行数:13,代码来源:Convenienceservice.php
示例4: _saveAppliedTaxes
protected function _saveAppliedTaxes(Mage_Sales_Model_Quote_Address $address, $applied, $amount, $baseAmount, $rate)
{
$previouslyAppliedTaxes = $address->getAppliedTaxes();
$process = count($previouslyAppliedTaxes);
foreach ($applied as $row) {
if (!isset($previouslyAppliedTaxes[$row['id']])) {
$row['process'] = $process;
$row['amount'] = 0;
$row['base_amount'] = 0;
$previouslyAppliedTaxes[$row['id']] = $row;
}
if (!is_null($row['percent'])) {
$row['percent'] = $row['percent'] ? $row['percent'] : 1;
$rate = $rate ? $rate : 1;
$appliedAmount = $amount;
$baseAppliedAmount = $baseAmount;
} else {
$appliedAmount = 0;
$baseAppliedAmount = 0;
foreach ($row['rates'] as $rate) {
$appliedAmount += $rate['amount'];
$baseAppliedAmount += $rate['base_amount'];
}
}
if ($appliedAmount || $previouslyAppliedTaxes[$row['id']]['amount']) {
$previouslyAppliedTaxes[$row['id']]['amount'] = $appliedAmount;
$previouslyAppliedTaxes[$row['id']]['base_amount'] = $baseAppliedAmount;
} else {
unset($previouslyAppliedTaxes[$row['id']]);
}
}
$address->setAppliedTaxes($previouslyAppliedTaxes);
}
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:33,代码来源:Discount.php
示例5: _isAddressActionable
/**
* Check if address actionable to calculate tax
*
* @param Mage_Sales_Model_Quote_Address $address
* @return bool
*/
protected function _isAddressActionable($address)
{
/** @var OnePica_AvaTax_Helper_Data $helper */
$helper = Mage::helper('avatax');
$storeId = $address->getQuote()->getStoreId();
return $helper->isAddressActionable($address, $storeId, OnePica_AvaTax_Model_Config::REGIONFILTER_TAX);
}
开发者ID:shabirm,项目名称:avatax,代码行数:13,代码来源:Grand.php
示例6: collect
/**
* Prepare Data to Storage for Order
*
* @param Mage_Sales_Model_Quote_Address $address
* @return Magestore_Webpos_Model_Total_Quote_Cash
*/
public function collect(Mage_Sales_Model_Quote_Address $address)
{
$quote = $address->getQuote();
$cashin = Mage::getSingleton('webpos/session')->getWebposCash();
if ($cashin && $cashin <= 0) {
return $this;
}
$baseCashin = $cashin / $quote->getStore()->convertPrice(1);
$quote->setWebposCash($cashin);
$quote->setWebposBaseCash($baseCashin);
if (!$quote->isVirtual() && $address->getAddressType() == 'billing') {
return $this;
}
$address->setWebposCash($quote->getWebposCash())->setWebposBaseCash($quote->getWebposBaseCash());
/*
$address->setTotalPaid($quote->getWebposCash())
->setBaseTotalPaid($quote->getWebposBaseCash());
*/
if ($quote->getWebposCash() >= $address->getGrandTotal()) {
/*
$address->setTotalRefunded($quote->getWebposCash() - $address->getGrandTotal())
->setBaseTotalRefunded($quote->getWebposBaseCash() - $address->getBaseGrandTotal());
if ($payment = $quote->getPayment()) {
if ($method = $payment->getMethodInstance()) {
$address->setTotalPaid($address->getTotalRefunded())
->setBaseTotalPaid($address->getBaseTotalRefunded());
}
}
*/
} else {
//$address->setGrandTotal($address->getGrandTotal() - $quote->getWebposCash() );
//$address->setBaseGrandTotal($address->getBaseGrandTotal() - $quote->getWebposBaseCash());
}
return $this;
}
开发者ID:javik223,项目名称:Evron-Magento,代码行数:41,代码来源:Cash.php
示例7: collect
public function collect(Mage_Sales_Model_Quote_Address $address)
{
foreach ($address->getAllItems() as $item) {
Mage::getSingleton('rewards/redeem')->refactorRedemptions($item, false);
}
return parent::collect($address);
}
开发者ID:rajarshc,项目名称:Rooja,代码行数:7,代码来源:Tax.php
示例8: fetch
/**
* Add fee information to address
*
* @param Mage_Sales_Model_Quote_Address $address
* @return Brander_PaymentFee_Model_Sales_Quote_Address_Total_Fee
*/
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getFeeAmount();
$title = Mage::getModel('payment_fee/fee')->getTotalTitle(null, $address->getQuote());
$address->addTotal(array('code' => $this->getCode(), 'title' => $title, 'value' => $amount));
return $this;
}
开发者ID:kirchbergerknorr,项目名称:payment-fee,代码行数:13,代码来源:Fee.php
示例9: _importCustomerAddressTo
protected function _importCustomerAddressTo(Mage_Sales_Model_Quote_Address $address)
{
$customerAddress = $this->getCustomer()->getPrimaryShippingAddress();
if ($customerAddress) {
$address->importCustomerAddress($customerAddress)->setSaveInAddressBook(0);
}
}
开发者ID:xiaoguizhidao,项目名称:autotech_design,代码行数:7,代码来源:Info.php
示例10: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if (!method_exists($address->getQuote(), 'isR4q') || !$address->getQuote()->isR4q() || Mage::helper('request4quote')->isTaxEstimatesEnabled()) {
parent::fetch($address);
}
return $this;
}
开发者ID:VinuWebtech,项目名称:production267,代码行数:7,代码来源:Tax.php
示例11: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if ($amount = $address->getAffiliateCredit()) {
$address->addTotal(array('code' => $this->getCode(), 'title' => $this->_getConfigHelper()->__('Paid by Affiliate Credit'), 'value' => $amount));
}
return $this;
}
开发者ID:billadams,项目名称:forever-frame,代码行数:7,代码来源:Credit.php
示例12: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amt = $address->getPaymentInstallmentFeeAmount();
if ($amt != 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('adyen')->__('Installment Fee'), 'value' => $amt));
}
return $this;
}
开发者ID:asarturas,项目名称:magento,代码行数:8,代码来源:PaymentInstallmentFee.php
示例13: fetchTotals
public function fetchTotals(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getGiftcertAmount();
if ($amount) {
$address->addTotal(array('code' => 'giftcert', 'title' => AO::helper('giftcert')->__('Gift Certificate') . ' (' . $address->getGiftcertCode() . ')', 'value' => -$amount, 'output' => true));
}
return $this;
}
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:8,代码来源:Entity_Quote_Address_Attribute_Frontend_Giftcert.php
示例14: collect
/**
* Collect gift wrapping tax totals
*
* @param \Mage_Sales_Model_Quote_Address $address
* @return $this
*/
public function collect(Mage_Sales_Model_Quote_Address $address)
{
$storeId = $address->getQuote()->getStore()->getId();
if ($this->_getAvaTaxDataHelper()->isAvataxEnabled($storeId)) {
return $this;
}
return parent::collect($address);
}
开发者ID:shabirm,项目名称:avatax,代码行数:14,代码来源:Giftwrapping.php
示例15: testRenderAddress
public function testRenderAddress()
{
$block = new Mage_Paypal_Block_Express_Review();
$addressData = (include __DIR__ . '/../../../Sales/_files/address_data.php');
$address = new Mage_Sales_Model_Quote_Address($addressData);
$address->setAddressType('billing');
$this->assertContains('Los Angeles', $block->renderAddress($address));
}
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:8,代码来源:Review.php
示例16: fetch
/**
* Update the address with totals data used for display in a total line,
* e.g. a total line in the cart.
*
* @param Mage_Sales_Model_Quote_Address
* @return self
*/
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$total = $address->getTotalAmount($this->getCode());
if ($total) {
$address->addTotal(['code' => $this->getCode(), 'title' => $this->_helper->__(self::TAX_TOTAL_TITLE), 'value' => $total]);
}
return $this;
}
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:15,代码来源:Tax.php
示例17: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if ($address->getAddressType() == Mage_Sales_Model_Quote_Address::TYPE_SHIPPING) {
return $this;
}
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('sales')->__('Points Earned')));
return $this;
}
开发者ID:rajarshc,项目名称:Rooja,代码行数:8,代码来源:Rewardearned.php
示例18: fetch
/**
* @param Mage_Sales_Model_Quote_Address $address
*
* @return $this
*/
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amt = $address->getShopgatePaymentFee();
if ($amt != 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => $this->getLabel(), 'value' => $amt));
}
return $this;
}
开发者ID:buttasg,项目名称:cowgirlk,代码行数:13,代码来源:ShopgatePaymentFee.php
示例19: fetchTotals
public function fetchTotals(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getTaxAmount();
if ($amount != 0) {
$address->addTotal(array('code' => 'tax', 'title' => Mage::helper('sales')->__('Tax'), 'value' => $amount));
}
return $this;
}
开发者ID:cnglobal-sl,项目名称:caterez,代码行数:8,代码来源:Tax.php
示例20: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getPaymentCharge();
if ($amount != 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('sales')->__('Payment Charge'), 'full_info' => array(), 'value' => $amount));
}
return $this;
}
开发者ID:vasuscoin,项目名称:Payment_Surcharge,代码行数:8,代码来源:Paymentcharge.php
注:本文中的Mage_Sales_Model_Quote_Address类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论