We have added an in-store pick up shipping method to our magento stores. We would like to display travel instructions to the store on the thank you page.

Any ideas on how I can go about displaying this information?


At your checkout/success.phtml you can do something like this:

$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
if ($order->getShippingMethod() == 'your_shipping_method_code') {
    // display travel instructions
  • Should this be for shipping method, not for payment method? – philwinkle Feb 26 '13 at 17:44
  • oh, sorry. misread. 1 sec. – user487772 Feb 26 '13 at 17:45
  • Wouldn't getLastOrderId produce inaccurate results on busy stores? Can't you just grab the quote/order singleton? – Ben Lessani - Sonassi Feb 26 '13 at 18:02
  • Never heard of it (doesn't mean that you are wrong). Magento is using getLastOrderId by themselves in Mage_Checkout_Block_Success. – user487772 Feb 26 '13 at 18:06
  • @sonassi: Funny thing is that neither getLastOrderId nor quote/order singleton are not working at checkout success page. Please see my updated answer for a solution. – user487772 Feb 26 '13 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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