Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Getting a url for an order from the increment_ID
 
artrweek
Jr. Member
 
Total Posts:  1
Joined:  2013-05-13
 

So the increment_ID is diffrent from the order_ID, I am trying to send a message to my mobile when an order has been placed with the the order url.

Currently an order id would be as follows:
http://www.site.co.uk/index.php/sales/order/view/order_id/9/
this would be for an order with the increment 100000009

How can I get a url to an order when I only have access to the Increment_id?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
markoshust
Sr. Member
 
Avatar
Total Posts:  129
Joined:  2007-09-05
Cleveland, OH
 

You’ll probably have to override that viewAction or create a custom action to handle this, that adds on the appropriate filter.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

You can get the id by the increment id with (when you have the increment ID in the var $incrementId):

$orderId Mage::getModel('sales/order')->loadByIncrementId($incrementId)->getId();
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top