-
-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.sum(qty_ordered)-sum(qty_refunded)-sum(qty_canceled)' #3073
Comments
This issue is due to the latest release using zf1-future, which requires wrapping expressions like This could be fixed directly in the extension, but since it's not open-source I can't help with much. You can apply a fix similar to the one from #2864: $this->getSelect()
->columns([
- 'quantity' => 'COUNT(main_table.entity_id)',
+ 'quantity' => new Zend_Db_Expr('COUNT(main_table.entity_id)'),
'range' => $tzRangeOffsetExpression,
]) |
Thank you for your reply. After I dig and search into the Qty.php, I guess this script appear problem
I tried adding this script following your format and finding other information. It doesn't work. Would you mind helping me re-add the new Zend_Db_Expr function in this little script? Million thanks |
This patch should fix it: $select = $adapter->select()
->from(array('e' => $this->getTable('sales/order_item')), array(
'product_id',
- 'sum(qty_ordered)-sum(qty_refunded)-sum(qty_canceled) as qty_sold'
+ 'qty_sold' => new Zend_Db_Expr('sum(qty_ordered)-sum(qty_refunded)-sum(qty_canceled)')
))
->group('product_id'); |
it's OK now. Expert Mr. Elidrissidev. Thank you so so much! :) |
Preconditions (*)
1.19.5.0-rc1
2.
Steps to reproduce (*)
1.First of all, I'm not an expert, just an average user. Please help to solve the following problem. Thanks for your help.
Expected result (*)
Extended Product Grid with Editor" on Sale > Orders panel. In version 19.4.23 , it can use index management to re-index everything. However, Index Management > Qty Sold cannot reindex due to the change to 19.5.0-rc1 version.
Actual result (*)
The text was updated successfully, but these errors were encountered: