title: how do i combine items from orders for shipping in magento?
body: <p>i'm looking at putting multiple items from different orders into the same shipping box.  ideally when i go to ship an order, on the items section for that order all open items for that customer would show up.  i have isolated the code that generates the items to:</p>
  
  <p>app/design/adminhtml/default/mytemplate/template/sales/order/shipment/create/items.phtml</p>
  
  <p>and the line of code in that file to:</p>
  
  <p>$_items = $this->getShipment()->getAllItems();  </p>
  
  <p>in the function getAllItems i have added the following code:</p>
  
  <pre><code>$cust_orders = Mage::getModel('sales/order')-&gt;getCollection()
      -&gt;addAttributeToSelect('*')
      -&gt;addAttributeToSelect('entity_id')
      -&gt;addFieldToFilter('customer_id',$this-&gt;getCustomerId());
  
  foreach ($cust_orders as $order) {
      $order_id = $order-&gt;getEntityId();
      $cust_items = Mage::getModel('sales/order_item')
          -&gt;getCollection()
          -&gt;addAttributeToSelect('*')
          -&gt;addFieldToFilter('order_id', $order_id);
      foreach ($cust_items as $cust_item) {
          { help! }
      }
  </code></pre>
  
  <p>i need some help at the help! part.  i'm trying to get the new array ($cust_items) into the array $items properly.  but i can not seem to figure that part out...  its seems that object is getting populated using the getItemsCollection function; something i am doing has gone adrift....</p>
  
  <p>let me know if you have any new ideas. thanks.</p>