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

Order ID is not shown at exit side of order process
 
Lenny2
Sr. Member
 
Total Posts:  171
Joined:  2008-05-21
München
 

At the exit side of the order process the order id is not shown. Here the content of our ‘success.phtml’:

<div class="page-head">
    <
h3><?php echo $this->__('Your order has been received'?></h3>
</
div>
<
p><strong><?php echo $this->__('Thank you for your purchase!'?></strong></p>
<
p>
    
<?php echo $this->__('Your order # is: %s'$this->getOrderId()) ?>.<br/>
    
<?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.'?><br/>
</
p>
<
div class="button-set">
    <
button class="form-button" onclick="[removed]='<?php echo $this->getUrl() ?>'"><span><?php echo $this->__('Continue Shopping'?></span></button>
</
div>

Any ideas?

Image Attachments
exit_page_order_id_missing.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Lenny2
Sr. Member
 
Total Posts:  171
Joined:  2008-05-21
München
 

Does nobody has an idea why there is no order number shown???
Any help would be appreciated…
Thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

Try changing:

<?php echo $this->__('Your order # is: %s'$this->getOrderId()) ?>

to:

<?php echo $this->__('Your order # is: %s'Mage::getSingleton('checkout/session')->getLastRealOrderId()) ?>

I’m not sure what version you are using, but that may have something to do with it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lenny2
Sr. Member
 
Total Posts:  171
Joined:  2008-05-21
München
 

Thank you - now it’s working. I am wondering why there is such an error in the magento files available for download....
I am using Magento 1.0.19870.4.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

That is odd...I just checked the default template on the most recent release and it does use:

<?php echo $this->__('Your order # is: %s'$this->getOrderId()) ?>
I just tried a test order using the default template and it doesn’t output the order-id. We use the other method because we pass the order-id thru to various click-tracking, ad-tracking software on the checkout success page. Glad to here that it works for you, though.
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top