I have been trying figure out past 3 days but in vain, iam looking to send a reminder email to customers to reorder their previous purchase. Magento reorder function works with logged in customers with www.yourdomain.com/sales/order/reorder/{order_id}
which adds the items from their previous orders to their shopping cart. But if the customer is not signed in it redirects to a guest form. i want to load items from a previous order to their shopping cart even if they are not logged in. so when customer clicks a link, he is then redirected to the checkout/cart
page with all items from their previous order. i tried using the following code
<?php
include_once 'app/Mage.php';
Mage::app();
$orderId= '2986';
$quote = Mage::getModel('sales/order')->load($orderId);
$cart->init();
$cart = Mage::getModel('sales/quote')->load($quote);
$cart->save();
Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
$this->_redirect('checkout/cart');
?>