예제 #1
0
 public function indexAction()
 {
     $mageSessHandler = Mage::getSingleton("vbw_punchout/session");
     if ($mageSessHandler->getPunchoutId()) {
         $this->_redirect('checkout/cart/punchout');
     } else {
         parent::indexAction();
     }
 }
예제 #2
0
 public function indexAction()
 {
     $cart = $this->_getCart();
     if (Mage::helper("apiplugin")->checkPreOrder()) {
         $warning = "It is not possible to preorder and buy already released products in the same order. Pleace place 2 orders.";
         $cart->getCheckoutSession()->addNotice($warning);
     }
     parent::indexAction();
 }
예제 #3
0
 public function indexAction()
 {
     $h = Mage::helper('gomage_checkout');
     if ($h->getConfigData('general/disable_cart') && $h->getConfigData('general/enabled')) {
         $quote = Mage::getSingleton('gomage_checkout/type_onestep')->getQuote();
         if ($quote->hasItems()) {
             $this->_redirect('*/onepage');
         }
     }
     return parent::indexAction();
 }
 /**
  * Shopping cart display action
  */
 public function indexAction()
 {
     // Buy X get Y Free
     $this->buyXgetYfree();
     // Spend X get Y Free
     $this->spendXgetYfree();
     // Coupon X get Y Free
     $this->couponXgetYfree();
     // Category X get Y Free
     $this->categoryXgetYfree();
     return parent::indexAction();
 }
예제 #5
0
 public function indexAction()
 {
     /*$pos = strpos($this->_getRefererUrl(), 'checkout/onepage');
       if ($pos !== false) {
           $this->getResponse()->setRedirect($this->_getRefererUrl());
           return;
       }
       
       //echo $this->_getRefererUrl();
       //die;
       */
     parent::indexAction();
 }
 public function indexAction()
 {
     Mage::helper('cartex')->wdcCartChecker(1);
     parent::indexAction();
 }
 /**
  * Shopping cart display action
  */
 public function indexAction()
 {
     // Get singleton of Checkout Session Model
     $oSession = Mage::getSingleton('checkout/session');
     if ($oSession->getPayoneIsRedirectedToPayPal() === true) {
         $oSession->unsPayoneIsRedirectedToPayPal();
         // Load order
         $oOrder = $this->getOrderByCheckoutSession($oSession);
         if ($oOrder) {
             // Cancel order and add history comment:
             if ($oOrder->canCancel()) {
                 $oOrder->cancel();
                 $sMessage = $this->helper()->__('The Payone transaction has been canceled.');
                 $oOrder->addStatusHistoryComment($sMessage, Mage_Sales_Model_Order::STATE_CANCELED);
                 $oOrder->save();
             }
             // Load quote
             $oQuote = $this->getQuoteByCheckoutSession($oSession);
             if ($oQuote) {
                 $this->reactivateQuote($oQuote);
                 //reload the page
                 $this->_redirect('checkout/cart');
             }
         }
     }
     return parent::indexAction();
 }
예제 #8
0
 public function indexAction()
 {
     # Just to make sure
     error_log('耶~成功重写购物车!');
     parent::indexAction();
 }