Loading Order ID, Price after checkout

  • Posts: 7
  • Thank you received: 0
8 years 1 month ago #251166

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.2

Hello,
Iam trying to just sumarize after checkout some information about the order.

Order ID, Price, name of the user etc.

So I have edited: wiew checkout / end ( because iam using HikaShop collect on delivery payment plugin)
and added :
...$this->nextButton = false;

$order_id = $app->getUserState('com_hikashop.order_id');
$orderClass = hikashop_get('class.order');
$this->order = $orderClass->loadFullOrder($order_id);

and i get Call to a member function getUserState() on null error.

any help? Thank you

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 1 month ago #251168

Hi,

You need first the line:
$app = JFactory::getApplication();
so that you can then use $app->getUserState.

The following user(s) said Thank You: Strmy

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

  • Posts: 7
  • Thank you received: 0
8 years 1 month ago #251234

Thank you that was it.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum