Jump to content

Product lists alphabetically in orders


AlainR

Recommended Posts

Hi

I need to display the order detail by product name, in an alphabetically order.

I try to modify line 429 of /classes/ordrer/OrederDetail.php file as :

return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'order_detail` WHERE `id_order` = '.(int)$id_order.' ORDER BY product_name ASC');

But products don't display in alphabetically order.

Where do I need to change / add code?

 

Many thanks in advance and best regards.

 

Link to comment
Share on other sites

The product list in back office order details page seems from $order->getProducts();

And then it is sorted by ksort($products)

 

So you may need to look into above related methods if you want to make changes.

 

Thank you for that track.

Unfortunately, it does not change. I modified several ksort settings and I commented the line, but after clearing the cache I don't see any change in the products' list of an order :(

 

PS 1.6.1.5

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...