Incorrect key file for table '/var/tmp/#sql_246_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 >= 13
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 >= 13 AND c.nright <= 14 AND c.active = 1 AND pl.id_lang = 7 AND p.id_product IN (6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6560,6561,6562,6563,6564,6565,6566,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,6630,6631,6632,6633,6634,6635,6636,6637,6638,6639,6640,6641,6642,6643,6644,6645,6646,6647,6648,6649,6650,6651,6652,6653,6654,6655,6656,6657,6658,6659,6660,6661,6662,6663,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,6675,6676,6677,6678,6679,6680,6761,8717,13905,19277,19350,20733,20806,20807,23657,23664,23683,23702,23719,23723,23741,23919,23920,23921,23922,23923,23924,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23938) 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 >= 13 AND c.nright <= 14 AND c.active = 1 AND pl.id_lang = 7 AND p.id_product IN (6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6560,6561,6562,6563,6564,6565,6566,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,6630,6631,6632,6633,6634,6635,6636,6637,6638,6639,6640,6641,6642,6643,6644,6645,6646,6647,6648,6649,6650,6651,6652,6653,6654,6655,6656,6657,6658,6659,6660,6661,6662,6663,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,6675,6676,6677,6678,6679,6680,6761,8717,13905,19277,19350,20733,20806,20807,23657,23664,23683,23702,23719,23723,23741,23919,23920,23921,23922,23923,23924,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23938) 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 >= 13 AND c.nright <= 14 AND c.active = 1 AND pl.id_lang = 7 AND p.id_product IN (6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6560,6561,6562,6563,6564,6565,6566,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,6630,6631,6632,6633,6634,6635,6636,6637,6638,6639,6640,6641,6642,6643,6644,6645,6646,6647,6648,6649,6650,6651,6652,6653,6654,6655,6656,6657,6658,6659,6660,6661,6662,6663,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,6675,6676,6677,6678,6679,6680,6761,8717,13905,19277,19350,20733,20806,20807,23657,23664,23683,23702,23719,23723,23741,23919,23920,23921,23922,23923,23924,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23938) 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-04-26 23:14:17 [id_lang] => 7 [id_currency] => 1 ) [_name:protected] => ba0f167904639bd0df3ffc40aada7545 [_expire:protected] => 1715894057 [_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.