You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '
,
16),(113328,
...' at line 6<br /><br /><pre>INSERT INTO `ps_st_search_price_index` (id_product, id_currency, id_shop, price_min, price_max, id_country)
VALUES (113328,
2,
5,
,
,
16),(113328,
2,
5,
,
,
37)
ON DUPLICATE KEY UPDATE id_product = id_product</pre>
at line 769 in file classes/db/Db.php
764. if ($webservice_call && $errno) {
765. $dbg = debug_backtrace();
766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97);
767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
768. if ($sql) {
769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>');
770. }
771.
772. throw new PrestaShopDatabaseException($this->getMsgError());
773. }
774. }
380. $this->result = $this->_query($sql);
381. }
382. }
383.
384. if (_PS_DEBUG_SQL_) {
385. $this->displayError($sql);
386. }
387.
388. return $this->result;
389. }
390.
561. {
562. if ($sql instanceof DbQuery) {
563. $sql = $sql->build();
564. }
565.
566. $this->result = $this->query($sql);
567. if ($use_cache && $this->is_cache_enabled) {
568. Cache::getInstance()->deleteQuery($sql);
569. }
570.
571. return (bool) $this->result;
657. }
658.
659. if (!empty($values)) {
660. $this->getDatabase()->execute(
661. 'INSERT INTO `' . _DB_PREFIX_ . 'st_search_price_index` (id_product, '.(Module::isEnabled('stproductsbyattrs') && $has_attribtes ? 'id_product_attribute,' : '').' id_currency, id_shop, price_min, price_max, id_country)
662. VALUES ' . implode(',', $values) . '
663. ON DUPLICATE KEY UPDATE id_product = id_product' // Avoid duplicate keys
664. );
665. }
666. }
667. }
41. {
42. if (empty($params['id_product'])) {
43. return;
44. }
45.
46. $this->module->indexProductPrices((int) $params['id_product']);
47. $this->module->indexAttributes((int) $params['id_product']);
48. $this->module->invalidateLayeredFilterBlockCache();
49. }
50. }
106. {
107. $hookName = preg_replace('~^hook~', '', $hookName);
108.
109. foreach ($this->hooks as $hook) {
110. if (method_exists($hook, $hookName)) {
111. return call_user_func([$hook, $hookName], $params);
112. }
113. }
114.
115. // No hook found, render it as a widget
116. return $this->module->renderWidget($hookName, $params);
2545. */
2546. public function __call($methodName, array $arguments)
2547. {
2548. return $this->getHookDispatcher()->dispatch(
2549. $methodName,
2550. !empty($arguments[0]) ? $arguments[0] : []
2551. );
2552. }
2553.
2554. /**
2555. * Invalid filter block cache
992. return $output;
993. }
994.
995. public static function coreCallHook($module, $method, $params)
996. {
997. return $module->{$method}($params);
998. }
999.
1000. public static function coreRenderWidget($module, $hook_name, $params)
1001. {
1002. $context = Context::getContext();
416. // Since is_callable() will always return true when __call() is available,
417. // if the module was expecting an aliased hook name to be invoked, but we send
418. // the canonical hook name instead, the hook will never be acknowledged by the module.
419. $methodName = static::getMethodName($hookName);
420. if (is_callable([$module, $methodName])) {
421. return static::coreCallHook($module, $methodName, $hookArgs);
422. }
423.
424. // fall back to all other names
425. foreach (static::getAllKnownNames($hookName) as $hook) {
426. $methodName = static::getMethodName($hook);
929.
930. if (0 !== $key && true === $chain) {
931. $hook_args = $output;
932. }
933.
934. $display = Hook::callHookOn($moduleInstance, $registeredHookName, $hook_args);
935.
936. if ($array_return) {
937. $output[$moduleInstance->name] = $display;
938. } else {
939. if (true === $chain) {
822. 'upc' => pSQL($this->upc),
823. 'mpn' => pSQL($this->mpn),
824. ], 'id_product = ' . (int) $this->id . ' AND id_product_attribute = 0');
825. }
826.
827. Hook::exec('actionProductSave', ['id_product' => (int) $this->id, 'product' => $this]);
828. Hook::exec('actionProductUpdate', ['id_product' => (int) $this->id, 'product' => $this]);
829. if ($this->getType() == Product::PTYPE_VIRTUAL && $this->active && !Configuration::get('PS_VIRTUAL_PROD_FEATURE_ACTIVE')) {
830. Configuration::updateGlobalValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE', '1');
831. }
832.
93. $io_desc_short = $module->getFilterContent($page_name, $io_desc_short);
94. $product->description_short = $io_desc_short;
95. $flag = true;
96. }
97. if ($flag === true) {
98. $product->update();
99. }
100. }
101. }
102. }
282. /**
283. * Starts the controller process (this method should not be overridden!).
284. */
285. public function run()
286. {
287. $this->init();
288. if ($this->checkAccess()) {
289. // setMedia MUST be called before postProcess
290. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
291. $this->setMedia();
292. }
513. if (isset($params_hook_action_dispatcher)) {
514. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
515. }
516.
517. // Running controller
518. $controller->run();
519.
520. // Execute hook dispatcher after
521. if (isset($params_hook_action_dispatcher)) {
522. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
523. }
34. {
35. echo $cache;
36. exit;
37. }
38. }
39. parent::dispatch();
40. }
41. }
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();