- Posts: 217
- Thank you received: 1
Customise thank you page based upon items sold
14 years 7 months ago #38915
by Mat
Customise thank you page based upon items sold was created by Mat
Hi Nic,
How can I get the items bought by the customer and then tailor the thank you page accordingly?
Thanks,
Mat
How can I get the items bought by the customer and then tailor the thank you page accordingly?
Thanks,
Mat
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39062
by nicolas
Replied by nicolas on topic Re: Customise thank you page based upon items sold
Hi,
It depends of your payment methods. You will have to edit either the file "end" or the file "after_end" of the view "checkout" via the menu Display->Views (and not have a return URL configured in your payment plugin).
You will have to load the order information like that:
Then it's up to you...
It depends of your payment methods. You will have to edit either the file "end" or the file "after_end" of the view "checkout" via the menu Display->Views (and not have a return URL configured in your payment plugin).
You will have to load the order information like that:
Code:
$order_id = JRequest::getInt('order_id');
$orderClass = hikashop_get('class.order');
$order = $orderClass->loadFullOrder($order_id);
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39512
by Mat
Replied by Mat on topic Re: Customise thank you page based upon items sold
Thanks - when I added print_r($order); nothing appeared.
how do I get the products they just ordered?
actually the $order_id = 0 when I echo'd it. So I guess the thank you page doesn't remember the order_id?
how do I get the products they just ordered?
actually the $order_id = 0 when I echo'd it. So I guess the thank you page doesn't remember the order_id?
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39557
by Mat
Replied by Mat on topic Re: Customise thank you page based upon items sold
I even added the above code to the step.php and the order_id = 0
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39558
by Mat
Replied by Mat on topic Re: Customise thank you page based upon items sold
this worked
$app =& JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
$app =& JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39719
by nicolas
Replied by nicolas on topic Re: Customise thank you page based upon items sold
if $order_id = JRequest::getInt('order_id'); doesn't work, you can do like that:
$app =& JFactory::getApplication();
$order_id = $app->getUserSate('com_hikashop.order_id');
$app =& JFactory::getApplication();
$order_id = $app->getUserSate('com_hikashop.order_id');
The following user(s) said Thank You: Mat
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39721
by Mat
Replied by Mat on topic Re: Customise thank you page based upon items sold
thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.213 seconds