コード例 #1
0
 public function init()
 {
     if ('CheckoutController' == get_class($this) && $this->config->get('CHECKOUT_METHOD') == 'CHECKOUT_ONEPAGE') {
         if (in_array($this->request->getActionName(), array('index', 'selectAddress', 'shipping', 'pay'))) {
             if (!$this->order->isMultiAddress->get() && !$this->session->get('noJS')) {
                 return new ActionRedirectResponse('onePageCheckout', 'index');
             }
         }
     }
     $this->loadLanguageFile('User');
     parent::init();
     $this->addBreadCrumb($this->translate('_checkout'), $this->router->createUrl(array('controller' => 'order', 'action' => 'index'), true));
     $action = $this->request->getActionName();
     if ('index' == $action) {
         return false;
     }
     $this->addBreadCrumb($this->translate('_select_addresses'), $this->router->createUrl(array('controller' => 'checkout', 'action' => 'selectAddress'), true));
     if ('selectAddress' == $action) {
         return false;
     }
     $this->addBreadCrumb($this->translate('_shipping'), $this->router->createUrl(array('controller' => 'checkout', 'action' => 'shipping'), true));
     if ('shipping' == $action) {
         return false;
     }
     $this->addBreadCrumb($this->translate('_pay'), $this->router->createUrl(array('controller' => 'checkout', 'action' => 'pay'), true));
 }
コード例 #2
0
ファイル: UserController.php プロジェクト: GregerA/livecart
 public function init()
 {
     $initRes = parent::init();
     if ($this->user->getID()) {
         $this->user->load();
     }
     return $initRes;
 }
コード例 #3
0
 public function init()
 {
     parent::init();
     $this->addBlock('FILTER_BOX', 'boxFilter', 'block/box/filter');
     $this->addBlock('FILTER_TOP', 'boxFilterTop', 'category/boxFilterTopBlock');
     $this->addBlock('PRODUCT_LISTS', 'productList', 'block/productList');
     $this->addBlock('RELATED_CATEGORIES', 'relatedCategories', 'category/block/relatedCategories');
 }
コード例 #4
0
ファイル: StatisticsController.php プロジェクト: gtyd/jira
 public function init()
 {
     if (!empty($_REQUEST['u'])) {
         //将来源URL中的参数全部设置到参数对象中
         $urlInfo = $this->parseValidPram($_REQUEST['u']);
         //print_r($urlInfo);die;
         \Yii::$app->request->setQueryParams($urlInfo);
     }
     parent::init();
 }
コード例 #5
0
ファイル: UserController.php プロジェクト: saiber/livecart
 public function init()
 {
     $initRes = parent::init();
     $this->loadLanguageFile('Frontend');
     $this->loadLanguageFile('User');
     if ($this->user->getID()) {
         $this->user->load();
     }
     return $initRes;
 }
コード例 #6
0
ファイル: ProductController.php プロジェクト: saiber/www
 public function init()
 {
     parent::init();
     $this->addBlock('PRODUCT-ATTRIBUTE-SUMMARY', 'attributeSummary', 'product/block/attributeSummary');
     $this->addBlock('PRODUCT-PURCHASE', 'purchase', 'product/block/purchase');
     $this->addBlock('PRODUCT-PRICE', 'price', 'product/block/price');
     $this->addBlock('PRODUCT-UP-SELL', 'upSell', 'product/block/upsell');
     $this->addBlock('PRODUCT-OPTIONS', 'options', 'product/block/options');
     $this->addBlock('PRODUCT-VARIATIONS', 'variations', 'product/block/variations');
     $this->addBlock('PRODUCT-TO-CART', 'addToCart', 'product/block/toCart');
     $this->addBlock('PRODUCT-ACTIONS', 'actions', 'product/block/actions');
     $this->addBlock('PRODUCT-IMAGES', 'images', 'product/block/images');
     $this->addBlock('PRODUCT-SUMMARY', 'summary', 'product/block/summary');
     $this->addBlock('PRODUCT-MAININFO', 'mainInfo', 'product/block/mainInfo');
     $this->addBlock('PRODUCT-OVERVIEW', 'overview', 'product/block/overview');
     $this->addBlock('PRODUCT-RATING-SUMMARY', 'ratingSummary', 'product/ratingSummary');
     $this->addBlock('PRODUCT-PURCHASE-VARIATIONS', 'purchaseVariations', 'product/block/purchaseVariations');
 }
コード例 #7
0
 function init()
 {
     parent::init();
 }
コード例 #8
0
 /**
  * Actions attached to this controller
  *
  * @return array
  */
 function init()
 {
     $this->layout = '//layouts/secondary';
     parent::init();
 }
コード例 #9
0
ファイル: ErrController.php プロジェクト: saiber/www
 public function init()
 {
     parent::init();
     $this->loadLanguageFile('Err');
 }
コード例 #10
0
 public function init()
 {
     parent::init();
     $this->setLayout('dating');
 }