Jump to content
nekcfg

Проблема с добавлением товара в базу

Recommended Posts

Всем привет. Сам разобраться не могу прошу помощи.

При добавлении товара товар не отображается в списке товаров. В базе product id создаётся как 0. Не знаю как исправить.

При копировании (дублировании товара) ошибка
 

Notice: Undefined variable: insert in /var/www/nek/data/www/nekeneke/vqmod/vqcache/vq2-system_storage_modification_admin_model_catalog_product.php on line 150Warning: implode(): Invalid arguments passed in /var/www/nek/data/www/nekeneke/vqmod/vqcache/vq2-system_storage_modification_admin_model_catalog_product.php on line 150
Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1<br />Error No: 1064<br />INSERT INTO oc_moto_link_part (modif_id, part_id) VALUES in /var/www/nek/data/www/nekeneke/system/library/db/mysqli.php:40 Stack trace: #0 /var/www/nek/data/www/nekeneke/catalog/controller/extension/lightning/beta.php(16): DB\MySQLi->query('INSERT INTO oc_...') #1 /var/www/nek/data/www/nekeneke/catalog/controller/extension/lightning/beta.php(35): light_db->Whs('INSERT INTO oc_...') #2 /var/www/nek/data/www/nekeneke/system/storage/modification/system/library/db.php(18): light_db->query('INSERT INTO oc_...', Array) #3 /var/www/nek/data/www/nekeneke/vqmod/vqcache/vq2-system_storage_modification_admin_model_catalog_product.php(152): DB->query('INSERT INTO oc_...') #4 /var/www/nek/data/www/nekeneke/vqmod/vqcache/vq2-system_storage_modification_admin_model_catalog_product.php in /var/www/nek/data/www/nekeneke/system/library/db/mysqli.php on line 40

Спасибо!

Share this post


Link to post
Share on other sites
1 час назад, nekcfg сказал:

При добавлении товара товар не отображается в списке товаров. В базе product id создаётся как 0. Не знаю как исправить.

намудрили с нарастающим счетчиком

в бд выполните запрос

ALTER TABLE oc_product MODIFY COLUMN `product_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;

 

Share this post


Link to post
Share on other sites
3 минуты назад, AlexDW сказал:

намудрили с нарастающим счетчиком

в бд выполните запрос

ALTER TABLE oc_product MODIFY COLUMN `product_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;

 

Сделал. Теперь другая ошибка появляется

 

Спойлер

Notice: Undefined variable: insert in /var/www/nek/data/www/nekeneke/vqmod/vqcache/vq2-system_storage_modification_admin_model_catalog_product.php on line 150Warning: implode(): Invalid arguments passed in /var/www/nek/data/www/nekeneke/vqmod/vqcache/vq2-system_storage_modification_admin_model_catalog_product.php on line 150
Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1<br />Error No: 1064<br />INSERT INTO oc_moto_link_part (modif_id, part_id) VALUES in /var/www/nek/data/www/nekeneke/system/library/db/mysqli.php:40 Stack trace: #0 /var/www/nek/data/www/nekeneke/catalog/controller/extension/lightning/beta.php(16): DB\MySQLi->query('INSERT INTO oc_...') #1 /var/www/nek/data/www/nekeneke/catalog/controller/extension/lightning/beta.php(35): light_db->Whs('INSERT INTO oc_...') #2 /var/www/nek/data/www/nekeneke/system/storage/modification/system/library/db.php(18): light_db->query('INSERT INTO oc_...', Array) #3 /var/www/nek/data/www/nekeneke/vqmod/vqcache/vq2-system_storage_modification_admin_model_catalog_product.php(152): DB->query('INSERT INTO oc_...') #4 /var/www/nek/data/www/nekeneke/vqmod/vqcache/vq2-system_storage_modification_admin_model_catalog_product.php in /var/www/nek/data/www/nekeneke/system/library/db/mysqli.php on line 40

 

Share this post


Link to post
Share on other sites

Наймите исполнителя

Share this post


Link to post
Share on other sites
4 минуты назад, chukcha сказал:

Наймите исполнителя

Я готов!

Share this post


Link to post
Share on other sites

либо обратитесь за помощью к автору модуля, который использует нестандартный запрос в нестандартной таблице moto_link_part

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.