When I try to delete a product in Magento I get the next error and I don't know where is the problem.
SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range
To remove product from all categories in bulk in Magento 2: 1. Go to Catalog > Products and check the products you want to remove all categories for.
The fastest way to do it is to run this query directly. DELETE FROM `catalog_product_entity` WHERE `sku` IN ('SKU1', 'SKU2', ...., 'SKU1000');
I managed to make it work editing the file app/code/core/Mage/Sales/Model/Resource/Quote.php at row 221:
'items_count' => new Zend_Db_Expr("CASE WHEN q.items_count>0 THEN " . $adapter->quoteIdentifier('q.items_count') . ' - 1 ELSE 0 END')
basically I added the case when statement to prevent it subtracting 1 when the value already is 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With