In want to add an unique link in the transactional email template, that confirms the order and sets the Status from On Hold to Pending. To make the link unique I am using the order id. Is there a way to parse the orderid via php, like


or should it look like here:


Is there a way to generate these confirmational links?

1 Answer 1


I think if you are just emailing those links out, you can just build the URL manually, following the structure outlined in this answer: https://stackoverflow.com/a/19214765/6727815

I believe you should be able to generate the order's increment ID from within an email template.

Then to update the order status, you might have something that looks like this:

//Requested URL: example.com/modulename/order/confirmation/100002205
class Namespace_ModuleName_OrderController
    public function confirmationAction()
        $param = $this->getRequest()->getParam('orderID');
        $order = Mage::getModel('sales/order')->loadByIncrementId($param);
        $order->setData('status', Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.