Jump to content
Demidus

При добавлении товара вылетает ошибка

Recommended Posts

Здраствуйте! при добавлении товара в каталог в админ панели вылетает ошибка

Fatal error: Uncaught exception 'Exception' with message 'Error: Duplicate entry '0' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO `oc_product_advertise_google` (`product_id`, `store_id`, `google_product_category`) SELECT p.product_id, p2s.store_id, (SELECT c2gpc.google_product_category FROM `oc_product_to_category` p2c LEFT JOIN `oc_category_path` cp ON (p2c.category_id = cp.category_id) LEFT JOIN `oc_category_to_google_product_category` c2gpc ON (c2gpc.category_id = cp.path_id AND c2gpc.store_id = 0) WHERE p2c.product_id = p.product_id AND c2gpc.google_product_category IS NOT NULL ORDER BY cp.level DESC LIMIT 0,1) as `google_product_category` FROM `oc_product` p LEFT JOIN `oc_product_to_store` p2s ON (p2s.product_id = p.product_id AND p2s.store_id = 0) LEFT JOIN `oc_product_advertise_google` pag ON (pag.product_id = p.product_id AND pag.store_id=p2s.store_id) WHERE pag.product_id IS NULL AND p2s.store_id IS NOT NULL AND p.product_id IN (69)' in /home/user2068253/www/turbotools.by/system/library/db/mysqli.php:40 in/home/user2068253/www/turbotools.by/system/library/db/mysqli.phpon line40

При этом товар все таки добавляется.

Ответ хостера следующий:

"Указанная Вами ошибка означает, что при добавлении товара дублируются данные в используемую базу данных сайта.
Для решения Вашего вопроса, пожалуйста, обратитесь к разработчику сайта."

Подскажите пожалуйста, как решить проблему?

 

Edited by Demidus

Share this post


Link to post
Share on other sites

наверно, у вас счётчик записей "битый" в таблице. Надо лезть в БД и исправлять руками

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.