if (!empty($manufacturers_ids)) { if (!is_array($manufacturers_ids) ) { $manufacturers_ids = [$manufacturers_ids]; } $manufacturers_ids = array_map('intval', $manufacturers_ids); $this->query->andWhere(['in', 'p.manufacturers_id', $manufacturers_ids]); } } public function findProducts(array $productsIds = []) { if (!is_array($productsIds)) { $productsIds = [$productsIds]; } if (!$productsIds) { return $this; } $productsIds = array_map('intval', $productsIds); /** @var \yii\db\ActiveQuery $this->query */
public function returnGroupedProducts(int $productId) { /** @var ProductsGroupedService $productsGroupedService */ $productsGroupedService = \Yii::createObject(ProductsGroupedService::class); $childProductsIds = $productsGroupedService->findChildIds($productId); return $this->findProducts($childProductsIds); } public function excludeGroupedProducts() { $this->query->andWhere(new Expression('p.products_id NOT IN (SELECT DISTINCT child_products_id as products_id FROM products_grouped WHERE 1)')); return $this; }
$canBuyParent = false; if (($productInfo['is_virtual'] || $stock['flags']['add_to_cart'] || (isset($this->settings[0]['list_demo']) && $this->settings[0]['list_demo'])) && !GROUPS_DISABLE_CHECKOUT ) { $canBuyParent = true; } $this->settings['listing_type'] = 'new-products'; $this->settings['show_grouped_properties'] = true; $products = Info::getListProductsDetails($q->buildQuery()->returnGroupedProducts($this->products_id)->allIds(), $this->settings); //$properties = array_column($products,'properties'); $properties = []; $productId = $productInfo['products_id']; array_walk_recursive($products, static function (&$item, $key) use (&$properties, $productInfo, &$productId) { if ($key === 'products_id') { $productId = $item;
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
/* * run extension widget */ public static function runExtensionWidget($widgeName, $widgetArray){ if ($ext_widget = self::checkExtension($widgeName, 'run', true)){ $widgetArray = array_merge($widgetArray, ['name' => $widgeName]); return $ext_widget::widget($widgetArray); } else { return false; } } public static function isFrontendTranslation()
}); </script> '; } else { if (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'boxes' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')){ $widget = $widget_name::widget($widget_array); } elseif (($ext_widget = \common\helpers\Acl::runExtensionWidget($item['widget_name'], $widget_array)) !== false){ $widget = $ext_widget; } else { $widget = ''; } } if ($settings[0]['style_class']) {
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
$var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); $var .= Block::widget(['name' => $block_id . '-2', 'params' => ['params' => $this->params, 'cols' => 2]]); $var .= Block::widget(['name' => $block_id . '-3', 'params' => ['params' => $this->params, 'cols' => 3]]); $var .= Block::widget(['name' => $block_id . '-4', 'params' => ['params' => $this->params, 'cols' => 4]]); $var .= Block::widget(['name' => $block_id . '-5', 'params' => ['params' => $this->params, 'cols' => 5]]); } elseif ($type == 1){ $var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); } else { $var .= '<div class="no-block-settings"></div> <script type="text/javascript"> tl(function(){ setTimeout(function(){ if (!window.isOpenedBlockPopup){ window.isOpenedBlockPopup = true;
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
}) }); </script> '; } else { if (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'boxes' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')){ $widget = $widget_name::widget($widget_array); } elseif (($ext_widget = \common\helpers\Acl::runExtensionWidget($item['widget_name'], $widget_array)) !== false){ $widget = $ext_widget; } else { $widget = ''; } }
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
$var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); $var .= Block::widget(['name' => $block_id . '-2', 'params' => ['params' => $this->params, 'cols' => 2]]); $var .= Block::widget(['name' => $block_id . '-3', 'params' => ['params' => $this->params, 'cols' => 3]]); $var .= Block::widget(['name' => $block_id . '-4', 'params' => ['params' => $this->params, 'cols' => 4]]); $var .= Block::widget(['name' => $block_id . '-5', 'params' => ['params' => $this->params, 'cols' => 5]]); } elseif ($type == 1){ $var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); } else { $var .= '<div class="no-block-settings"></div> <script type="text/javascript"> tl(function(){ setTimeout(function(){ if (!window.isOpenedBlockPopup){ window.isOpenedBlockPopup = true;
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
}) }); </script> '; } else { if (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'boxes' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')){ $widget = $widget_name::widget($widget_array); } elseif (($ext_widget = \common\helpers\Acl::runExtensionWidget($item['widget_name'], $widget_array)) !== false){ $widget = $ext_widget; } else { $widget = ''; } }
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
} $var = ''; if ($type == 2 || $type == 4 || $type == 5 || $type == 6 || $type == 7 || $type == 9 || $type == 10 || $type == 11 || $type == 12){ $var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); $var .= Block::widget(['name' => $block_id . '-2', 'params' => ['params' => $this->params, 'cols' => 2]]); } elseif ($type == 3 || $type == 8 || $type == 13){ $var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); $var .= Block::widget(['name' => $block_id . '-2', 'params' => ['params' => $this->params, 'cols' => 2]]); $var .= Block::widget(['name' => $block_id . '-3', 'params' => ['params' => $this->params, 'cols' => 3]]); } elseif ($type == 14){ $var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]);
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
}) }); </script> '; } else { if (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'boxes' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')){ $widget = $widget_name::widget($widget_array); } elseif (($ext_widget = \common\helpers\Acl::runExtensionWidget($item['widget_name'], $widget_array)) !== false){ $widget = $ext_widget; } else { $widget = ''; } }
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
$var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); $var .= Block::widget(['name' => $block_id . '-2', 'params' => ['params' => $this->params, 'cols' => 2]]); $var .= Block::widget(['name' => $block_id . '-3', 'params' => ['params' => $this->params, 'cols' => 3]]); $var .= Block::widget(['name' => $block_id . '-4', 'params' => ['params' => $this->params, 'cols' => 4]]); $var .= Block::widget(['name' => $block_id . '-5', 'params' => ['params' => $this->params, 'cols' => 5]]); } elseif ($type == 1){ $var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); } else { $var .= '<div class="no-block-settings"></div> <script type="text/javascript"> tl(function(){ setTimeout(function(){ if (!window.isOpenedBlockPopup){ window.isOpenedBlockPopup = true;
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
}) }); </script> '; } else { if (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'boxes' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')){ $widget = $widget_name::widget($widget_array); } elseif (($ext_widget = \common\helpers\Acl::runExtensionWidget($item['widget_name'], $widget_array)) !== false){ $widget = $ext_widget; } else { $widget = ''; } }
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
function content_5ec2a9bd1c57e9_62925656 (Smarty_Internal_Template $_smarty_tpl) { echo yii\helpers\Html::beginForm($_smarty_tpl->tpl_vars['action']->value,'post',array('id'=>'product-form','name'=>'cart_quantity'),false);?> <input type="hidden" name="products_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['products_prid']->value, ENT_QUOTES, 'UTF-8', true);?> "/> <div class="product" > <?php echo frontend\design\Block::widget(array('name'=>$_smarty_tpl->tpl_vars['page_name']->value,'params'=>array('type'=>'product','params'=>array('message'=>$_smarty_tpl->tpl_vars['message']->value))));?> </div> <?php echo yii\helpers\Html::endForm();?> <?php } }
} if ($_template->startRenderCallbacks) { foreach ($_template->startRenderCallbacks as $callback) { call_user_func($callback, $_template); } } $unifunc($_template); foreach ($_template->endRenderCallbacks as $callback) { call_user_func($callback, $_template); } $_template->isRenderingCache = false; } catch (Exception $e) { $_template->isRenderingCache = false;
$_template->cached->file_dependency = array_merge($_template->cached->file_dependency, $this->file_dependency); } if ($_template->source->handler->uncompiled) { $_template->source->handler->renderUncompiled($_template->source, $_template); } else { $this->getRenderedTemplateCode($_template); } if ($_template->caching && $this->has_nocache_code) { $_template->cached->hashes[ $this->nocache_hash ] = true; } if ($_template->smarty->debugging) { $_template->smarty->_debug->end_render($_template);
} $this->cached->render($this, $no_output_filter); } else { if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) { $this->loadCompiled(true); } $this->compiled->render($this); } // display or fetch if ($display) { if ($this->caching && $this->smarty->cache_modified_check) { $this->smarty->ext->_cacheModify->cacheModifiedCheck( $this->cached,
} ob_start(); $template->_mergeVars(); if (!empty(Smarty::$global_tpl_vars)) { $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars); } $result = $template->render(false, $function); $template->_cleanUp(); if ($saveVars) { $template->tpl_vars = $savedTplVars; $template->config_vars = $savedConfigVars; } else { if (!$function && !isset(Smarty_Internal_Template::$tplObjCache[ $template->templateId ])) {
* @throws Exception * @throws SmartyException * @return string rendered template output */ public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null) { $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0); return $result === null ? ob_get_clean() : $result; } /** * displays a Smarty template *
$template->assign('app', \Yii::$app); $template->assign('this', $view); $template->assign('js_mask_type', 'accounting');// accounting or maskMoney $template->assign('js_hide_currency', 1);// 0 1 return $template->fetch(); } /** * Resolves Yii alias into file path * * @param string $type
if (isset($this->renderers[$ext])) { if (is_array($this->renderers[$ext]) || is_string($this->renderers[$ext])) { $this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); }
* @throws InvalidCallException if the view cannot be resolved. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the [path alias](guide:concept-aliases) of the view file. Please refer to [[render()]] * on how to specify this parameter.
$this->getView()->clear(); } $this->view->page_params = $params['params']; //$headers = Yii::$app->response->headers; //$headers->set('X-Frame-Options', 'SAMEORIGIN'); $content = $this->getView()->render($view, $params, $this); $renderContent = \common\helpers\Translation::frontendTranslation($this->renderContent($content)); return $renderContent; } public function getHerfLang($platforms_languages){
return $this->render('product.tpl', [ 'action' => tep_href_link('catalog/product', \common\helpers\Output::get_all_get_params(array('action')) . 'action=add_product'), 'products_id' => $params['products_id'], 'products_prid' => \common\helpers\Inventory::get_prid($params['products_id']), 'review_write_now' => $review_write_now, 'message' => $message, 'page_name' => $page_name ]); } public function actionProductAttributes() { \common\helpers\Translation::init('catalog/product');
$args = $this->controller->bindActionParams($this, $params); Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
if ($ext::allowed() ) { $ext::registerJsFile($this->getView()); } } } return parent::runAction($id, $params); } protected function setMeta($id, $params) {
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
* * For the full copyright and license information, please view the LICENSE file that was distributed with this source code. */ require('includes/application_top.php'); require(__DIR__ . '/lib/frontend/web/index.php'); require_once('includes/application_bottom.php');
$_GET = [ 'products_id' => '12885', ]; $_SESSION = [ '__flash' => [], '_tlStorageId' => 'iUvoyyzzfs5PPZY3SonLW-DtI3BaAS23', 'platform_sattelite' => 0, 'platform_code' => '', 'iUvoyyzzfs5PPZY3SonLW-DtI3BaAS23' => [ 'customer_groups_id' => '1', ], 'language' => 'english', 'primary-settings' => [ 'locale' => 'pt_PT', 'languages_id' => '30', 'currency_id' => '2', 'currency' => 'EUR', ], 'SHOW_OUT_OF_STOCK' => 1, 'gl' => 'grid', 'bpObserver' => unserialize('O:48:"common\\models\\promotions\\PromotionsBonusObserver":2:{s:11:"workingDate";s:10:"29-03-2024";s:7:"actions";a:0:{}}'), 'viewed_products' => [ 12885 => 12885, ], ];