public function init()
 {
     parent::init();
     $this->breadcrumbs->addStep('Account', $this->getUrl(null, 'account'));
     $this->breadcrumbs->addStep('Blog Manager', $this->getUrl(null, 'blogmanager'));
     $this->identity = Zend_Auth::getInstance()->getIdentity();
 }
 public function preDispatch()
 {
     parent::preDispatch();
     if ($this->auth->hasIdentity()) {
         if (!isset($this->signedInUserSessionInfoHolder->generalInfo->shippingAddress)) {
             $this->userObject->createShippingAddressInfoSessionObject($this->signedInUserSessionInfoHolder->generalInfo->shippingAddress);
         }
     }
     if (!($this->shoppingCartInfoSession->cartInfo->totalItems > 0)) {
         $this->messenger->addMessage('You must have an item in your shopping cart before check out. Thank you.');
         $this->_redirect('/shoppingcart/index');
     }
     $cart = $this->shoppingCartInfoSession->cartInfo->tempTotalCost;
     $incrementalRewardNumber = floor($cart - 10);
     //Zend_Debug::dump($rewardPointsArray);
     $maxDeductionRewardPointIs = $incrementalRewardNumber * 4;
     $userAvailableIncrement = $this->userObject->accountBalanceSummary->available_reward_points / 4;
     //echo $userAvailableIncrement;
     $this->rewardPointsArray[] = 0;
     if ($maxDeductionRewardPointIs > 0) {
         $finalIncrementalRewardNumber = min($incrementalRewardNumber, $userAvailableIncrement);
         $i = 1;
         while ($i <= $finalIncrementalRewardNumber) {
             $this->rewardPointsArray[$i] = $i * 4;
             $i++;
         }
         $this->view->incrementalRewardNumber = $this->rewardPointsArray;
         //Zend_Debug::dump($rewardPointsArray);
     }
     $this->view->shoppingCartProducts = $this->shoppingCartInfoSession->productInfo;
     $this->view->shoppingCartInfo = $this->shoppingCartInfoSession->cartInfo;
 }
 public function preDispatch()
 {
     parent::preDispatch();
     //require APPLICATION_PATH .'/../library/productConfig.php';
     $this->request = $this->getRequest();
     //must have id and product type. otherwise redirect!XXXXXXXXXXXXXXXXXXXXXxx
 }
 public function preDispatch()
 {
     parent::preDispatch();
     if ($this->auth->hasIdentity()) {
         if (!isset($this->signedInUserSessionInfoHolder->generalInfo->shippingAddress)) {
             $this->userObject->createShippingAddressInfoSessionObject($this->signedInUserSessionInfoHolder->generalInfo->shippingAddress);
         }
         $this->view->signedInUser = $this->signedInUserSessionInfoHolder;
     }
     $this->view->shoppingCartProducts = $this->shoppingCartInfoSession->productInfo;
     $this->view->shoppingCartInfo = $this->shoppingCartInfoSession->cartInfo;
 }
 public function preDispatch()
 {
     parent::preDispatch();
     $this->view->basicURL = parent::modifyURL();
     $this->view->tag = $this->getRequest()->getParam('tag');
     $this->view->purchaseType = $this->getRequest()->getParam('purchaseType');
     $this->view->page = $this->getRequest()->getParam('purchaseType');
     if ($this->searchCriteria != '') {
         $this->view->searchCriteria = '_' . $this->searchCriteria . 'Criteria.tpl';
     } else {
         $this->view->searchCriteria = '';
     }
 }
