return url / thank you page order number & amount

  • Posts: 108
  • Thank you received: 1
8 years 9 months ago #229272

-- url of the page with the problem -- : www.birki.com.ph/
-- HikaShop version -- : Business
-- Joomla version -- : 3.4.5

Hi,

I would like to display the order number and amount paid on my custom return url
birki.com.ph/index.php/thank-you

This return URL is supposed to be used from various payment methods.

Thank you.

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 114
8 years 9 months ago #229306

Hi,

If your custom return url is article you can install sourcerer and do like this.

To display order amount:

{source}
<?php
if(!defined('DS'))
 define('DS', DIRECTORY_SEPARATOR); if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true;

$app =JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
$orderClass = hikashop_get('class.order');
$currencyClass = hikashop_get('class.currency');
$fullOrder = $orderClass->get($order_id);
echo $currencyClass->format(round($fullOrder->order_full_price,2));
?>
{/source}

To display order number:
{source}
<?php
if(!defined('DS'))
 define('DS', DIRECTORY_SEPARATOR); if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true;

$app =JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
$orderClass = hikashop_get('class.order');
$currencyClass = hikashop_get('class.currency');
$fullOrder = $orderClass->get($order_id);
echo $fullOrder->order_number;
?>
{/source}

Hope that helps.

Regards

Last edit: 8 years 9 months ago by kyratn.
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum