Invalid product vars
at line 586 in file override/classes/Link.php
581. if (is_array($product) && isset($product['id_product'])) {
582. $params['id'] = $product['id_product'];
583. } elseif ((int) $product) {
584. $params['id'] = $product;
585. } else {
586. throw new PrestaShopException('Invalid product vars');
587. }
588. } else {
589. $params['id'] = $product->id;
590. }
591. if (empty($idProductAttribute)) {
1366. ];
1367. }
1368.
1369. $breadcrumb['links'][] = [
1370. 'title' => $this->product->name,
1371. 'url' => $this->context->link->getProductLink($this->product, null, null, null, null, null, (int) $this->getIdProductAttributeByRequest()),
1372. ];
1373.
1374. return $breadcrumb;
1375. }
1376.
Argument [0] Argument [1] Argument [2] Argument [3] Argument [4] 2 Argument [5] Argument [6] 0
1893. return $page;
1894. }
1895.
1896. public function getBreadcrumb()
1897. {
1898. $breadcrumb = $this->getBreadcrumbLinks();
1899. $breadcrumb['count'] = count($breadcrumb['links']);
1900.
1901. return $breadcrumb;
1902. }
1903.
561. $templateVars['shop'] = $templateVars['shop'] ?? $this->getTemplateVarShop();
562. $templateVars['core_js_public_path'] = $templateVars['core_js_public_path'] ?? $this->getCoreJsPublicPath();
563. $templateVars['urls'] = $templateVars['urls'] ?? $this->getTemplateVarUrls();
564. $templateVars['configuration'] = $templateVars['configuration'] ?? $this->getTemplateVarConfiguration();
565. $templateVars['field_required'] = $templateVars['field_required'] ?? $this->context->customer->validateFieldsRequiredDatabase();
566. $templateVars['breadcrumb'] = $templateVars['breadcrumb'] ?? $this->getBreadcrumb();
567. $templateVars['link'] = $templateVars['link'] ?? $this->context->link;
568. $templateVars['time'] = $templateVars['time'] ?? time();
569. $templateVars['static_token'] = $templateVars['static_token'] ?? Tools::getToken(false);
570. $templateVars['token'] = $templateVars['token'] ?? Tools::getToken();
571. $templateVars['debug'] = $templateVars['debug'] ?? _PS_MODE_DEV_;
621. /**
622. * Initializes common front page content: header, footer and side columns.
623. */
624. public function initContent()
625. {
626. $this->assignGeneralPurposeVariables();
627. $this->process();
628.
629. if (!isset($this->context->cart)) {
630. $this->context->cart = new Cart();
631. }
470.
471. // Assign attribute groups to the template
472. $this->assignAttributesGroups($product_for_template);
473. }
474.
475. parent::initContent();
476. }
477.
478. /**
479. * Processes submitted customizations
480. *
315. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
316. $this->initHeader();
317. }
318.
319. if ($this->viewAccess()) {
320. $this->initContent();
321. } else {
322. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
323. }
324.
325. 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();