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


PHP Varien_Object::setLabel方法代码示例

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


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

示例1: initTotals

 public function initTotals()
 {
     $parent = $this->getParentBlock();
     $paymentMethod = $parent->getOrder()->getPayment()->getMethodInstance()->getCode();
     if (!in_array($paymentMethod, self::$_allowed_methods)) {
         return $this;
     }
     if ($parent->getOrder()->getBasePayexPaymentFeeTax()) {
         $total = new Varien_Object();
         $total->setLabel(Mage::helper('payex')->__('Payment fee (Incl.Tax)'));
         $total->setValue($parent->getOrder()->getPayexPaymentFee() + $parent->getOrder()->getPayexPaymentFeeTax());
         $total->setBaseValue($parent->getOrder()->getPayexBasePaymentFee() + $parent->getOrder()->getPayexBasePaymentFeeTax());
         $total->setCode('payex_payment_fee_with_tax');
         $parent->addTotalBefore($total, 'tax');
     }
     if ($parent->getOrder()->getBasePayexPaymentFee()) {
         $total = new Varien_Object();
         $total->setLabel(Mage::helper('payex')->__('Payment fee (Excl.Tax)'));
         $total->setValue($parent->getOrder()->getPayexPaymentFee());
         $total->setBaseValue($parent->getOrder()->getPayexBasePaymentFee());
         $total->setCode('payex_payment_fee');
         $parent->addTotalBefore($total, 'payex_payment_fee_with_tax');
     }
     return $this;
 }
开发者ID:AndreKlang,项目名称:Magento-Payex,代码行数:25,代码来源:Fee.php

示例2: initTotals

 /**
  * Initialize order totals array
  *
  * @return $this
  */
 public function initTotals()
 {
     $parent = $this->getParentBlock();
     $order = $this->getOrder();
     $fee = $order->getBuckarooFee();
     $baseFee = $order->getBaseBuckarooFee();
     if ($fee < 0.01 || $baseFee < 0.01) {
         return $this;
     }
     $paymentMethod = $order->getPayment()->getMethod();
     $displayMode = $this->getDisplayMode();
     $baseLabel = Mage::helper('buckaroo3extended')->getBuckarooFeeLabel($order->getStoreId(), $paymentMethod);
     if ($displayMode === self::DISPLAY_MODE_EXCL || $displayMode === self::DISPLAY_MODE_BOTH) {
         $label = $baseLabel;
         if ($displayMode === self::DISPLAY_MODE_BOTH) {
             $label .= ' (' . $this->getTaxLabel(false) . ')';
         }
         $total = new Varien_Object();
         $total->setLabel($label)->setValue($fee)->setBaseValue($baseFee)->setCode('buckaroo_fee');
         $parent->addTotalBefore($total, 'shipping');
     }
     if ($displayMode === self::DISPLAY_MODE_INCL || $displayMode === self::DISPLAY_MODE_BOTH) {
         $label = $baseLabel;
         if ($displayMode === self::DISPLAY_MODE_BOTH) {
             $label .= ' (' . $this->getTaxLabel(true) . ')';
         }
         $totalInclTax = new Varien_Object();
         $totalInclTax->setLabel($label)->setValue($fee + $order->getBuckarooFeeTax())->setBaseValue($baseFee + $order->getBaseBuckarooFeeTax())->setCode('buckaroo_fee_incl_tax');
         $parent->addTotalBefore($totalInclTax, 'shipping');
     }
     return $this;
 }
开发者ID:technomagegithub,项目名称:olgo.nl,代码行数:37,代码来源:Fee.php

