1

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?

1 Answer 1

3

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
}
6
  • Should this be for shipping method, not for payment method?
    – philwinkle
    Commented Feb 26, 2013 at 17:44
  • oh, sorry. misread. 1 sec. Commented Feb 26, 2013 at 17:45
  • Wouldn't getLastOrderId produce inaccurate results on busy stores? Can't you just grab the quote/order singleton? Commented Feb 26, 2013 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. Commented Feb 26, 2013 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. Commented Feb 26, 2013 at 19:23

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.