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

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

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