示例3: initTotals

 public function initTotals()
 {
     $parent = $this->getParentBlock();
     $this->_invoice = $parent->getInvoice();
     if ($this->_invoice->getCodFee()) {
         $cod = new Varien_Object();
         $cod->setLabel($this->__('Cash on Delivery fee'));
         $cod->setValue($this->_invoice->getCodFee());
         $cod->setBaseValue($this->_invoice->getBaseCodFee());
         $cod->setCode('cod_fee');
         if (Mage::helper('cashondelivery')->displayCodBothPrices()) {
             $cod->setLabel($this->__('Cash on Delivery fee (Excl.Tax)'));
             $codIncl = new Varien_Object();
             $codIncl->setLabel($this->__('Cash on Delivery fee (Incl.Tax)'));
             $codIncl->setValue($this->_invoice->getCodFee() + $this->_invoice->getCodTaxAmount());
             $codIncl->setBaseValue($this->_invoice->getBaseCodFee() + $this->_invoice->getBaseCodTaxAmount());
             $codIncl->setCode('cod_fee_incl');
             $parent->addTotalBefore($cod, 'tax');
             $parent->addTotalBefore($codIncl, 'tax');
         } elseif (Mage::helper('cashondelivery')->displayCodFeeIncludingTax()) {
             $cod->setValue($this->_invoice->getCodFee() + $this->_invoice->getCodTaxAmount());
             $cod->setBaseValue($this->_invoice->getBaseCodFee() + $this->_invoice->getBaseCodTaxAmount());
             $parent->addTotalBefore($cod, 'tax');
         } else {
             $parent->addTotalBefore($cod, 'tax');
         }
     }
     return $this;
 }
开发者ID:liemnv,项目名称:Groupon-Clone-On-Magento,代码行数:29,代码来源:Cod.php

