- Posts: 2
- Thank you received: 0
How to include order details on the thank you page
I'm wondering if it's possible to display the details of the order on the thank you page. I'm implementing standard paypal payment checkout.
I found that the file to modify is in views/checkout/tmpl/after_end.php
Here is the code I added there:
$app =& JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
$orderClass = hikashop::get('class.order');
$order = $orderClass->loadFullOrder($order_id);
$orderNum = $order->order_number;
$app->enqueueMessage( '<br>Order id: '.$order_id.'<br>Order Number: '.$orderNum );
At this point both the order_id and Order numbers are blank. I'm thinking maybe since the checkout process is already finished, the order is empty? Can I load it from the database somehow?
Thanks for the help!
Please Log in or Create an account to join the conversation.
If you use a recent version of HikaShop, the order is already loaded in after_end.
You can do like that:
$app =& JFactory::getApplication();
$app->enqueueMessage( '<br/>Order id: '.$this->order->order_id.'<br/>Order Number: '.$this->order->order_number );
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
i Want to include order details for paypal pro method. the file it redirects once the payment successful is views/checkout/tmpl/end.php however i cant get order details on this page ? i,e $this->order not working. Please help
Please Log in or Create an account to join the conversation.
You can use the same code. However, before that code, you need to manually load the order data like that:
Please Log in or Create an account to join the conversation.
I think you have a really good notifcation e-mail sent to the customers.
However! Your thank you page is very boring! It just states a 'Thank you' message...
I have an idea.
Is there someway I can simply put everything you see in the creation/confirmation mail that is sent to the customers e-mail, also in the thank you page?
So basically just take the whole confirmation e-mail and copy it in to the thank you page.
I think it makes for a much more pleasant shopping experience if the customer also directly gets too see the same info as in the status e-mail, instead of just a thank you... Or is this too much too ask?
Best Regards and merry christmas!
Please Log in or Create an account to join the conversation.
You could simply redirect to the order details page of the order.
It's easy to add.
You can add such code in the file "after_end" via the menu Display>views:
Please Log in or Create an account to join the conversation.
* Oh, and I use guest-checkout. You have to "login" to see that page actually...
* I think optimal would be to redirect the user after 2-3 seconds to his last order page. But I use guest-checkout so I dont know if this would be possible...
Please Log in or Create an account to join the conversation.
The facebook/google conversion code tracker code won't work if people are redirected.
And if you have guest checkout, the order details page is indeed not available to them.
In such case, a different solution would be required where you would directly display the order details in the "after_end" view file.
But in that case, it will require complex custom code and you can't just copy/paste it from somewhere else.
In that case, I would recommend to contact a developer to help you with that.
Please Log in or Create an account to join the conversation.
In the meantime, can you help me with the code to just display some simple text, like this:
Your order (#ordernr) is now confirmed. An e-mail has been sent to your adress (#customermail) with additional information.
Please Log in or Create an account to join the conversation.
There is already the corresponding information to get the order number in the first reply made Nicolas in that thread.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
A) When the mouse click on end_file link in the column of name File ... All the link goes JOOMLA/Administrator/index.php?option=com_hikashop&ctrl=view&task=edit&id=0|beez3|component|com_hikashop|checkout|after_end%2Ephp and only the template name in red change beetween item .
What does it mean in joomla word refer to this doc ? Do we override the hikashop component layout for specific template ?
Attachment not found
B ) after click on the first item , I can edit the code .
cms3 API link in code give
<?php
$app = JFactory:: getApplication ();
$app-> redirect (hikashop_completeLink('order&task=show',false,true));
?>
where is documented the "method ?" hikashop_completeLink ?
i think it is like angular redirect but for php
C) the code above can be replace by the new code
C) Save this php file ll create a new file ( implicit) for the template
Attachment not found
D) and the Joomla back end show that we override the file content
Attachment not found
Regard's
Please Log in or Create an account to join the conversation.
- Posts: 34
- Thank you received: 0
Please Log in or Create an account to join the conversation.
No. The order details page is only available while logged in so no.
Please Log in or Create an account to join the conversation.
- Posts: 34
- Thank you received: 0
Please Log in or Create an account to join the conversation.
You can try to use such code to load the data from the order placed by the customer:
www.hikashop.com/forum/4-how-to/32253-ho...you-page.html#152951
Please Log in or Create an account to join the conversation.