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)); }
public function init() { $initRes = parent::init(); if ($this->user->getID()) { $this->user->load(); } return $initRes; }
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'); }
public function init() { if (!empty($_REQUEST['u'])) { //将来源URL中的参数全部设置到参数对象中 $urlInfo = $this->parseValidPram($_REQUEST['u']); //print_r($urlInfo);die; \Yii::$app->request->setQueryParams($urlInfo); } parent::init(); }
public function init() { $initRes = parent::init(); $this->loadLanguageFile('Frontend'); $this->loadLanguageFile('User'); if ($this->user->getID()) { $this->user->load(); } return $initRes; }
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'); }
function init() { parent::init(); }
/** * Actions attached to this controller * * @return array */ function init() { $this->layout = '//layouts/secondary'; parent::init(); }
public function init() { parent::init(); $this->loadLanguageFile('Err'); }
public function init() { parent::init(); $this->setLayout('dating'); }