[Skip to main content](#vessel-content)

#   Unknown column 'order\_subtotal' in 'field list'

##

- **[cgonline](/forum/user/34948-cgonline "View cgonline's Profile")**
- [![cgonline's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34948-cgonline "View cgonline's Profile") Topic Author
- [ Offline](/forum/user/34948-cgonline)

Less More

- Posts: 12
- Thank you received: 0
-
-

11 years 1 month ago [\#213212](#213212) by [cgonline](/forum/user/34948-cgonline "View cgonline's Profile")  *[Unknown column 'order\_subtotal' in 'field list'](/forum/31-development/879086-unknown-column-order-subtotal-in-field-list#213212 "-- 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&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, false, false); $orderClass-&gt;save($order);  Returns: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; SET ...  Hi  Im trying to update an order from a system plugin, but it fails with an SQL error: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; 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?")* was created by *[cgonline](/forum/user/34948-cgonline "View cgonline's Profile")*

-- 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-&gt;loadFullOrder($order_id, false, false);
$orderClass-&gt;save($order);

Returns:
Unknown column 'order_subtotal' in 'field list' SQL=UPDATE &#96;oklpt_hikashop_order&#96; 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 &#96;oklpt\_hikashop\_order&#96; SET ...*

Newest Hikashop is installed, but no luck.
Im using this: Code:

$orderClass = hikashop_get('class.order'); $order = $orderClass-&gt;loadFullOrder($order_id, false, false); $orderClass-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTA4Ni11bmtub3duLWNvbHVtbi1vcmRlci1zdWJ0b3RhbC1pbi1maWVsZC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[cgonline](/forum/user/34948-cgonline "View cgonline's Profile")**
- [![cgonline's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34948-cgonline "View cgonline's Profile") Topic Author
- [ Offline](/forum/user/34948-cgonline)

Less More

- Posts: 12
- Thank you received: 0
-
-

11 years 1 month ago [\#213253](#213253) by [cgonline](/forum/user/34948-cgonline "View cgonline's Profile")  Replied by *[cgonline](/forum/user/34948-cgonline "View cgonline's Profile")* on topic *[Unknown column 'order\_subtotal' in 'field list'](/forum/31-development/879086-unknown-column-order-subtotal-in-field-list#213253 "-- 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&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, false, false); $orderClass-&gt;save($order);  Returns: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; SET ...  Hi  Im trying to update an order from a system plugin, but it fails with an SQL error: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; 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?")*

Okay!
I seem to have found a way around like this: Code:

$order = $orderClass-&gt;loadFullOrder($orderID, false, false); // Avoid Hikashop save bug! unset($order-&gt;order_subtotal); unset($order-&gt;order_subtotal_no_vat); $orderClass-&gt;save($order);

But how can I manully trigger a notification to the customer?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTA4Ni11bmtub3duLWNvbHVtbi1vcmRlci1zdWJ0b3RhbC1pbi1maWVsZC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 1 month ago [\#213254](#213254) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Unknown column 'order\_subtotal' in 'field list'](/forum/31-development/879086-unknown-column-order-subtotal-in-field-list#213254 "-- 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&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, false, false); $orderClass-&gt;save($order);  Returns: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; SET ...  Hi  Im trying to update an order from a system plugin, but it fails with an SQL error: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; 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?")*

Hi,

That code is wrong.
What you want to do is this: Code:

$orderClass = hikashop_get('class.order'); $order = new stdClass(); $order-&gt;order_id = $order_id; $order-&gt;order_status = "confirmed"; $orderClass-&gt;save($order);

And if you want a notification, you can add such code before the save: Code:

$order-&gt;history = new stdClass(); $order-&gt;history-&gt;history_notified = 1;

The following user(s) said Thank You: [cgonline](/forum/user/34948-cgonline "View cgonline's Profile"), [dzseti](/forum/user/42791-dzseti "View dzseti's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTA4Ni11bmtub3duLWNvbHVtbi1vcmRlci1zdWJ0b3RhbC1pbi1maWVsZC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[cgonline](/forum/user/34948-cgonline "View cgonline's Profile")**
- [![cgonline's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34948-cgonline "View cgonline's Profile") Topic Author
- [ Offline](/forum/user/34948-cgonline)

Less More

- Posts: 12
- Thank you received: 0
-
-

11 years 1 month ago [\#213341](#213341) by [cgonline](/forum/user/34948-cgonline "View cgonline's Profile")  Replied by *[cgonline](/forum/user/34948-cgonline "View cgonline's Profile")* on topic *[Unknown column 'order\_subtotal' in 'field list'](/forum/31-development/879086-unknown-column-order-subtotal-in-field-list#213341 "-- 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&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, false, false); $orderClass-&gt;save($order);  Returns: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; SET ...  Hi  Im trying to update an order from a system plugin, but it fails with an SQL error: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; 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?")*

Ah, so it's like the JDatabase updateObject()?
Anyway. That fixed it. Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTA4Ni11bmtub3duLWNvbHVtbi1vcmRlci1zdWJ0b3RhbC1pbi1maWVsZC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 1 month ago [\#213345](#213345) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Unknown column 'order\_subtotal' in 'field list'](/forum/31-development/879086-unknown-column-order-subtotal-in-field-list#213345 "-- 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&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, false, false); $orderClass-&gt;save($order);  Returns: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; SET ...  Hi  Im trying to update an order from a system plugin, but it fails with an SQL error: Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;oklpt&#95;hikashop&#95;order&#96; 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?")*

Hi,

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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTA4Ni11bmtub3duLWNvbHVtbi1vcmRlci1zdWJ0b3RhbC1pbi1maWVsZC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.171 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
