Incorrect key file for table '/var/tmp/#sql_64fb_0.MYI'; try to repair it
SELECT
p.*,
product_shop.*,
product_shop.id_category_default,
pl.*,
i.id_image,
il.legend,
m.name manufacturer_name,
DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), INTERVAL 20 DAY)) > 0 AS new
FROM `eh_category_product` cp
LEFT JOIN eh_category c ON (c.id_category = cp.id_category)
LEFT JOIN `eh_product` p ON p.`id_product` = cp.`id_product`
INNER JOIN eh_product_shop product_shop
ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1)
LEFT JOIN eh_product_lang pl ON (pl.id_product = p.id_product)
LEFT JOIN eh_image i ON (i.id_product = p.id_product AND i.cover = 1)
LEFT JOIN eh_image_lang il ON (i.id_image = il.id_image AND il.id_lang = 7)
LEFT JOIN eh_manufacturer m ON (m.id_manufacturer = p.id_manufacturer)
WHERE product_shop.`active` = 1 AND
c.nleft >= 27
AND c.nright
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
Argument [0] SELECT p.*, product_shop.*, product_shop.id_category_default, pl.*, i.id_image, il.legend, m.name manufacturer_name, DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), INTERVAL 20 DAY)) > 0 AS new FROM `eh_category_product` cp LEFT JOIN eh_category c ON (c.id_category = cp.id_category) LEFT JOIN `eh_product` p ON p.`id_product` = cp.`id_product` INNER JOIN eh_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN eh_product_lang pl ON (pl.id_product = p.id_product) LEFT JOIN eh_image i ON (i.id_product = p.id_product AND i.cover = 1) LEFT JOIN eh_image_lang il ON (i.id_image = il.id_image AND il.id_lang = 7) LEFT JOIN eh_manufacturer m ON (m.id_manufacturer = p.id_manufacturer) WHERE product_shop.`active` = 1 AND c.nleft >= 27 AND c.nright <= 36 AND c.active = 1 AND pl.id_lang = 7 AND p.id_product IN (6387,6388,6389,6390,6391,6392,6393,6394,6395,6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,6412,6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443,6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6535,6536,6537,6538,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,9327,9328,9329,9330,9331,9333,9334,9335,9337,9338,9341,9343,9344,9345,9346,9347,14760,14769,14789,14819,14820,14845,14869,16887,17014,17169,19877,19878,19879,20732,20741,20744,20795,20797,20798,20827,20915,20924,20927,20928,20967,21061,21100,21103,21184,22697,23093,23556) GROUP BY p.id_product ORDER BY cp.position asc LIMIT 100,50
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)
Argument [0] SELECT p.*, product_shop.*, product_shop.id_category_default, pl.*, i.id_image, il.legend, m.name manufacturer_name, DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), INTERVAL 20 DAY)) > 0 AS new FROM `eh_category_product` cp LEFT JOIN eh_category c ON (c.id_category = cp.id_category) LEFT JOIN `eh_product` p ON p.`id_product` = cp.`id_product` INNER JOIN eh_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN eh_product_lang pl ON (pl.id_product = p.id_product) LEFT JOIN eh_image i ON (i.id_product = p.id_product AND i.cover = 1) LEFT JOIN eh_image_lang il ON (i.id_image = il.id_image AND il.id_lang = 7) LEFT JOIN eh_manufacturer m ON (m.id_manufacturer = p.id_manufacturer) WHERE product_shop.`active` = 1 AND c.nleft >= 27 AND c.nright <= 36 AND c.active = 1 AND pl.id_lang = 7 AND p.id_product IN (6387,6388,6389,6390,6391,6392,6393,6394,6395,6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,6412,6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443,6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6535,6536,6537,6538,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,9327,9328,9329,9330,9331,9333,9334,9335,9337,9338,9341,9343,9344,9345,9346,9347,14760,14769,14789,14819,14820,14845,14869,16887,17014,17169,19877,19878,19879,20732,20741,20744,20795,20797,20798,20827,20915,20924,20927,20928,20967,21061,21100,21103,21184,22697,23093,23556) GROUP BY p.id_product ORDER BY cp.position asc LIMIT 100,50
2533. AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).'
2534. AND c.active = 1
2535. AND pl.id_lang = '.(int)$cookie->id_lang.'
2536. AND p.id_product IN ('.implode(',', $product_id_list).')'
2537. .' GROUP BY p.id_product ORDER BY '.Tools::getProductsOrder('by', Tools::getValue('orderby'), true).' '.Tools::getProductsOrder('way', Tools::getValue('orderway')).
2538. ' LIMIT '.(((int)$this->page - 1) * $n.','.$n));
2539. }
2540.
2541. if (Tools::getProductsOrder('by', Tools::getValue('orderby'), true) == 'p.price')
2542. Tools::orderbyPrice($this->products, Tools::getProductsOrder('way', Tools::getValue('orderway')));
2543.
Argument [0] SELECT p.*, product_shop.*, product_shop.id_category_default, pl.*, i.id_image, il.legend, m.name manufacturer_name, DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), INTERVAL 20 DAY)) > 0 AS new FROM `eh_category_product` cp LEFT JOIN eh_category c ON (c.id_category = cp.id_category) LEFT JOIN `eh_product` p ON p.`id_product` = cp.`id_product` INNER JOIN eh_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN eh_product_lang pl ON (pl.id_product = p.id_product) LEFT JOIN eh_image i ON (i.id_product = p.id_product AND i.cover = 1) LEFT JOIN eh_image_lang il ON (i.id_image = il.id_image AND il.id_lang = 7) LEFT JOIN eh_manufacturer m ON (m.id_manufacturer = p.id_manufacturer) WHERE product_shop.`active` = 1 AND c.nleft >= 27 AND c.nright <= 36 AND c.active = 1 AND pl.id_lang = 7 AND p.id_product IN (6387,6388,6389,6390,6391,6392,6393,6394,6395,6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,6412,6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443,6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6535,6536,6537,6538,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,9327,9328,9329,9330,9331,9333,9334,9335,9337,9338,9341,9343,9344,9345,9346,9347,14760,14769,14789,14819,14820,14845,14869,16887,17014,17169,19877,19878,19879,20732,20741,20744,20795,20797,20798,20827,20915,20924,20927,20928,20967,21061,21100,21103,21184,22697,23093,23556) GROUP BY p.id_product ORDER BY cp.position asc LIMIT 100,50
3907.
3908. public function getProducts($selected_filters, &$products, &$nb_products, &$p, &$n, &$pages_nb, &$start, &$stop, &$range)
3909. {
3910. global $cookie;
3911.
3912. $products = $this->getProductByFilters($selected_filters);
3913. $products = Product::getProductsProperties((int)$cookie->id_lang, $products);
3914.
3915. $nb_products = $this->nbr_products;
3916. $range = 2; /* how many pages around page selected */
3917.
Argument [0] Array ( [category] => Array ( ) )
491. if (is_array($filter_block['title_values']))
492. foreach ($filter_block['title_values'] as $key => $val)
493. $title .= ' – '.$key.' '.implode('/', $val);
494.
495. $smarty->assign('categoryNameComplement', $title);
496. $this->getProducts($selected_filters, $params['catProducts'], $params['nbProducts'], $p, $n, $pages_nb, $start, $stop, $range);
497. // Need a nofollow on the pagination links?
498. $smarty->assign('no_follow', $filter_block['no_follow']);
499. }
500.
501. public function hookAfterSaveProduct($params)
Argument [0] Array ( [category] => Array ( ) ) Argument [1] Array ( ) Argument [2] Argument [3] Argument [4] Argument [5] Argument [6] Argument [7] Argument [8]
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']);
Argument [0] Array ( [nbProducts] => [catProducts] => Array ( ) [hookExecuted] => 1 [cookie] => Cookie Object ( [_content:protected] => Array ( [date_add] => 2024-05-05 15:02:48 [id_lang] => 7 [id_currency] => 1 ) [_name:protected] => ba0f167904639bd0df3ffc40aada7545 [_expire:protected] => 1716642168 [_domain:protected] => b2b.happypets.sk [_path:protected] => / [_cipherTool:protected] => Rijndael Object ( [_key:protected] => 5mnNYEony5k5jWYpfa21SFLFuVzdCXvE [_iv:protected] => ©&µüóÒÅídÊ ^¡U ) [_key:protected] => SoejH9LMG34kOKywJsviRNPQTaTDpDF9gcMPb4xr642auJ3mzWChQYWZ [_iv:protected] => dHfw87m5 [_modified:protected] => 1 [_allow_writing:protected] => 1 ) [cart] => Cart Object ( [id] => [id_shop_group] => 1 [id_shop] => 1 [id_address_delivery] => 0 [id_address_invoice] => 0 [id_currency] => 1 [id_customer] => [id_guest] => 0 [id_lang] => 7 [recyclable] => 1 [gift] => 0 [gift_message] => [date_add] => [secure_key] => [id_carrier] => 0 [date_upd] => [checkedTos] => [pictures] => [textFields] => [delivery_option] => [allow_seperated_package] => [_products:protected] => [_taxCalculationMethod:protected] => 0 [webserviceParameters:protected] => Array ( [fields] => Array ( [id_address_delivery] => Array ( [xlink_resource] => addresses ) [id_address_invoice] => Array ( [xlink_resource] => addresses ) [id_currency] => Array ( [xlink_resource] => currencies ) [id_customer] => Array ( [xlink_resource] => customers ) [id_guest] => Array ( [xlink_resource] => guests ) [id_lang] => Array ( [xlink_resource] => languages ) ) [associations] => Array ( [cart_rows] => Array ( [resource] => cart_row [virtual_entity] => 1 [fields] => Array ( [id_product] => Array ( [required] => 1 [xlink_resource] => products ) [id_product_attribute] => Array ( [required] => 1 [xlink_resource] => combinations ) [quantity] => Array ( [required] => 1 ) ) ) ) ) [id_shop_list] => [get_shop_from_context:protected] => 1 [table:protected] => cart [identifier:protected] => id_cart [fieldsRequired:protected] => Array ( [0] => id_currency [1] => id_lang ) [fieldsSize:protected] => Array ( [secure_key] => 32 ) [fieldsValidate:protected] => Array ( [id_shop_group] => isUnsignedId [id_shop] => isUnsignedId [id_address_delivery] => isUnsignedId [id_address_invoice] => isUnsignedId [id_carrier] => isUnsignedId [id_currency] => isUnsignedId [id_customer] => isUnsignedId [id_guest] => isUnsignedId [id_lang] => isUnsignedId [recyclable] => isBool [gift] => isBool [gift_message] => isMessage [allow_seperated_package] => isBool [date_add] => isDateFormat [date_upd] => isDateFormat ) [fieldsRequiredLang:protected] => Array ( ) [fieldsSizeLang:protected] => Array ( ) [fieldsValidateLang:protected] => Array ( ) [tables:protected] => Array ( ) [image_dir:protected] => [image_format:protected] => jpg [def:protected] => Array ( [table] => cart [primary] => id_cart [fields] => Array ( [id_shop_group] => Array ( [type] => 1 [validate] => isUnsignedId ) [id_shop] => Array ( [type] => 1 [validate] => isUnsignedId ) [id_address_delivery] => Array ( [type] => 1 [validate] => isUnsignedId ) [id_address_invoice] => Array ( [type] => 1 [validate] => isUnsignedId ) [id_carrier] => Array ( [type] => 1 [validate] => isUnsignedId ) [id_currency] => Array ( [type] => 1 [validate] => isUnsignedId [required] => 1 ) [id_customer] => Array ( [type] => 1 [validate] => isUnsignedId ) [id_guest] => Array ( [type] => 1 [validate] => isUnsignedId ) [id_lang] => Array ( [type] => 1 [validate] => isUnsignedId [required] => 1 ) [recyclable] => Array ( [type] => 2 [validate] => isBool ) [gift] => Array ( [type] => 2 [validate] => isBool ) [gift_message] => Array ( [type] => 3 [validate] => isMessage ) [delivery_option] => Array ( [type] => 3 ) [secure_key] => Array ( [type] => 3 [size] => 32 ) [allow_seperated_package] => Array ( [type] => 2 [validate] => isBool ) [date_add] => Array ( [type] => 5 [validate] => isDateFormat ) [date_upd] => Array ( [type] => 5 [validate] => isDateFormat ) ) [classname] => Cart ) [update_fields:protected] => ) [altern] => 1 )
179. $hookExecuted = false;
180. Hook::exec('actionProductListOverride', array(
181. 'nbProducts' => &$this->nbProducts,
182. 'catProducts' => &$this->cat_products,
183. 'hookExecuted' => &$hookExecuted,
184. ));
185.
186. // The hook was not executed, standard working
187. if (!$hookExecuted)
188. {
189. $this->context->smarty->assign('categoryNameComplement', '');
Argument [0] actionProductListOverride Argument [1] Array ( [nbProducts] => [catProducts] => Array ( ) [hookExecuted] => 1 )
107. $this->productSort(); // Product sort must be called before assignProductList()
108.
109. $this->assignScenes();
110. $this->assignSubcategories();
111. if ($this->category->id != 1)
112. $this->assignProductList();
113.
114. $this->context->smarty->assign(array(
115. 'category' => $this->category,
116. 'products' => (isset($this->cat_products) && $this->cat_products) ? $this->cat_products : null,
117. 'id_category' => (int)$this->category->id,
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. }
22. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23. * International Registered Trademark & Property of PrestaShop SA
24. */
25.
26. require(dirname(__FILE__).'/config/config.inc.php');
27. Dispatcher::getInstance()->dispatch();
28.