News:

Looking for documentation? Take a look on our wiki

Main Menu

Error when adding product

Started by migueljfaria, May 27, 2013, 18:22:30 PM

Previous topic - Next topic

migueljfaria

Hi!

I am having problems when adding new products on virtuemart. I first imported around 9000 products onto virtuemart and everything seemed to work fine. After that, when I try to add a product it works the first time, then when I add a second product it give me this error:

vmError: VmTableData::store failed - Duplicate entry '0' for key 'PRIMARY' SQL=INSERT INTO `jos_virtuemart_products_en_gb` ( `virtuemart_product_id`,`product_name`,`product_s_desc`,`product_desc`,`metadesc`,`metakey`,`customtitle`,`slug` ) VALUES ( '0','test 2','','','','','','test-2' )
vmError: Product store TableProducts::store failed - Duplicate entry '4294967295' for key 'PRIMARY' SQL=INSERT INTO `jos_virtuemart_products` ( `virtuemart_product_id`,`virtuemart_vendor_id`,`product_parent_id`,`product_sku`,`product_weight`,`product_weight_uom`,`product_length`,`product_width`,`product_height`,`product_lwh_uom`,`product_url`,`product_in_stock`,`product_ordered`,`low_stock_notification`,`product_available_date`,`product_availability`,`product_special`,`product_sales`,`product_unit`,`product_packaging`,`product_params`,`intnotes`,`metarobot`,`metaauthor`,`layout`,`published`,`created_on`,`created_by`,`modified_on`,`modified_by` ) VALUES ( '0','1','0','test 2','0','KG','0','0','0','M','','0','0','0','2013-05-27','','0','0','KG','','min_order_level=\"\"|max_order_level=\"\"|step_order_level=\"\"|product_box=\"\"|','','','','0','1','2013-05-27 16:06:47','62','2013-05-27 16:06:47','62' )
vmError: You are not an administrator or the correct vendor, storing of product cancelled

I went to the database and noticed that virtuemart assigned the following product ID to the first product: 4294967295 and then when I added the second product it tried to assign the exact same number(but because its supposed to be a unique code it gives an error)

Is there any way of solving this problem?I don't understand why virtuemart assigns the same unique product ID everytime I add a new product..(and why it assigns the number 4294967295)

Thanks in advance,

Miguel

liquid.ideas

This new product, did you add it via your database or via vm backend? duplicate entry 0 is very common if you are importing from your phpmyadmin, especially if you do not give individual values phpmyadmin automatically adds those values incrementally. also something else to watch out for is skipping the first row of your import if it contains headers.

G'luck :)

migueljfaria

Thanks for your reply.

I tried to add new products through the VM backend. The others that I imported were on an excel list. Is there any solution for this?

Miguel