Invalid product vars
at line 106 in file classes/Link.php
101. if (is_array($product) && isset($product['id_product'])) {
102. $product = new Product($product['id_product'], false, $id_lang, $id_shop);
103. } elseif ((int)$product) {
104. $product = new Product((int)$product, false, $id_lang, $id_shop);
105. } else {
106. throw new PrestaShopException('Invalid product vars');
107. }
108. }
109.
110. // Set available keywords
111. $params = array();
158. <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>'ampScripts'),$_smarty_tpl);?>
159.
160. <?php if (true) {?>
161. <?php if ($_smarty_tpl->tpl_vars['page_name']->value=="product") {?>
162. <link rel="canonical"
163. href="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getProductLink($_smarty_tpl->tpl_vars['product']->value->id,$_smarty_tpl->tpl_vars['product']->value->link_rewrite), ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
164. ">
165. <?php } elseif ($_smarty_tpl->tpl_vars['page_name']->value=="search") {?>
166. <link rel="canonical" href="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getPageLink('search'), ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
167. ">
168. <?php } elseif ($_smarty_tpl->tpl_vars['page_name']->value=="category") {?>
Argument [0] Argument [1]
183. }
184. array_unshift($_template->_capture_stack, array());
185. //
186. // render compiled template
187. //
188. $_template->properties['unifunc']($_template);
189. // any unclosed {capture} tags ?
190. if (isset($_template->_capture_stack[0][0])) {
191. $_template->capture_error();
192. }
193. array_shift($_template->_capture_stack);
Argument [0]
105. * {@inheritDoc}
106. */
107. public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false)
108. {
109. $this->check_compile_cache_invalidation();
110. return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
111. }
112.
113. /**
114. * {@inheritDoc}
115. */
Argument [0] /home/faimax/www/modules//amppages/views/templates/front/amp-product.tpl Argument [1] Argument [2] Argument [3] Argument [4] Argument [5] 1 Argument [6]
708. ));
709.
710. $layout = $this->getLayout();
711. if ($layout) {
712. if ($this->template) {
713. $template = $this->context->smarty->fetch($this->template);
714. } else {
715. // For retrocompatibility with 1.4 controller
716.
717. ob_start();
718. $this->displayContent();
Argument [0] /home/faimax/www/modules//amppages/views/templates/front/amp-product.tpl
204. $this->{'displayAjax'.$action}();
205. } elseif (method_exists($this, 'displayAjax')) {
206. $this->displayAjax();
207. }
208. } else {
209. $this->display();
210. }
211. } else {
212. $this->initCursedPage();
213. $this->smartyOutputContent($this->layout);
214. }
395. try
396. {
397. $controller = Controller::getController($controller_class);
398. if (isset($params_hook_action_dispatcher))
399. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
400. $controller->run();
401. if ($this->_isPageCacheActive())
402. {
403. PageCache::displayStats(false, $pre_display_html);
404. }
405. }
167. */
168. public function dispatch() {
169.
170. $this->isRedirect();
171. if (Tools::version_compare(_PS_VERSION_,'1.6','>=')) {
172. $this->dispatch_16();
173. } else {
174. $this->dispatch_15();
175. }
176. }
177. /*
22. * @copyright 2007-2016 PrestaShop SA
23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26. require(dirname(__FILE__).'/config/config.inc.php');
27. Dispatcher::getInstance()->dispatch();