示例4: _initCounter

 protected function _initCounter()
 {
     $counter = new Varien_Object();
     $counter->setLabel($this->_counterLabel);
     $counter->setCount(0);
     $this->_counter = $counter;
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:7,代码来源:Abstract.php

示例5: addFeed

 /**
  * add a new feed
  *
  * @access public
  * @param string $label
  * @param string $url
  * @param bool $prepare
  * @return Stovpak_Article_Block_Rss
  * @author Ultimate Module Creator
  */
 public function addFeed($label, $url, $prepare = false)
 {
     $link = $prepare ? $this->getUrl($url) : $url;
     $feed = new Varien_Object();
     $feed->setLabel($label);
     $feed->setUrl($link);
     $this->_feeds[$link] = $feed;
     return $this;
 }
开发者ID:astovpak,项目名称:martana,代码行数:19,代码来源:Stovpak_Article_Block_Rss.php

示例6: initTotals

 public function initTotals()
 {
     if ($this->giftwrapAmount() > 0) {
         $total = new Varien_Object();
         $total->setCode('giftwrap');
         $total->setValue($this->giftwrapAmount());
         $total->setBaseValue(0);
         $total->setLabel('Gift wrap');
         $parent = $this->getParentBlock();
         $parent->addTotal($total, 'subtotal');
     }
 }
开发者ID:technomagegithub,项目名称:colb2b,代码行数:12,代码来源:Giftwrap.php

示例7: addToBlock

 public function addToBlock($block)
 {
     $order = $block->getOrder();
     $label = Mage::getStoreConfig('payment/' . $order->getPayment()->getMethod() . '/surcharge_label');
     $fee = new Varien_Object();
     $fee->setCode('surcharge_incl');
     $fee->setLabel($label);
     $fee->setBaseValue(10);
     $fee->setValue(11);
     $block->addTotalBefore($fee, 'shipping');
     return $block;
 }
开发者ID:paynl,项目名称:magento-plugin,代码行数:12,代码来源:Total.php

示例8: initTotals

 public function initTotals()
 {
     if ($this->discountAmount() != 0) {
         $total = new Varien_Object();
         $total->setCode('webposdiscount');
         $total->setValue(-$this->discountAmount());
         $total->setBaseValue(0);
         $total->setLabel('Discount(Admin)');
         $parent = $this->getParentBlock();
         $parent->addTotal($total, 'subtotal');
     }
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:12,代码来源:Discount.php

示例9: initTotals

 public function initTotals()
 {
     $parent = $this->getParentBlock();
     if ($this->_invoice->getCodFee()) {
         $cod = new Varien_Object();
         $cod->setLabel($this->__('Refund Cash on Delivery fee'));
         $cod->setValue($parent->getSource()->getCodFee());
         $cod->setBaseValue($parent->getSource()->getBaseCodFee());
         $cod->setCode('cod_fee');
         $parent->addTotalBefore($cod, 'adjustment_positive');
     }
     return $this;
 }
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:13,代码来源:Cod.php

示例10: initTotals

 public function initTotals()
 {
     $amount = $this->getLuckydrawDiscount();
     if (floatval($amount)) {
         $total = new Varien_Object();
         $total->setCode('luckydraw_discount');
         $total->setValue($amount);
         $total->setBaseValue($this->getBaseLuckydrawDiscount());
         $total->setLabel('Lucky Draw Discount');
         $parent = $this->getParentBlock();
         $parent->addTotal($total, 'subtotal');
     }
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:13,代码来源:Luckydrawtotal.php

示例11: initTotals

 public function initTotals()
 {
     $amount = $this->getAffiliateplusDiscount();
     if (floatval($amount)) {
         $total = new Varien_Object();
         $total->setCode('affiliateplus_discount');
         $total->setValue($amount);
         $total->setBaseValue($this->getBaseAffiliateplusDiscount());
         $total->setLabel('Affiliate Discount' . $this->getAffiliateCouponLabel());
         $parent = $this->getParentBlock();
         $parent->addTotal($total, 'subtotal');
     }
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:13,代码来源:Ordertotalaffiliate.php

示例12: initTotals

 public function initTotals()
 {
     // var_dump($this->discountAmount());
     if ($this->discountAmount() != 0) {
         $total = new Varien_Object();
         $total->setCode('onestepcheckoutdiscount');
         $total->setValue(-$this->discountAmount());
         $total->setBaseValue(-$this->baseDiscountAmout());
         $total->setLabel('Discount(Admin)');
         $parent = $this->getParentBlock();
         $parent->addTotal($total, 'subtotal');
     }
 }
开发者ID:ausger,项目名称:onestepcheckout-v340,代码行数:13,代码来源:Discount.php

示例13: initTotals

 public function initTotals()
 {
     $parent = $this->getParentBlock();
     if ($parent->getSource()) {
         $fee = new Varien_Object();
         $fee->setLabel($this->__('Refund Payment fee'));
         $fee->setValue($parent->getSource()->getCapayableFee());
         $fee->setBaseValue($parent->getSource()->getBaseCapayableFee());
         $fee->setCode('payment_fee');
         $fee->setBlockName('capayable_fee');
         $parent->addTotalBefore($fee, 'adjustment_positive');
     }
     return $this;
 }
开发者ID:blueglobeNL,项目名称:tritac-capayable,代码行数:14,代码来源:Fee.php

示例14: initTotals

 /**
  * add fee to order detail view
  *
  * @return $this
  */
 public function initTotals()
 {
     $parent = $this->getParentBlock();
     $this->_order = $parent->getOrder();
     if ($this->_order->getShopgatePaymentFee()) {
         $fee = new Varien_Object();
         $fee->setLabel($this->__('Payment Fee'));
         $fee->setValue($this->_order->getShopgatePaymentFee());
         $fee->setBaseValue($this->_order->getBaseShopgatePaymentFee());
         $fee->setCode($this->getCode());
         $parent->addTotalBefore($fee, 'tax');
     }
     return $this;
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:19,代码来源:AbstractPaymentFee.php

示例15: initTotals

 public function initTotals()
 {
     $parent = $this->getParentBlock();
     if ($parent->getOrder()->getPayment()->getMethodInstance()->getCode() !== 'factoring') {
         return $this;
     }
     if ($parent->getOrder()->getBaseFactoringPaymentFee()) {
         $total = new Varien_Object();
         $total->setLabel($this->__('Payment fee'));
         $total->setValue($parent->getOrder()->getFactoringPaymentFee());
         $total->setBaseValue($parent->getOrder()->getFactoringBasePaymentFee());
         $total->setCode('factoring_payment_fee');
         $parent->addTotalBefore($total, 'tax');
     }
     return $this;
 }
开发者ID:AndreKlang,项目名称:Payex-Modules-Test,代码行数:16,代码来源:Fee.php


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