I am trying to save Free Shipping method with the order save by the following way:
$checkout = Mage::getSingleton('checkout/type_onepage');
$checkout->initCheckout();
$checkout->saveCheckoutMethod('register');
$checkout->saveShippingMethod('freeshipping_freeshipping');
$checkout->savePayment(array('method'=>'checkmo'));
try {
$checkout->saveOrder();
}
catch (Exception $ex) {
echo $ex->getMessage();
}
but the shipping method is not getting saved. It's showing
No shipping information available
Even though the payment method is saved properly but the Shipping Method is not. What am I missing here ?