Invalid product vars
at line 173 in file classes/Link.php
168. if (is_array($product) && isset($product['id_product'])) {
169. $params['id'] = $product['id_product'];
170. } elseif ((int) $product) {
171. $params['id'] = $product;
172. } else {
173. throw new PrestaShopException('Invalid product vars');
174. }
175. } else {
176. $params['id'] = $product->id;
177. }
178.
1348. ];
1349. }
1350.
1351. $breadcrumb['links'][] = [
1352. 'title' => $this->product->name,
1353. 'url' => $this->context->link->getProductLink($this->product, null, null, null, null, null, (int) $this->getIdProductAttributeByRequest()),
1354. ];
1355.
1356. return $breadcrumb;
1357. }
1358.
1814. return $page;
1815. }
1816.
1817. public function getBreadcrumb()
1818. {
1819. $breadcrumb = $this->getBreadcrumbLinks();
1820. $breadcrumb['count'] = count($breadcrumb['links']);
1821.
1822. return $breadcrumb;
1823. }
1824.
507. 'shop' => $this->getTemplateVarShop(),
508. 'core_js_public_path' => $this->getCoreJsPublicPath(),
509. 'urls' => $this->getTemplateVarUrls(),
510. 'configuration' => $this->getTemplateVarConfiguration(),
511. 'field_required' => $this->context->customer->validateFieldsRequiredDatabase(),
512. 'breadcrumb' => $this->getBreadcrumb(),
513. 'link' => $this->context->link,
514. 'time' => time(),
515. 'static_token' => Tools::getToken(false),
516. 'token' => Tools::getToken(),
517. 'debug' => _PS_MODE_DEV_,
564. /**
565. * Initializes common front page content: header, footer and side columns.
566. */
567. public function initContent()
568. {
569. $this->assignGeneralPurposeVariables();
570. $this->process();
571.
572. if (!isset($this->context->cart)) {
573. $this->context->cart = new Cart();
574. }
459.
460. // Assign attribute groups to the template
461. $this->assignAttributesGroups($product_for_template);
462. }
463.
464. parent::initContent();
465. }
466.
467. /**
468. * Processes submitted customizations
469. *
314. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
315. $this->initHeader();
316. }
317.
318. if ($this->viewAccess()) {
319. $this->initContent();
320. } else {
321. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
322. }
323.
324. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
505.
506. // Execute hook dispatcher
507. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
508.
509. // Running controller
510. $controller->run();
511.
512. // Execute hook dispatcher after
513. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
514. } catch (PrestaShopException $e) {
515. $e->displayMessage();
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();