- Posts: 12
- Thank you received: 0
Unknown column 'order_subtotal' in 'field list'
11 years 3 weeks ago #213212
by cgonline
Unknown column 'order_subtotal' in 'field list' was created by cgonline
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : All
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : $orderClass = hikashop_get('class.order');
$order = $orderClass->loadFullOrder($order_id, false, false);
$orderClass->save($order);
Returns:
Unknown column 'order_subtotal' in 'field list' SQL=UPDATE `oklpt_hikashop_order` SET ...
Hi
Im trying to update an order from a system plugin, but it fails with an SQL error:
Unknown column 'order_subtotal' in 'field list' SQL=UPDATE `oklpt_hikashop_order` SET ...
Newest Hikashop is installed, but no luck.
Im using this:
How can I update (cancel or confirm) an existing order from a system plugin + send the email notification to the customer codewise?
-- Joomla version -- : 3.4.3
-- PHP version -- : All
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : $orderClass = hikashop_get('class.order');
$order = $orderClass->loadFullOrder($order_id, false, false);
$orderClass->save($order);
Returns:
Unknown column 'order_subtotal' in 'field list' SQL=UPDATE `oklpt_hikashop_order` SET ...
Hi
Im trying to update an order from a system plugin, but it fails with an SQL error:
Unknown column 'order_subtotal' in 'field list' SQL=UPDATE `oklpt_hikashop_order` SET ...
Newest Hikashop is installed, but no luck.
Im using this:
Code:
$orderClass = hikashop_get('class.order');
$order = $orderClass->loadFullOrder($order_id, false, false);
$orderClass->save($order);
How can I update (cancel or confirm) an existing order from a system plugin + send the email notification to the customer codewise?
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #213253
by cgonline
Replied by cgonline on topic Unknown column 'order_subtotal' in 'field list'
Okay!
I seem to have found a way around like this:
But how can I manully trigger a notification to the customer?
I seem to have found a way around like this:
Code:
$order = $orderClass->loadFullOrder($orderID, false, false);
// Avoid Hikashop save bug!
unset($order->order_subtotal);
unset($order->order_subtotal_no_vat);
$orderClass->save($order);
But how can I manully trigger a notification to the customer?
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #213254
by nicolas
Replied by nicolas on topic Unknown column 'order_subtotal' in 'field list'
Hi,
That code is wrong.
What you want to do is this:
And if you want a notification, you can add such code before the save:
That code is wrong.
What you want to do is this:
Code:
$orderClass = hikashop_get('class.order');
$order = new stdClass();
$order->order_id = $order_id;
$order->order_status = "confirmed";
$orderClass->save($order);
Code:
$order->history = new stdClass();
$order->history->history_notified = 1;
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #213341
by cgonline
Replied by cgonline on topic Unknown column 'order_subtotal' in 'field list'
Ah, so it's like the JDatabase updateObject()?
Anyway. That fixed it. Thanks.
Anyway. That fixed it. Thanks.
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #213345
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Unknown column 'order_subtotal' in 'field list'
Hi,
Yes ; it's the same kind, but we are not using JTable objects (it is not available in Joomla 1.5).
Regards,
Yes ; it's the same kind, but we are not using JTable objects (it is not available in Joomla 1.5).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Time to create page: 0.189 seconds