Magento create shipment with tracking number programmatically -


from specific order want create shipment of order , allot tracking number programmatically. please . thanks

the question knowledge sharing purpose .

one can understand points ref_link

// $order_id = order id $_order = mage::getmodel('sales/order')->load($order_id);  if($_order->canship()) {                $shipmentid = mage::getmodel('sales/order_shipment_api')->create($_order->getincrementid(), $itemsarray ,'your_comment' ,false,1);     echo $shipmentid;   // outputs shipment increment number     $trackmodel = mage::getmodel('sales/order_shipment_api')     ->addtrack($shipmentid,'your_shipping_carrier_code','your_shipping_carrier_title','carrier_tracking_number'); } 

$itemsarray = format explained here ref_link
thats !
simple code snippet .
hope helps .


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -