I am trying to sort products in correct order in Checkout cart ; while It is correct for different products but when the case for products having this form
'BrandName' ProductName 1,25 kg
I got flase order like this
'BrandName' ProductName 1,25 kg'BrandName' ProductName 10,0 kg'BrandName' ProductName 15,0 kg'BrandName' ProductName 2,5 kg
I want to correct the order like this
'BrandName' ProductName 1,25 kg
'BrandName' ProductName 2,5 kg
'BrandName' ProductName 10,0 kg
'BrandName' ProductName 15,0 kg
without affecting the order of The other products sorted Alphabetically. This is a snippet of code
$this->_items->getSelect()->where('catalog_product_index_eav.store_id=' . $storeId . ' AND catalog_product_index_eav.attribute_id=' . $attId); $this->_items->getSelect()->order('CONCAT(eav_attribute_option_value.value, main_table.name) ASC'); $this->_items->getSelect()->order('main_table.sku ASC'); $this->_items->getSelect()->group('main_table.item_id');
Don't hesitate if you need more details.
Thanks in advance,