示例#1
0
文件: Links.php 项目: ngreimel/mci
 /**
  * Add link on checkout page to parent block
  *
  * @return Mage_Checkout_Block_Links
  */
 public function addCheckoutLink()
 {
     $count = $this->getSummaryQty() ? $this->getSummaryQty() : $this->helper('checkout/cart')->getSummaryCount();
     if ($count) {
         return parent::addCheckoutLink();
     }
     return $this;
 }
示例#2
0
 /**
  * Checks if customer can proceed to checkout and
  * if so, adds checkout link to the top nav
  *
  * @return Sitewards_Giveaway_Block_Checkout_Links
  */
 public function addCheckoutLink()
 {
     $oGiveawayHelper = Mage::helper('sitewards_giveaway');
     $bValidCart = $oGiveawayHelper->isCartValidForCheckout();
     if ($bValidCart) {
         return parent::addCheckoutLink();
     } else {
         return $this;
     }
 }
示例#3
0
 /**
  * Add link on checkout page to parent block
  *
  * @return TM_FireCheckout_Block_Links
  */
 public function addCheckoutLink()
 {
     if (!$this->helper('firecheckout')->canFireCheckout()) {
         return parent::addCheckoutLink();
     }
     if ($parentBlock = $this->getParentBlock()) {
         $text = $this->helper('checkout')->__('Checkout');
         $parentBlock->addLink($text, 'firecheckout', $text, true, array('_secure' => true), 60, null, 'class="top-link-checkout"');
     }
     return $this;
 }
示例#4
0
 public function addCheckoutLink()
 {
     if (!Mage::getStoreConfig('lotusbreath_onestepcheckout/general/enabled')) {
         return parent::addCheckoutLink();
     }
     $parentBlock = $this->getParentBlock();
     if ($parentBlock && Mage::helper('core')->isModuleOutputEnabled('Lotusbreath_OneStepCheckout')) {
         $text = $this->__('Checkout');
         $parentBlock->addLink($text, 'lotusbreath_onestepcheckout', $text, true, array('_secure' => true), 60, null, 'class="top-link-checkout"');
     }
     return $this;
 }
示例#5
0
 public function addCheckoutLink()
 {
     if ($this->helper('onepagecheckout')->isOnepageCheckoutEnabled()) {
         $parent = $this->getParentBlock();
         if ($parent) {
             $parent->addLink($this->helper('onepagecheckout')->__('Checkout'), 'onepagecheckout', $this->helper('onepagecheckout')->__('Checkout'), true, array('_secure' => true), 60, null, 'class="top-link-checkout"');
         }
         return $this;
     } else {
         return parent::addCheckoutLink();
     }
 }
示例#6
0
 public function addCheckoutLink()
 {
     if (!$this->helper('onestepcheckout')->isOnepageCheckoutLinksEnabled()) {
         return parent::addCheckoutLink();
     }
     if (!$this->helper('checkout')->canOnepageCheckout()) {
         return $this;
     }
     if ($parentBlock = $this->getParentBlock()) {
         $text = $this->__('Checkout');
         $parentBlock->addLink($text, 'onestepcheckout', $text, true, array('_secure' => true), 60, null, 'class="top-link"');
     }
     return $this;
 }
示例#7
0
 public function addCheckoutLink()
 {
     if (!Mage::getStoreConfig('oscheckout/general/enabled')) {
         return parent::addCheckoutLink();
     }
     if (!$this->helper('checkout')->canOnepageCheckout()) {
         return $this;
     }
     if ($parentBlock = $this->getParentBlock()) {
         $text = $this->__('Checkout');
         if (Mage::getStoreConfig('oscheckout/general/checkout_link') != '') {
             $text = Mage::getStoreConfig('oscheckout/general/checkout_link');
         }
         $parentBlock->addLink($text, 'oscheckout', $text, true, array('_secure' => true), 60, null, 'class="top-link"');
     }
     return $this;
 }
示例#8
0
 /**
  * Add link on checkout page to parent block
  *
  * @return Mage_Checkout_Block_Links
  */
 public function addCheckoutLink()
 {
     if (!$this->_checkRule() || $this->helper('aitcheckout')->isDisabled() || $this->helper('aitcheckout')->isShowCheckoutOutsideCart()) {
         return parent::addCheckoutLink();
     }
     if ($this->helper('aitcheckout')->isShowCartInCheckout()) {
         $parentBlock = $this->getParentBlock();
         if ($parentBlock && Mage::helper('core')->isModuleOutputEnabled('Mage_Checkout')) {
             $count = $this->helper('checkout/cart')->getSummaryCount();
             $text = Mage::helper('checkout')->__('Checkout');
             if ($count > 0) {
                 $text .= " ({$count} " . $this->__($count == 1 ? 'item' : 'items') . ')';
             }
             $parentBlock->addLink($text, 'checkout', $text, true, array(), 50, null, 'class="top-link-checkout"');
         }
     }
     return $this;
 }