Duplicate entry '0-5-2025-09-10 22:28:58' for key 'PRIMARY'INSERT INTO `ps_connections_page` (`id_connections`, `id_page`, `time_start`) VALUES ('0', '5', '2025-09-10 22:28:58')
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] INSERT INTO `ps_connections_page` (`id_connections`, `id_page`, `time_start`) VALUES ('0', '5', '2025-09-10 22:28:58')
575. {
576. if ($sql instanceof DbQuery)
577. $sql = $sql->build();
578.
579. $this->result = false;
580. $result = $this->query($sql);
581. if ($use_cache && $this->is_cache_enabled)
582. Cache::getInstance()->deleteQuery($sql);
583. return $result;
584. }
585.
Argument [0] INSERT INTO `ps_connections_page` (`id_connections`, `id_page`, `time_start`) VALUES ('0', '5', '2025-09-10 22:28:58')
366. $keys_stringified = implode(', ', $keys);
367. $values_stringified[] = '('.implode(', ', $values).')';
368. }
369.
370. $sql = $insert_keyword.' INTO `'.$table.'` ('.$keys_stringified.') VALUES '.implode(', ', $values_stringified);
371. return (bool)$this->q($sql, $use_cache);
372. }
373.
374. /**
375. * @param string $table Table name without prefix
376. * @param array $data Data to insert as associative array. If $data is a list of arrays, multiple insert will be done
Argument [0] INSERT INTO `ps_connections_page` (`id_connections`, `id_page`, `time_start`) VALUES ('0', '5', '2025-09-10 22:28:58') Argument [1] 1
92. $time_start = date('Y-m-d H:i:s');
93. Db::getInstance()->insert('connections_page', array(
94. 'id_connections' => (int)$cookie->id_connections,
95. 'id_page' => (int)$id_page,
96. 'time_start' => $time_start
97. ));
98.
99. // This array is serialized and used by the ajax request to identify the page
100. return array(
101. 'id_connections' => (int)$cookie->id_connections,
102. 'id_page' => (int)$id_page,
Argument [0] connections_page Argument [1] Array ( [id_connections] => 0 [id_page] => 5 [time_start] => 2025-09-10 22:28:58 )
128. </script>';
129. }
130. }
131.
132. // Record the guest path then increment the visit counter of the page
133. $tokenArray = Connection::setPageConnection($params['cookie']);
134. ConnectionsSource::logHttpReferer();
135. if (Configuration::get('PS_STATSDATA_PAGESVIEWS'))
136. Page::setPageViewed($tokenArray['id_page']);
137.
138. if (Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS'))
Argument [0] Cookie Object ( [_content:protected] => Array ( [date_add] => 2025-09-10 22:28:58 [id_lang] => 2 [id_currency] => 3 ) [_name:protected] => 3f99a2f33f7744ef0eca694ec6b1a644 [_expire:protected] => 1759267738 [_domain:protected] => www.sagatec.ma [_path:protected] => / [_cipherTool:protected] => Rijndael Object ( [_key:protected] => XFu9Eh2G7K04dsm1aPQBMdnu5icm4eJm [_iv:protected] => ƒ·S/Ék'„ù]¬‚† ) [_key:protected] => AKcBtJiIW1sEDHIMcdqvXBVOaNXG4s8TzfImd2m1XXisHrhtUrdkh4fs [_iv:protected] => BwKILHCy [_modified:protected] => 1 [_allow_writing:protected] => 1 )
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 ( [cookie] => Cookie Object ( [_content:protected] => Array ( [date_add] => 2025-09-10 22:28:58 [id_lang] => 2 [id_currency] => 3 ) [_name:protected] => 3f99a2f33f7744ef0eca694ec6b1a644 [_expire:protected] => 1759267738 [_domain:protected] => www.sagatec.ma [_path:protected] => / [_cipherTool:protected] => Rijndael Object ( [_key:protected] => XFu9Eh2G7K04dsm1aPQBMdnu5icm4eJm [_iv:protected] => ƒ·S/Ék'„ù]¬‚† ) [_key:protected] => AKcBtJiIW1sEDHIMcdqvXBVOaNXG4s8TzfImd2m1XXisHrhtUrdkh4fs [_iv:protected] => BwKILHCy [_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] => 3 [id_customer] => [id_guest] => 0 [id_lang] => 2 [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] => 1 [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] => 2 )
774. }
775.
776. public function initFooter()
777. {
778. $this->context->smarty->assign(array(
779. 'HOOK_FOOTER' => Hook::exec('displayFooter'),
780. 'conditions' => Configuration::get('PS_CONDITIONS'),
781. 'id_cgv' => Configuration::get('PS_CONDITIONS_CMS_ID'),
782. 'PS_SHOP_NAME' => Configuration::get('PS_SHOP_NAME'),
783. 'PS_ALLOW_MOBILE_DEVICE' => isset($_SERVER['HTTP_USER_AGENT']) && (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE') && @filemtime(_PS_THEME_MOBILE_DIR_)
784. ));
Argument [0] displayFooter
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();
172.
173. // default behavior for ajax process is to use $_POST[action] or $_GET[action]
174. // then using displayAjax[action]
175. if ($this->ajax)
176. {
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.