- Posts: 14
- Thank you received: 0
Need Order id on Paypal Pro Thank you page
-- Joomla version -- : 3.3.6
-- Error-message(debug-mod must be tuned on) -- : Order id on paypal pro thank you page
How can i get order id of order after successful payment (order confirmation) on Paypal Pro credit card payment method thank you page (paypalpro_thanks.php)?
I tried to get order id using this code,
But it is not giving any result.
Please can you help me with this.
Thank you.
Please Log in or Create an account to join the conversation.
That code looks just fine.
Did you also add a line like this ?
echo $order_id;
Otherwise, you won't see the order id in the $order_id variable.
Please Log in or Create an account to join the conversation.
But no order id is getting displayed.
Please Log in or Create an account to join the conversation.
- Posts: 608
- Thank you received: 13
thanks
Please Log in or Create an account to join the conversation.
And you can use that code in a Joomla article if you use the plugin called "sourcerer".
Please Log in or Create an account to join the conversation.
- Posts: 608
- Thank you received: 13
{source}
<?php
echo $order_id;
$app =JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
?>
{/source}
Please Log in or Create an account to join the conversation.
If you display the value ($order_id) before that variable receive the content ; it's logical that you got nothing (because the variable does not have yet the content).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Posts: 608
- Thank you received: 13
{source}
<?php
$app =JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
echo $order_id;
?>
{/source}
but then realised that it's the order number I am after so changed the code to;
{source}
<?php
$app =JFactory::getApplication();
$order_number = $app->getUserState('com_hikashop.order_number');
echo $order_number;
?>
{/source}
and now it will not display the order number like it did with the order_id?
Please Log in or Create an account to join the conversation.
If you want to get access to information in the order, like the order_number, you need to load the order content.
You can just access to the "order_id" in the user state.. We won't store the entire order content into.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Posts: 608
- Thank you received: 13
When I first started to use Hikashop you could not do enough to assist users but now I can see from a lot of posts on here that help is now very vague unless you are proficient in PHP.
Considering I have been using your software for over 4 years a little assistance with the correct code would not go amiss.
rgds
Please Log in or Create an account to join the conversation.
The code to use to get the order content is:
Please Log in or Create an account to join the conversation.
- Posts: 608
- Thank you received: 13
My end goal is just to display the order number in a article using 'Sorcerer' as advised by Nicolas
thanks
Please Log in or Create an account to join the conversation.
In that case, before you try using HikaShop functions, you need to load HikaShop itself if it isn't loaded.
It would explain why you get a blank page.
So you'll want to try something like that:
PS: please remember that we provide user support. Not customization support. This is clearly out of the services you've been paying for the last 4 years. We've already got way above what we are supposed to do here. If you need someone to code something for you, please contact our partners or post on our commercial jobs forum.
Please Log in or Create an account to join the conversation.
- Posts: 608
- Thank you received: 13
Not being a programmer but a Hikashop user, I would not know what's in your remit or not, I was not advised to find assistance elsewhere for the information that I required to achieve my goal or else I would have done.
Anyway thank you for this as my goal has now been achieved.
.
Please Log in or Create an account to join the conversation.