예제 #6
0
 public function preDispatch()
 {
     parent::preDispatch();
     $request = $this->getRequest();
     if (strtolower($request->getActionName()) == 'usernotfound') {
         return;
     }
     $username = trim($request->getUserParam('username'));
     if (strlen($username) == 0) {
         $this->_redirect($this->getUrl('index', 'index'));
     }
     $this->user = new DatabaseObject_User($this->db);
     if (!$this->user->loadByUsername($username)) {
         $this->_forward('usernotfound');
         return;
     }
     $this->breadcrumbs->addStep($this->user->username . "'s Blog", $this->getCustomUrl(array('username' => $this->user->username, 'action' => 'index'), 'user'));
     $this->view->user = $this->user;
 }
 public function preDispatch()
 {
     parent::preDispatch();
 }
 public function preDispatch()
 {
     parent::preDispatch();
     if ($this->auth->hasIdentity()) {
     }
 }
 public function preDispatch()
 {
     parent::preDispatch();
     if ($this->auth->hasIdentity()) {
         if ($this->adminOrders->orderProfilesLoaded == true) {
             echo 'here at already loaded';
         } else {
             //load all the orders;
             $orderProfiles = DatabaseObject_Helper_Admin_OrderManager::loadAllOrderProfiles($this->db);
             echo 'here at dumping';
             //Zend_Debug::dump($orderProfiles);
             foreach ($orderProfiles as $k => $v) {
                 switch ($orderProfiles[$k]['order_status']) {
                     case 'UNSHIPPED':
                         $this->adminOrders->orderProfiles->unshippedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'SHIPPED':
                         $this->adminOrders->orderProfiles->shippedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'DELIVERED':
                         $this->adminOrders->orderProfiles->deliveredOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'RETURN_SHIPPED':
                         $this->adminOrders->orderProfiles->returnShippedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'RETURN_DELIVERED':
                         $this->adminOrders->orderProfiles->returnDeliveredOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'ORDER_COMPLETED':
                         $this->adminOrders->orderProfiles->orderCompletedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                     case 'RETURN_COMPLETED':
                         $this->adminOrders->orderProfiles->returnCompletedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'BALANCE_UPDATED':
                         $this->adminOrders->orderProfiles->balanceUpdatedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'BALANCE_REFUNDED':
                         $this->adminOrders->orderProfiles->balanceRefundedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'CANCELLED_BY_SELLER':
                         $this->adminOrders->orderProfiles->cancelledBySellerOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'CANCELLED_BY_BUYER':
                         $this->adminOrders->orderProfiles->cancelledByBuyerOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'HELD_BY_BUYER_FOR_ARBITRATION':
                         $this->adminOrders->orderProfiles->heldByBuyerForArbitrationOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'HELD_BY_BUYER_FOR_ARBITRATION_DENIED':
                         $this->adminOrders->orderProfiles->heldByBuyerForArbitrationDeniedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                     case 'HELD_BY_BUYER_FOR_ARBITRATION_APPROVED':
                         $this->adminOrders->orderProfiles->heldByBuyerForArbitrationApprovedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                     case 'HELD_BY_BUYER_FOR_ARBITRATION_DENIED_BY_SELLER':
                         $this->adminOrders->orderProfiles->heldByBuyerForArbitrationDeniedBySellerOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                     case 'HELP_BY_SELLER_FOR_ARBITRATION':
                         $this->adminOrders->orderProfiles->heldBySellerForArbitrationOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'HELD_BY_SELLER_FOR_ARBITRATION_APPROVED':
                         $this->adminOrders->orderProfiles->heldBySellerForArbitrationApprovedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'HELD_BY_SELLER_FOR_ARBITRATION_DENIED':
                         $this->adminOrders->orderProfiles->heldBySellerForArbitrationDeniedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'SELLER_CLAIM_APPROVED_UNSHIPPED':
                         $this->adminOrders->orderProfiles->sellerClaimApprovedUnshippedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'SELLER_CLAIM_APPROVED_RESHIPPED':
                         $this->adminOrders->orderProfiles->sellerClaimApprovedReshippedOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                     case 'SELLER_CLAIM_APPROVED_DELIVERED':
                         $this->adminOrders->orderProfiles->sellerClaimApprovedDeliveredOrders[$orderProfiles[$k]['order_profile_id']] = $orderProfiles[$k];
                         break;
                 }
             }
             //$this->adminOrders->orderProfilesLoaded = true;
             echo 'here at loading and setting loaded equals true';
         }
     }
 }
예제 #10
0
 public function init()
 {
     parent::init();
     $this->breadcrumbs->addStep('Account', $this->getUrl(null, 'account'));
 }
 public function preDispatch()
 {
     parent::preDispatch();
     $this->request = $this->getRequest();
     $this->view->signedInUser = $this->signedInUserSessionInfoHolder;
 }
 public function preDispatch()
 {
     parent::preDispatch();
     $this->view->controllerMessage = '<strong>Compare chart</strong> expires in 5 hours if not saved.';
     $this->view->controller = 'Comparechart';
 }