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 ')) AND (v_p.`position` = 'productImages') AND (v.active = 1)
ORDER BY v.posit...' at line 10<br /><br /><pre>SELECT vrc.id_hiupv,
v.*,
v_l.*,
v_p.position
FROM `ormnl_hiupvrelatedcategory` vrc
LEFT JOIN `ormnl_hiupv` `v` ON v.`id_hiupv` = vrc.`id_hiupv`
LEFT JOIN `ormnl_hiupvposition` `v_p` ON v_p.`id_hiupv` = v.`id_hiupv`
LEFT JOIN `ormnl_hiupv_lang` `v_l` ON v_l.`id_hiupv` = v.`id_hiupv`
LEFT JOIN `ormnl_hiupv_shop` `v_s` ON v_s.`id_hiupv` = v.`id_hiupv`
WHERE (v_l.`id_lang` = 1) AND (v_s.`id_shop` = 1) AND (vrc.`id_category` IN ()) AND (v_p.`position` = 'productImages') AND (v.active = 1)
ORDER BY v.position desc
</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.
31. $context = Context::getContext();
32. if(isset($context->ss_total_sql))
33. $context->ss_total_sql++;
34. else
35. $context->ss_total_sql=1;
36. return parent::query($sql);
37. }
38. }
608. || stripos($sql, 'dumpfile') !== false
609. ) {
610. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
611. }
612.
613. $this->result = $this->query($sql);
614.
615. if (!$this->result) {
616. $result = false;
617. } else {
618. if (!$array) {
139. $query->where('v.active = 1');
140. }
141.
142. $query->orderBy('v.position desc');
143.
144. return Db::getInstance()->executeS($query);
145. }
146.
147. public static function getPosition()
148. {
149. return (int)DB::getInstance()->getValue('SELECT MAX(position) FROM '._DB_PREFIX_.'hiupv') + 1;
1679. public function getPositionVideos($id_product, $position)
1680. {
1681. $product_videos = HiUploadProductVideo::getVideosByProductID($id_product, $position);
1682.
1683. $categories = Product::getProductCategories($id_product);
1684. $category_videos = HiUploadProductVideo::getVideosByCategories($categories, $position);
1685.
1686. $videos = array_unique(array_merge($product_videos, $category_videos), SORT_REGULAR);
1687.
1688. if (!is_array($videos) || !$videos) {
1689. return array();
1710.
1711. $jsVars['hiupv']['module_dir'] = $assetsDir . '/videos/';
1712. $jsVars['hiupv']['thumbnails_dir'] = $assetsDir . '/img/thumbnails/';
1713.
1714. if (Dispatcher::getInstance()->getController() == 'product') {
1715. $videos = $this->getPositionVideos(Tools::getValue('id_product'), 'productImages');
1716. // $videos = $this->returnVideoID($videos);
1717.
1718. $jsVars['hiupv']['product_image_videos'] = $videos;
1719. $jsVars['hiupv']['product_image_position'] = $this->product_image_position;
1720. }
1002. return $output;
1003. }
1004.
1005. public static function coreCallHook($module, $method, $params)
1006. {
1007. return $module->{$method}($params);
1008. }
1009.
1010. public static function coreRenderWidget($module, $hook_name, $params)
1011. {
1012. $context = Context::getContext();
515. return Cache::retrieve($cacheId);
516. }
517. public static function callHookOn($module, $hookName, $hookArgs)
518. {
519. if (is_callable(array($module, 'hook' . $hookName))) {
520. return Hook::coreCallHook($module, 'hook' . $hookName, $hookArgs);
521. }
522. foreach (Ets_Hook::getHookAliasesFor($hookName) as $hook) {
523. if (is_callable(array($module, 'hook' . $hook))) {
524. return Hook::coreCallHook($module, 'hook' . $hook, $hookArgs);
525. }
366.
367. if (0 !== $key && true === $chain) {
368. $hook_args = $output;
369. }
370.
371. $display = Ets_Hook::callHookOn($moduleInstance, $hook_name, $hook_args);
372.
373. if ($array_return) {
374. $output[$moduleInstance->name] = $display;
375. } else {
376. if (true === $chain) {
31. require_once(dirname(__FILE__).'/../../modules/ets_superspeed/classes/ext/ets_hook');
32. $class='Ets_Hook';
33. $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
34. if (Tools::version_compare(_PS_VERSION_,'1.7','>=')) {
35. $method='exec17';
36. return call_user_func_array(array($class, $method),array($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop,$chain,$backtrace));
37. }
38. else
39. {
40. $method='exec16';
41. return call_user_func_array(array($class, $method),array($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop));
593. if (!isset($this->context->cart)) {
594. $this->context->cart = new Cart();
595. }
596.
597. $this->context->smarty->assign([
598. 'HOOK_HEADER' => Hook::exec('displayHeader'),
599. ]);
600. }
601.
602. public function initFooter()
603. {
13. if(Tools::isSubmit('ets_superseed_load_content'))
14. {
15. parent::initContent();
16. Hook::exec('actionPageCacheAjax');
17. }
18. parent::initContent();
19. }
20. }
412.
413. // Assign attribute groups to the template
414. $this->assignAttributesGroups($product_for_template);
415. }
416.
417. parent::initContent();
418. }
419.
420. public function displayAjaxQuickview()
421. {
422. $productForTemplate = $this->getTemplateVarProduct();
301. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
302. $this->initHeader();
303. }
304.
305. if ($this->viewAccess()) {
306. $this->initContent();
307. } else {
308. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
309. }
310.
311. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
520. if (isset($params_hook_action_dispatcher)) {
521. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
522. }
523.
524. // Running controller
525. $controller->run();
526.
527. // Execute hook dispatcher after
528. if (isset($params_hook_action_dispatcher)) {
529. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
530. }
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();