Can't create/write to file '/tmp/#sql-temptable-17341-61b153-22923.MAI' (Errcode: 28 "No space left on device")SELECT p.id_product, pl.`link_rewrite`, pl.`name`, pl.`description_short`, image_shop.`id_image`, il.`legend`,
ps.`quantity` AS sales, p.`ean13`, p.`upc`, cl.`link_rewrite` AS category
FROM `ps_product_sale` ps
LEFT JOIN `ps_product` p ON ps.`id_product` = p.`id_product`
INNER JOIN ps_product_shop product_shop
ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1)
LEFT JOIN `ps_product_lang` pl
ON p.`id_product` = pl.`id_product`
AND pl.`id_lang` = 1 AND pl.id_shop = 1
LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN ps_image_shop image_shop
ON (image_shop.id_image = i.id_image AND image_shop.id_shop = 1 AND image_shop.cover=1)
LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = 1)
LEFT JOIN `ps_category_lang` cl
ON cl.`id_category` = product_shop.`id_category_default`
AND cl.`id_lang` = 1 AND cl.id_shop = 1
WHERE product_shop.`active` = 1
AND p.`id_product` IN (
SELECT cp.`id_product`
FROM `ps_category_group` cg
LEFT JOIN `ps_category_product` cp ON (cp.`id_category` = cg.`id_category`)
WHERE cg.`id_group` = 1
)
AND ((image_shop.id_image IS NOT NULL OR i.id_image IS NULL) OR (image_shop.id_image IS NULL AND i.cover=1))
ORDER BY sales DESC
LIMIT 0, 5
at line 605 in file classes/db/Db.php
599. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
600. }
601. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
602. {
603. if ($sql)
604. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
605. throw new PrestaShopDatabaseException($this->getMsgError());
606. }
607. }
608.
609. /**
301. if ($sql instanceof DbQuery)
302. $sql = $sql->build();
303.
304. $this->result = $this->_query($sql);
305. if (_PS_DEBUG_SQL_)
306. $this->displayError($sql);
307. return $this->result;
308. }
309.
310. /**
311. * Execute an INSERT query
476. {
477. $this->last_cached = true;
478. return $result;
479. }
480.
481. $this->result = $this->query($sql);
482. if (!$this->result)
483. return false;
484.
485. $this->last_cached = false;
486. if (!$array)
156. WHERE cg.`id_group` '.$sql_groups.'
157. )
158. AND ((image_shop.id_image IS NOT NULL OR i.id_image IS NULL) OR (image_shop.id_image IS NULL AND i.cover=1))
159. ORDER BY sales DESC
160. LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products;
161. if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql))
162. return false;
163.
164. foreach ($result as &$row)
165. {
166. $row['link'] = $context->link->getProductLink($row['id_product'], $row['link_rewrite'], $row['category'], $row['ean13']);
102. if (Product::getTaxCalculationMethod((int)$this->context->customer->id) == PS_TAX_EXC)
103. $usetax = false;
104. else
105. $usetax = true;
106.
107. $bestsellers = ProductSale::getBestSalesLight((int)($params['cookie']->id_lang), 0, 5);
108.
109. if (!$bestsellers && !Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY'))
110. return;
111. $best_sellers = array();
112.
125. return $this->display(__FILE__, 'blockbestsellers.tpl');
126. }
127.
128. public function hookLeftColumn($params)
129. {
130. return $this->hookRightColumn($params);
131. }
132.
133. public function hookHeader($params)
134. {
135. if (Configuration::get('PS_CATALOG_MODE'))
413.
414. // Call hook method
415. if ($hook_callable)
416. $display = $moduleInstance->{'hook'.$hook_name}($hook_args);
417. else if ($hook_retro_callable)
418. $display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args);
419. // Live edit
420. if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
421. {
422. $live_edit = true;
423. $output .= self::wrapLiveEdit($display, $moduleInstance, $array['id_hook']);
437. if (!isset($this->context->cart))
438. $this->context->cart = new Cart();
439. $this->context->smarty->assign(array(
440. 'HOOK_HEADER' => Hook::exec('displayHeader'),
441. 'HOOK_TOP' => Hook::exec('displayTop'),
442. 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
443. 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
444. ));
445. }
446. else
447. {
73. * Assign template vars related to page content
74. * @see FrontController::initContent()
75. */
76. public function initContent()
77. {
78. parent::initContent();
79.
80. $this->context->smarty->assign('genders', Gender::getGenders());
81.
82. $this->assignDate();
83.
161.
162. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
163. $this->initHeader();
164.
165. if ($this->viewAccess())
166. $this->initContent();
167. else
168. $this->errors[] = Tools::displayError('Access denied.');
169.
170. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))
171. $this->initFooter();
342. // Execute hook dispatcher
343. if (isset($params_hook_action_dispatcher))
344. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
345.
346. // Running controller
347. $controller->run();
348. }
349. catch (PrestaShopException $e)
350. {
351. $e->displayMessage();
352. }
32. */
33.
34.
35.
36. require(dirname(__FILE__).'/config/config.inc.php');
37. Dispatcher::getInstance()->dispatch();
38.