简体   繁体   English

无法在 prestashop BO 中更新库存数量

[英]Can't update stock quantity in prestashop BO

My shop (Prestashop 1.6) is having issues with setting the quantity available for new products.我的商店 (Prestashop 1.6) 在设置新产品的可用数量时遇到问题。 Since I moved my site hosting, when I create a new product, I can't set a quantity value.由于我移动了我的网站托管,当我创建一个新产品时,我无法设置数量值。 Each time I put a number and save, the input goes back to 0... This happen for all the new products I add whether it is a simple product or one with combinations.每次我输入一个数字并保存时,输入都会变回 0...无论是简单产品还是组合产品,我添加的所有新产品都会发生这种情况。 On existing product there is no problem.在现有产品上没有问题。 I am using the default stock management system.我正在使用默认的库存管理系统。

While searching for where this could come from, I noticed that on the db table ps_stock_available , new rows are not properly created for newly added products.在寻找这可能来自哪里时,我注意到在 db 表ps_stock_available ,没有为新添加的产品正确创建新行。 Each time a new product is added, a row is created with the correct product id and quantity set to 0 (which is normal at this point) but the column id_stock_available is set to 0… In the BO, when changing the quantity of this product, nothing is saved in the db and the input goes back to 0. If I decide to create another new product, the row of this product is created with the new product id and id_stock_available still set to 0 but the row of the previously created product disappears.每次添加新产品时,都会创建一行,将正确的产品 id 和数量设置为 0(此时是正常的),但列id_stock_available设置为 0……在 BO 中,更改此产品的数量时, db 中没有保存任何内容并且输入返回到 0。如果我决定创建另一个新产品,则使用新产品 id 创建该产品的行,并且id_stock_available仍设置为 0,但先前创建的产品的行消失。 I think it is deleted because it has the same id 0 for id_stock_available than the product created after.我认为它被删除是因为它的id_stock_available与之后创建的产品具有相同的 id 0。

I have been searching for how to fix this but nothing works :/我一直在寻找如何解决这个问题,但没有任何效果:/

Does anyone had a similar problem or knows how to fix this one ?有没有人有类似的问题或知道如何解决这个问题? Thanks for the help!谢谢您的帮助!

Cheers,干杯,

I finally understood where this was coming from!我终于明白这是从哪里来的了! The column id_stock_available wasn't set on AUTO_INCREMENT ... I don't know why this was not the case but after updating the table, everything started working fine again!id_stock_available未在AUTO_INCREMENT设置......我不知道为什么不是这种情况,但更新表后,一切又开始正常工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM