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

#   I am having a little problem with order update

##

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

Less More

- Posts: 2
- Thank you received: 0
-
-

12 years 1 week ago -  12 years 1 week ago [\#175695](#175695) by [mystery](/forum/user/34506-mystery "View mystery's Profile")  *[I am having a little problem with order update](/forum/31-development/872338-i-am-having-a-little-problem-with-order-update#175695 "-- url of the page with the problem -- : Private site (local server via virtual machine) -- HikaShop version -- : 2.3.3 Starter -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.14 -- Browser(s) name and version -- : Firefox 32.03  I'm creating a payment plugin for a local bank (FiBank). Haven't found one developed yet so, im having the honor of bashing my head in the wall reading &#42;bank&#42; documentation(dont ask why,please). Anyway my problem is that when i do : $orderClass = hikashop&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, true, false); // im passing the current order&#95;id $order-&gt;cart-&gt;shipping&#95;address-&gt;test= 'blalba; // test is a custom field that i have created thru hikashopp .. starter... $orderClass-&gt;save($order); And on the page where it should re-direct me to the payment gateway, I've disabled the auto-redirect, since i need to see if im correctly assigning the &quot;fields&quot; in the form that's going to be sent to the bank. So there i get this error.  &quot;#1054 Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;dsk2o&#95;hikashop&#95;order&#96; SET WHERE &#96;order&#95;id&#96;='83' &quot;  I am doing that in - function onAfterOrderConfirm(&amp;$order,&amp;$methods,$method&#95;id) . So i am wondering is there a way to edit specific part of the order and update it ? Or what could be the cause for my problem, if you could enlighten me ? Order&#95;subtotal - the whole order class is supplied by you .. shouldn't it be able to save it ?")* was created by *[mystery](/forum/user/34506-mystery "View mystery's Profile")*

-- url of the page with the problem -- : Private site (local server via virtual machine)
-- HikaShop version -- : 2.3.3 Starter
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.14
-- Browser(s) name and version -- : Firefox 32.03

I'm creating a payment plugin for a local bank (FiBank). Haven't found one developed yet so, im having the honor of bashing my head in the wall reading *bank* documentation(dont ask why,please). Anyway my problem is that when i do :
$orderClass = hikashop_get('class.order');
$order = $orderClass-&gt;loadFullOrder($order_id, true, false); // im passing the current order_id
$order-&gt;cart-&gt;shipping_address-&gt;test= 'blalba; // test is a custom field that i have created thru hikashopp .. starter...
$orderClass-&gt;save($order);
And on the page where it should re-direct me to the payment gateway, I've disabled the auto-redirect, since i need to see if im correctly assigning the "fields" in the form that's going to be sent to the bank. So there i get this error.

"#1054 Unknown column 'order_subtotal' in 'field list' SQL=UPDATE &#96;dsk2o_hikashop_order&#96; SET &#96;order_billing_address_id&#96;='2',&#96;order_shipping_address_id&#96;='2',&#96;order_user_id&#96;='1',&#96;order_status&#96;='created',&#96;order_type&#96;='sale',&#96;order_number&#96;='D8Q3',&#96;order_created&#96;='1413380390',&#96;order_modified&#96;='1413380390',&#96;order_invoice_id&#96;='0',&#96;order_invoice_number&#96;='',&#96;order_invoice_created&#96;='0',&#96;order_currency_id&#96;='30',&#96;order_full_price&#96;='40',&#96;order_tax_info&#96;='a:1:{s:0:\"\";O:8:\"stdClass\"![:3](/smile3.gif ":3"):{s:11:\"tax_namekey\";s:0:\"\";s:8:\"tax_rate\";s:7:\"0.00000\";s:10:\"tax_amount\";d:0;}}',&#96;order_discount_code&#96;='',&#96;order_discount_price&#96;='0.00000',&#96;order_discount_tax&#96;='0.00000',&#96;order_payment_id&#96;='8',&#96;order_payment_method&#96;='fiBank',&#96;order_payment_price&#96;='0.00000',&#96;order_payment_params&#96;='',&#96;order_shipping_id&#96;='2',&#96;order_shipping_method&#96;='manual',&#96;order_shipping_price&#96;='5.00000',&#96;order_shipping_tax&#96;='0.00000',&#96;order_shipping_params&#96;='O:8:\"stdClass\":1:{s:6:\"prices\";a:1:{s:3:\"2@0\";O:8:\"stdClass\":2:{s:14:\"price_with_tax\";d:5;s:3:\"tax\";d:0;}}}',&#96;order_partner_id&#96;='0',&#96;order_partner_price&#96;='0.00000',&#96;order_partner_paid&#96;='0',&#96;order_partner_currency_id&#96;='0',&#96;order_ip&#96;='192.168.79.1',&#96;order_site_id&#96;='',&#96;order_subtotal&#96;='35',&#96;order_subtotal_no_vat&#96;='35' WHERE &#96;order_id&#96;='83' "

I am doing that in - function onAfterOrderConfirm(&amp;$order,&amp;$methods,$method_id) .
So i am wondering is there a way to edit specific part of the order and update it ?
Or what could be the cause for my problem, if you could enlighten me ?
Order_subtotal - the whole order class is supplied by you .. shouldn't it be able to save it ?

Last edit: 12 years 1 week ago by [mystery](/forum/user/34506-mystery "View mystery's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3MjMzOC1pLWFtLWhhdmluZy1hLWxpdHRsZS1wcm9ibGVtLXdpdGgtb3JkZXItdXBkYXRlP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

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

12 years 1 week ago [\#175747](#175747) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[I am having a little problem with order update](/forum/31-development/872338-i-am-having-a-little-problem-with-order-update#175747 "-- url of the page with the problem -- : Private site (local server via virtual machine) -- HikaShop version -- : 2.3.3 Starter -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.14 -- Browser(s) name and version -- : Firefox 32.03  I'm creating a payment plugin for a local bank (FiBank). Haven't found one developed yet so, im having the honor of bashing my head in the wall reading &#42;bank&#42; documentation(dont ask why,please). Anyway my problem is that when i do : $orderClass = hikashop&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, true, false); // im passing the current order&#95;id $order-&gt;cart-&gt;shipping&#95;address-&gt;test= 'blalba; // test is a custom field that i have created thru hikashopp .. starter... $orderClass-&gt;save($order); And on the page where it should re-direct me to the payment gateway, I've disabled the auto-redirect, since i need to see if im correctly assigning the &quot;fields&quot; in the form that's going to be sent to the bank. So there i get this error.  &quot;#1054 Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;dsk2o&#95;hikashop&#95;order&#96; SET WHERE &#96;order&#95;id&#96;='83' &quot;  I am doing that in - function onAfterOrderConfirm(&amp;$order,&amp;$methods,$method&#95;id) . So i am wondering is there a way to edit specific part of the order and update it ? Or what could be the cause for my problem, if you could enlighten me ? Order&#95;subtotal - the whole order class is supplied by you .. shouldn't it be able to save it ?")*

Hi,

The object returned by the loadFullOrder function of the order class is not meant to be saved with all the data in it so that's normal that you get the error.
You should instead create a new order object with just the data to modify in the order table.
If you actually want to modify the address, then it's the class.address save function that you want to use on the $order-&gt;cart-&gt;shipping_address object.

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

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

Less More

- Posts: 2
- Thank you received: 0
-
-

12 years 1 week ago [\#175782](#175782) by [mystery](/forum/user/34506-mystery "View mystery's Profile")  Replied by *[mystery](/forum/user/34506-mystery "View mystery's Profile")* on topic *[I am having a little problem with order update](/forum/31-development/872338-i-am-having-a-little-problem-with-order-update#175782 "-- url of the page with the problem -- : Private site (local server via virtual machine) -- HikaShop version -- : 2.3.3 Starter -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.14 -- Browser(s) name and version -- : Firefox 32.03  I'm creating a payment plugin for a local bank (FiBank). Haven't found one developed yet so, im having the honor of bashing my head in the wall reading &#42;bank&#42; documentation(dont ask why,please). Anyway my problem is that when i do : $orderClass = hikashop&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, true, false); // im passing the current order&#95;id $order-&gt;cart-&gt;shipping&#95;address-&gt;test= 'blalba; // test is a custom field that i have created thru hikashopp .. starter... $orderClass-&gt;save($order); And on the page where it should re-direct me to the payment gateway, I've disabled the auto-redirect, since i need to see if im correctly assigning the &quot;fields&quot; in the form that's going to be sent to the bank. So there i get this error.  &quot;#1054 Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;dsk2o&#95;hikashop&#95;order&#96; SET WHERE &#96;order&#95;id&#96;='83' &quot;  I am doing that in - function onAfterOrderConfirm(&amp;$order,&amp;$methods,$method&#95;id) . So i am wondering is there a way to edit specific part of the order and update it ? Or what could be the cause for my problem, if you could enlighten me ? Order&#95;subtotal - the whole order class is supplied by you .. shouldn't it be able to save it ?")*

Shipping address is individual for each order isn't it ? What i mean is, if i modify that test field and save it via address class, it will save it only for the current order right ?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 1 week ago [\#175825](#175825) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[I am having a little problem with order update](/forum/31-development/872338-i-am-having-a-little-problem-with-order-update#175825 "-- url of the page with the problem -- : Private site (local server via virtual machine) -- HikaShop version -- : 2.3.3 Starter -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.14 -- Browser(s) name and version -- : Firefox 32.03  I'm creating a payment plugin for a local bank (FiBank). Haven't found one developed yet so, im having the honor of bashing my head in the wall reading &#42;bank&#42; documentation(dont ask why,please). Anyway my problem is that when i do : $orderClass = hikashop&#95;get('class.order'); $order = $orderClass-&gt;loadFullOrder($order&#95;id, true, false); // im passing the current order&#95;id $order-&gt;cart-&gt;shipping&#95;address-&gt;test= 'blalba; // test is a custom field that i have created thru hikashopp .. starter... $orderClass-&gt;save($order); And on the page where it should re-direct me to the payment gateway, I've disabled the auto-redirect, since i need to see if im correctly assigning the &quot;fields&quot; in the form that's going to be sent to the bank. So there i get this error.  &quot;#1054 Unknown column 'order&#95;subtotal' in 'field list' SQL=UPDATE &#96;dsk2o&#95;hikashop&#95;order&#96; SET WHERE &#96;order&#95;id&#96;='83' &quot;  I am doing that in - function onAfterOrderConfirm(&amp;$order,&amp;$methods,$method&#95;id) . So i am wondering is there a way to edit specific part of the order and update it ? Or what could be the cause for my problem, if you could enlighten me ? Order&#95;subtotal - the whole order class is supplied by you .. shouldn't it be able to save it ?")*

Hi,

The change will be done for each orders made, so each new used shipping addresses.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3MjMzOC1pLWFtLWhhdmluZy1hLWxpdHRsZS1wcm9ibGVtLXdpdGgtb3JkZXItdXBkYXRlP3RtcGw9bWFya2Rvd24=) 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.221 seconds

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

[](#top)
