I am trying to order products by SKU but I got it wrong The order is on the Order page (Checkout) This is a snippet of my code
$this->_items->getSelect()->order('main_table.sku ASC');
$this->_items->getSelect()->group('main_table.item_id');
I am trying to order products having SKU : 4422; 00003001 and 00004335 but I am gotten them in this order :
4422
00003001
00004335
How can I solve this problem, don't hesitate if you need more details?
Thanks in advance!
main_table
.*,catalog_product_index_eav
.value
,eav_attribute_option
.*,eav_attribute
.attribute_code
,eav_attribute_option_value
.value
FROMsales_flat_quote_item
ASmain_table
LEFT JOINcatalog_product_index_eav
ON product_id=catalog_product_index_eav.entity_id LEFT JOINeav_attribute_option
ON catalog_product_index_eav.value=eav_attribute_option.option_id LEFT JOINeav_attribute
ON eav_attribute.attribute_id=catalog_product_index_eav.attribute_id LEFT JOIN `eav_attribute'... (length=761)