1

What is ordering logic when you add a product from admin. Sales -> Order -> Create New order -> Choose Customer -> Add Products

If you search by product ID and choose product and after you search for another product and choose. Press "Add selected products to Order".

The ordering of the products is not in order as I added. The order is by IDs. So the smallest is first and biggest last. If we can change it by time the tick box is clicked.

i think the code is in this file

app/design/adminhtml/default/default/template/sales/items/column/name.phtml

Does somebody know where to change the logic?

The only working solution is when you search for product and press "Add selected products to Order". after you search for another product again and press "Add selected products to Order". Then the order is fine.

I know its strange question. but one my client wants this. I dont know how to google it at all and where to dig.

1 Answer 1

1

The order of the items should be by quote item id, which explain why it is correct when you add them one by one.

Assuming that you are adding simple product without any option. When you select multiple items and then submit/add to cart it is still order by quote item id but now the order in which they were post to the server determine the order of the quote item id. During my limited test, the post order seem to be by product_id (lowest first)

2
  • i understand. but what is the solution to order by item added and not by quote item id
    – Webjuice
    Commented Jul 1, 2015 at 14:59
  • None... you would have to (1) rewrite the javascript and implement your own custom logic to post the item to the server in the order they were click on or (2) keep track of the order they were add in and then modify the post order using php/magento observer Commented Jul 1, 2015 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.