Jump to content

Updating stock_available reference too long error


mlizana

Recommended Posts

I wanted to duplicate my shop products and I made a script where I duplicate the ps_products table, and I get the new 'id_product' obtained to insert rows on related tables "ps_product_lang", "ps_product_shop" and "ps_stock_available".

 

Now when I try to buy one of this new products, prestashop gives me this error:

 

[PrestaShopDatabaseException]

Data too long for column 'reference' at row 2
 

UPDATE `ps_stock_available` SET `id_stock_available` = '500',`id_product` = '497',`id_product_attribute` = '0',`id_shop` = '1',`id_shop_group` = '0',`quantity` = '-59',`depends_on_stock` = '0',`out_of_stock` = '1' WHERE `id_stock_available` = 500

 

 

I don't understand why it says "column 'reference'" if it's updating the 'stock_available' table, that doesn't have this column...

 

The reference string of my products are like "2020C" and the copy is "2020C_R" (only adding the "_R"). I tried to delete the "_" character but it's the same.

 

If I update the table manually from the workbench, it doesn't works anyway.

 

Any ideas? Thanks

 

post-761253-0-67141800-1407311077_thumb.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...