- Posts: 10
- Thank you received: 0
add data to a table after order is confirmed
14 years 10 months ago #31625
by ursule15
Replied by ursule15 on topic Re: add data to a table after order is confirmed
I am using hikashop v1.5.4.
I confirm, $orderClass does not contains a lot of info... (see attached file).
In fact, orderclass contain same info using frontend of backend.
The difference is with backend, I can use :
$orderClass = hikashop::get('class.order');
$dbOrder = $orderClass->get($order->order_id);
$orderClass=$orderClass->loadFullOrder($order->order_id, false, false);
but loadFullOrder does not exist on frontend side.
I confirm, $orderClass does not contains a lot of info... (see attached file).
In fact, orderclass contain same info using frontend of backend.
The difference is with backend, I can use :
$orderClass = hikashop::get('class.order');
$dbOrder = $orderClass->get($order->order_id);
$orderClass=$orderClass->loadFullOrder($order->order_id, false, false);
but loadFullOrder does not exist on frontend side.
Please Log in or Create an account to join the conversation.
14 years 10 months ago #31646
by nicolas
Replied by nicolas on topic Re: add data to a table after order is confirmed
That's because you're confusing the order class and the order object. It would be best to write the loadFullOrder call like that:
$orderData=$orderClass->loadFullOrder($order->order_id, false, false);
Then, do a debug of $orderData. You should have an order_user_id attribute in it that you can use in the code to load the customer data.
$orderData=$orderClass->loadFullOrder($order->order_id, false, false);
Then, do a debug of $orderData. You should have an order_user_id attribute in it that you can use in the code to load the customer data.
Please Log in or Create an account to join the conversation.
14 years 9 months ago #31780
by ursule15
Replied by ursule15 on topic Re: add data to a table after order is confirmed
Many thanks !
Works now.
Works now.
Please Log in or Create an account to join the conversation.
Time to create page: 0.194 seconds