Jump to content

get and display order_id


hellykun

Recommended Posts

Hello everyone,

 

I am using prestashop 1.6 and I would like to display the order_id in the order confirmation page.

I have tried many solutions but none of them worked for me.

 

I am using {php} tags in smarty because I want to do some other things also.

 

Can anyone help?

 

Thanks a lot in advance.

Link to comment
Share on other sites

Override OrderConfirmationController.php

class OrderConfirmationController extends OrderConfirmationControllerCore 
{
    public function initContent()
    {
	$this->context->smarty->assign('id_order', $this->id_order);
	perent::initContent();
    }
}

Then put following smarty var on your order-confirmation.tpl file

{$id_order}

Note:

By default, the smarty var id_order is available only for guest customer

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...