You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 5<br /><br /><pre>SELECT o.id_order
FROM arth_orders o
LEFT JOIN arth_order_detail od ON (od.id_order = o.id_order)
WHERE o.valid = 1
AND od.product_id IN ()</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.
608. }
609.
610. return $this->execute($sql, $use_cache);
611. }
612.
613. $this->result = $this->query($sql);
614.
615. if (!$this->result) {
616. $result = false;
617. } else {
618. if (!$array) {
246. FROM ' . _DB_PREFIX_ . 'orders o
247. LEFT JOIN ' . _DB_PREFIX_ . 'order_detail od ON (od.id_order = o.id_order)
248. WHERE o.valid = 1
249. AND od.product_id IN (' . implode(',', $productIds) . ')';
250.
251. $orders = Db::getInstance((bool) _PS_USE_SQL_SLAVE_)->executeS($q_orders);
252.
253. if (0 < count($orders)) {
254. $list = '';
255. foreach ($orders as $order) {
256. $list .= (int) $order['id_order'] . ',';
205.
206. public function getWidgetVariables($hookName, array $configuration)
207. {
208. $productIds = $this->getProductIds($hookName, $configuration);
209. if (!empty($productIds)) {
210. $products = $this->getOrderProducts($productIds);
211.
212. if (!empty($products)) {
213. return [
214. 'products' => $products,
215. ];
226. if (empty($productIds)) {
227. return;
228. }
229.
230. if (!$this->isCached($this->templateFile, $this->getCacheIdKey($productIds))) {
231. $variables = $this->getWidgetVariables($hookName, $configuration);
232.
233. if (empty($variables)) {
234. return false;
235. }
236.
1002. $context = Context::getContext();
1003. if (!Module::isEnabled($module->name) || $context->isMobile() && !Module::isEnabledForMobileDevices($module->name)) {
1004. return null;
1005. }
1006.
1007. return $module->renderWidget($hook_name, $params);
1008. }
1009.
1010. /**
1011. * @return \PrestaShopBundle\DataCollector\HookRegistry|null
1012. */
949. if ($moduleInstance instanceof WidgetInterface) {
950. if (0 !== $key && true === $chain) {
951. $hook_args = $output;
952. }
953.
954. $display = Hook::coreRenderWidget($moduleInstance, $registeredHookName, $hook_args);
955.
956. if ($array_return) {
957. $output[$moduleInstance->name] = $display;
958. } else {
959. if (true === $chain) {
162.
163. return $result;
164. }
165. unset($hook_params['h']);
166.
167. return Hook::exec($params['h'], $hook_params, $id_module);
168. }
169.
170. function smartyCleanHtml($data)
171. {
172. // Prevent xss injection.
78. } else {
79. $args[] = &$arguments[$a];
80. }
81. }
82.
83. return call_user_func_array($item, $args);
84. }
85. }
86.
87. public static function getInstance($smarty)
88. {
272. class Block_33812737966053a823c2ba6_07613364 extends Smarty_Internal_Block
273. {
274. public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
275. ?>
276.
277. <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0], array( array('h'=>'displayFooterProduct','product'=>$_smarty_tpl->tpl_vars['product']->value,'category'=>$_smarty_tpl->tpl_vars['category']->value),$_smarty_tpl ) );?>
278.
279. <?php
280. }
281. }
282. /* {/block 'product_footer'} */
243. */
244. public function callBlock(Smarty_Internal_Block $block, Smarty_Internal_Template $tpl)
245. {
246. $this->sourceStack[] = $tpl->source;
247. $tpl->source = $this->sources[ $block->tplIndex ];
248. $block->callBlock($tpl);
249. $tpl->source = array_pop($this->sourceStack);
250. }
251. }
179. $block->parent = $parent;
180. if ($block->append && !$block->prepend && isset($parent)) {
181. $this->callParent($tpl, $block, '\'{block append}\'');
182. }
183. if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) {
184. $this->callBlock($block, $tpl);
185. } else {
186. $this->process($tpl, $block->child, $block);
187. }
188. if ($block->prepend && isset($parent)) {
189. $this->callParent($tpl, $block, '{block prepend}');
151. }
152. // make sure we got child block of child template of current block
153. while ($block->child && $block->child->child && $block->tplIndex <= $block->child->tplIndex) {
154. $block->child = $block->child->child;
155. }
156. $this->process($tpl, $block);
157. }
158.
159. /**
160. * Goto child block or render this
161. *
285. {
286. public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
287. ?>
288.
289. <?php
290. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_33812737966053a823c2ba6_07613364', 'product_footer', $this->tplIndex);
291. ?>
292.
293. <?php
294. }
295. }
243. */
244. public function callBlock(Smarty_Internal_Block $block, Smarty_Internal_Template $tpl)
245. {
246. $this->sourceStack[] = $tpl->source;
247. $tpl->source = $this->sources[ $block->tplIndex ];
248. $block->callBlock($tpl);
249. $tpl->source = array_pop($this->sourceStack);
250. }
251. }
179. $block->parent = $parent;
180. if ($block->append && !$block->prepend && isset($parent)) {
181. $this->callParent($tpl, $block, '\'{block append}\'');
182. }
183. if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) {
184. $this->callBlock($block, $tpl);
185. } else {
186. $this->process($tpl, $block->child, $block);
187. }
188. if ($block->prepend && isset($parent)) {
189. $this->callParent($tpl, $block, '{block prepend}');
151. }
152. // make sure we got child block of child template of current block
153. while ($block->child && $block->child->child && $block->tplIndex <= $block->child->tplIndex) {
154. $block->child = $block->child->child;
155. }
156. $this->process($tpl, $block);
157. }
158.
159. /**
160. * Goto child block or render this
161. *
491. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_129026602666053a823bf997_25408536', 'ap5_accessories', $this->tplIndex);
492. ?>
493.
494.
495. <?php
496. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_11691663466053a823c28f7_48248250', 'ap5_footer', $this->tplIndex);
497. ?>
498.
499.
500. <?php
501. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_45757186966053a823c3f51_04010400', 'ap5_images', $this->tplIndex);
243. */
244. public function callBlock(Smarty_Internal_Block $block, Smarty_Internal_Template $tpl)
245. {
246. $this->sourceStack[] = $tpl->source;
247. $tpl->source = $this->sources[ $block->tplIndex ];
248. $block->callBlock($tpl);
249. $tpl->source = array_pop($this->sourceStack);
250. }
251. }
179. $block->parent = $parent;
180. if ($block->append && !$block->prepend && isset($parent)) {
181. $this->callParent($tpl, $block, '\'{block append}\'');
182. }
183. if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) {
184. $this->callBlock($block, $tpl);
185. } else {
186. $this->process($tpl, $block->child, $block);
187. }
188. if ($block->prepend && isset($parent)) {
189. $this->callParent($tpl, $block, '{block prepend}');
181. $this->callParent($tpl, $block, '\'{block append}\'');
182. }
183. if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) {
184. $this->callBlock($block, $tpl);
185. } else {
186. $this->process($tpl, $block->child, $block);
187. }
188. if ($block->prepend && isset($parent)) {
189. $this->callParent($tpl, $block, '{block prepend}');
190. if ($block->append) {
191. if ($block->callsChild || !isset($block->child)
181. $this->callParent($tpl, $block, '\'{block append}\'');
182. }
183. if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) {
184. $this->callBlock($block, $tpl);
185. } else {
186. $this->process($tpl, $block->child, $block);
187. }
188. if ($block->prepend && isset($parent)) {
189. $this->callParent($tpl, $block, '{block prepend}');
190. if ($block->append) {
191. if ($block->callsChild || !isset($block->child)
151. }
152. // make sure we got child block of child template of current block
153. while ($block->child && $block->child->child && $block->tplIndex <= $block->child->tplIndex) {
154. $block->child = $block->child->child;
155. }
156. $this->process($tpl, $block);
157. }
158.
159. /**
160. * Goto child block or render this
161. *
96.
97. <div id="content-wrapper" class="col-lg-12">
98. <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0], array( array('h'=>"displayContentWrapperTop"),$_smarty_tpl ) );?>
99.
100. <?php
101. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_504635065660533c8857ca7_54025292', 'content', $this->tplIndex);
102. ?>
103.
104. <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0], array( array('h'=>"displayContentWrapperBottom"),$_smarty_tpl ) );?>
105.
106. </div>
243. */
244. public function callBlock(Smarty_Internal_Block $block, Smarty_Internal_Template $tpl)
245. {
246. $this->sourceStack[] = $tpl->source;
247. $tpl->source = $this->sources[ $block->tplIndex ];
248. $block->callBlock($tpl);
249. $tpl->source = array_pop($this->sourceStack);
250. }
251. }
179. $block->parent = $parent;
180. if ($block->append && !$block->prepend && isset($parent)) {
181. $this->callParent($tpl, $block, '\'{block append}\'');
182. }
183. if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) {
184. $this->callBlock($block, $tpl);
185. } else {
186. $this->process($tpl, $block->child, $block);
187. }
188. if ($block->prepend && isset($parent)) {
189. $this->callParent($tpl, $block, '{block prepend}');
181. $this->callParent($tpl, $block, '\'{block append}\'');
182. }
183. if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) {
184. $this->callBlock($block, $tpl);
185. } else {
186. $this->process($tpl, $block->child, $block);
187. }
188. if ($block->prepend && isset($parent)) {
189. $this->callParent($tpl, $block, '{block prepend}');
190. if ($block->append) {
191. if ($block->callsChild || !isset($block->child)
151. }
152. // make sure we got child block of child template of current block
153. while ($block->child && $block->child->child && $block->tplIndex <= $block->child->tplIndex) {
154. $block->child = $block->child->child;
155. }
156. $this->process($tpl, $block);
157. }
158.
159. /**
160. * Goto child block or render this
161. *
89. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_965483230660533c88657c4_61192701', "left_column");
90. ?>
91.
92.
93. <?php
94. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1649975822660533c88673d4_51224139', "content_wrapper");
95. ?>
96.
97.
98. <?php
99. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_71478717660533c8868bc7_46946946', "right_column");
118. if ($_template->startRenderCallbacks) {
119. foreach ($_template->startRenderCallbacks as $callback) {
120. call_user_func($callback, $_template);
121. }
122. }
123. $unifunc($_template);
124. foreach ($_template->endRenderCallbacks as $callback) {
125. call_user_func($callback, $_template);
126. }
127. $_template->isRenderingCache = false;
128. } catch (Exception $e) {
109. array_merge($_template->cached->file_dependency, $this->file_dependency);
110. }
111. if ($_template->source->handler->uncompiled) {
112. $_template->source->handler->renderUncompiled($_template->source, $_template);
113. } else {
114. $this->getRenderedTemplateCode($_template);
115. }
116. if ($_template->caching && $this->has_nocache_code) {
117. $_template->cached->hashes[ $this->nocache_hash ] = true;
118. }
119. if ($_template->smarty->debugging) {
211. $this->cached->render($this, $no_output_filter);
212. } else {
213. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
214. $this->loadCompiled(true);
215. }
216. $this->compiled->render($this);
217. }
218. // display or fetch
219. if ($display) {
220. if ($this->caching && $this->smarty->cache_modified_check) {
221. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
380. }
381. } else {
382. if (isset($tpl->compiled)) {
383. $tpl->compiled->render($tpl);
384. } else {
385. $tpl->render();
386. }
387. }
388. }
389.
390. /**
111. }
112. if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends')
113. || $tpl->smarty->extends_recursion)
114. ) {
115. $tpl->_subTemplateRender(
116. $template,
117. $tpl->cache_id,
118. $tpl->compile_id,
119. $tpl->caching ? 9999 : 0,
120. $tpl->cache_lifetime,
121. array(),
37.
38. <?php
39. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_21611884660533c8857381_63033208', 'content_wrapper');
40. ?>
41.
42. <?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, 'layouts/layout-both-columns.tpl');
43. }
44. /* {block 'left_column'} */
45. class Block_772594206660533c8856698_48619610 extends Smarty_Internal_Block
46. {
47. public $subBlocks = array (
118. if ($_template->startRenderCallbacks) {
119. foreach ($_template->startRenderCallbacks as $callback) {
120. call_user_func($callback, $_template);
121. }
122. }
123. $unifunc($_template);
124. foreach ($_template->endRenderCallbacks as $callback) {
125. call_user_func($callback, $_template);
126. }
127. $_template->isRenderingCache = false;
128. } catch (Exception $e) {
109. array_merge($_template->cached->file_dependency, $this->file_dependency);
110. }
111. if ($_template->source->handler->uncompiled) {
112. $_template->source->handler->renderUncompiled($_template->source, $_template);
113. } else {
114. $this->getRenderedTemplateCode($_template);
115. }
116. if ($_template->caching && $this->has_nocache_code) {
117. $_template->cached->hashes[ $this->nocache_hash ] = true;
118. }
119. if ($_template->smarty->debugging) {
211. $this->cached->render($this, $no_output_filter);
212. } else {
213. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
214. $this->loadCompiled(true);
215. }
216. $this->compiled->render($this);
217. }
218. // display or fetch
219. if ($display) {
220. if ($this->caching && $this->smarty->cache_modified_check) {
221. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
380. }
381. } else {
382. if (isset($tpl->compiled)) {
383. $tpl->compiled->render($tpl);
384. } else {
385. $tpl->render();
386. }
387. }
388. }
389.
390. /**
111. }
112. if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends')
113. || $tpl->smarty->extends_recursion)
114. ) {
115. $tpl->_subTemplateRender(
116. $template,
117. $tpl->cache_id,
118. $tpl->compile_id,
119. $tpl->caching ? 9999 : 0,
120. $tpl->cache_lifetime,
121. array(),
51.
52. <?php
53. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1843849960660533e8e44c62_64950308', 'content');
54. ?>
55.
56. <?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, $_smarty_tpl->tpl_vars['layout']->value);
57. }
58. /* {block 'head_seo'} */
59. class Block_1516327585660533e8e3e246_09042957 extends Smarty_Internal_Block
60. {
61. public $subBlocks = array (
118. if ($_template->startRenderCallbacks) {
119. foreach ($_template->startRenderCallbacks as $callback) {
120. call_user_func($callback, $_template);
121. }
122. }
123. $unifunc($_template);
124. foreach ($_template->endRenderCallbacks as $callback) {
125. call_user_func($callback, $_template);
126. }
127. $_template->isRenderingCache = false;
128. } catch (Exception $e) {
109. array_merge($_template->cached->file_dependency, $this->file_dependency);
110. }
111. if ($_template->source->handler->uncompiled) {
112. $_template->source->handler->renderUncompiled($_template->source, $_template);
113. } else {
114. $this->getRenderedTemplateCode($_template);
115. }
116. if ($_template->caching && $this->has_nocache_code) {
117. $_template->cached->hashes[ $this->nocache_hash ] = true;
118. }
119. if ($_template->smarty->debugging) {
211. $this->cached->render($this, $no_output_filter);
212. } else {
213. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
214. $this->loadCompiled(true);
215. }
216. $this->compiled->render($this);
217. }
218. // display or fetch
219. if ($display) {
220. if ($this->caching && $this->smarty->cache_modified_check) {
221. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
380. }
381. } else {
382. if (isset($tpl->compiled)) {
383. $tpl->compiled->render($tpl);
384. } else {
385. $tpl->render();
386. }
387. }
388. }
389.
390. /**
111. }
112. if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends')
113. || $tpl->smarty->extends_recursion)
114. ) {
115. $tpl->_subTemplateRender(
116. $template,
117. $tpl->cache_id,
118. $tpl->compile_id,
119. $tpl->caching ? 9999 : 0,
120. $tpl->cache_lifetime,
121. array(),
33.
34. <?php
35. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_11662473366053a823b2c73_40848511', 'content');
36. ?>
37.
38. <!-- end /home/ploi/www.kitclope.fr/modules/pm_advancedpack/views/templates/front/1.7/pack.tpl --><?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, 'catalog/product.tpl');
39. }
40. /* {block 'page_title'} */
41. class Block_68990213066053a823b46e2_21673823 extends Smarty_Internal_Block
42. {
43. public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
118. if ($_template->startRenderCallbacks) {
119. foreach ($_template->startRenderCallbacks as $callback) {
120. call_user_func($callback, $_template);
121. }
122. }
123. $unifunc($_template);
124. foreach ($_template->endRenderCallbacks as $callback) {
125. call_user_func($callback, $_template);
126. }
127. $_template->isRenderingCache = false;
128. } catch (Exception $e) {
109. array_merge($_template->cached->file_dependency, $this->file_dependency);
110. }
111. if ($_template->source->handler->uncompiled) {
112. $_template->source->handler->renderUncompiled($_template->source, $_template);
113. } else {
114. $this->getRenderedTemplateCode($_template);
115. }
116. if ($_template->caching && $this->has_nocache_code) {
117. $_template->cached->hashes[ $this->nocache_hash ] = true;
118. }
119. if ($_template->smarty->debugging) {
211. $this->cached->render($this, $no_output_filter);
212. } else {
213. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
214. $this->loadCompiled(true);
215. }
216. $this->compiled->render($this);
217. }
218. // display or fetch
219. if ($display) {
220. if ($this->caching && $this->smarty->cache_modified_check) {
221. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
227. ob_start();
228. $template->_mergeVars();
229. if (!empty(Smarty::$global_tpl_vars)) {
230. $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars);
231. }
232. $result = $template->render(false, $function);
233. $template->_cleanUp();
234. if ($saveVars) {
235. $template->tpl_vars = $savedTplVars;
236. $template->config_vars = $savedConfigVars;
237. } else {
111. * @throws SmartyException
112. * @return string rendered template output
113. */
114. public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null)
115. {
116. $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0);
117. return $result === null ? ob_get_clean() : $result;
118. }
119.
120. /**
121. * displays a Smarty template
35. * {@inheritdoc}
36. */
37. public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false)
38. {
39. return "\n<!-- begin $template -->\n"
40. . parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter)
41. . "\n<!-- end $template -->\n";
42. }
43. }
722. if (is_array($content)) {
723. foreach ($content as $tpl) {
724. $html .= $this->context->smarty->fetch($tpl, null, $theme . $this->getLayout());
725. }
726. } else {
727. $html = $this->context->smarty->fetch($content, null, $theme . $this->getLayout());
728. }
729.
730. Hook::exec('actionOutputHTMLBefore', ['html' => &$html]);
731. echo trim($html);
732. }
704. 'javascript' => $this->getJavascript(),
705. 'js_custom_vars' => Media::getJsDef(),
706. 'notifications' => $this->prepareNotifications(),
707. ]);
708.
709. $this->smartyOutputContent($this->template);
710.
711. return true;
712. }
713.
714. protected function smartyOutputContent($content)
321. $this->{'displayAjax' . $action}();
322. } elseif (method_exists($this, 'displayAjax')) {
323. $this->displayAjax();
324. }
325. } else {
326. $this->display();
327. }
328. } else {
329. $this->initCursedPage();
330. $this->smartyOutputContent($this->layout);
331. }
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. }
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();