Im working on a solution for Magento 1 for the PDF Invoices. We want the invoices to show products sorted by stock_location. All of our locations starts with a letter lige A,B,C etc. And after that some numbers.
I want the invoices to show the products by the alphabet so when we find the products we start from A to Z, so you know from top to bottom. I just cant figure out how to solve this?
foreach ($invoice->getAllItems() as $item){
if ($item->getOrderItem()->getParentItem()) {
continue;
}
/* Draw item */
$this->_drawItem($item, $page, $order);
$page = end($pdf->pages);
}
Anyone else ever wanted this and maybe got a clue which way i should go? 🙂
- Thanks for your time.
2
Answers
Found a solution:
I dont know how can do that in Magento but i am sharing some idea that how can you do that in PHP try like this .hope it will help for you