Post by ihateusernames » Mon Sep 23, 2019 10:27 am

Hi,

Does anyone know if its possible to add the shipping cost to an order after the Invoice has been generated?
I've tried editing the Invoice after it's been generated but I can't get passed the first page, which is basic client data. So don't know if it's possible in OC?
I've also looked in the market place for extensions & couldn't see anything there, so any help or suggestions welcomed.
I would of thought basic Invoice alterations would be available & I'm extremely surprised this isn't part of OC standard package.
Thanks for any input.

Active Member

Posts

Joined
Wed Jul 24, 2019 10:31 am

Post by Johnathan » Mon Sep 23, 2019 10:16 pm

You *can* use the OpenCart order editor for this, but it's a bit finicky. You need to make sure your IP is whitelisted as an API user in the OpenCart admin panel (usually there's a red banner at the top warning of you of that if it's not). Then, make sure you enter all the customer info in the first step, or use the auto-complete to select which customer the order is for. Once you get to the last step, it should show you the relevant shipping options based on your shipping methods.

If that ends up not working or you need to enter a value that's not part of your normal shipping calculation, Edit Order Line Items lets you edit any product or line item on the order manually. It supports changing prices and line items, as well as any other data in the "order" database table, but it does not support automatic tax calculation (so just keep that in mind if you're adjusting a taxed order). Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by ihateusernames » Tue Sep 24, 2019 10:41 am

Thanks Jonathon,

If I try to edit the order, I can't get passed the first page/tab (customer details - see attached screenshot). It keeps requesting three 'custom' fields even when filled in? Any suggestions as to what the problem is or how to resolve it? Haven't seen any IP errors pop up so I don't think that's the issue. Thanks for any input.

Attachments

Screenshot_2019-09-24 Orders.png

Screenshot_2019-09-24 Orders.png (28.33 KiB) Viewed 485 times


Using OC Version 3.0.3.2


Active Member

Posts

Joined
Wed Jul 24, 2019 10:31 am

Post by Johnathan » Tue Sep 24, 2019 10:12 pm

What's your OpenCart version? Those all look like custom fields, and if they are, OpenCart 3.0 has a bug related to that. I believe that's discussed here (with a fix):

viewtopic.php?t=187052

If that's not it, then I'm not aware of any order editor bugs like you describe, but there certainly could be one in your specific OpenCart version. Try searching the bug sub-forum for your version, and see if you can find any mention of it. Or, if someone else is familiar with this, hopefully they'll post here with some information.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by ihateusernames » Wed Sep 25, 2019 3:19 pm

Thanks for your help Jonathan,

I copied & replaced the two php files as suggested in the post you linked, but I now get the following error pop up.

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Warning</b>: filter_var(): Unknown modifier '[' in <b>/home/ihateusernames/shop.indonesianwholesaler.com/catalog/controller/api/customer.php</b> on line <b>58</b><b>Warning</b>: filter_var(): Unknown modifier '[' in <b>/home/ihateusernames/shop.indonesianwholesaler.com/catalog/controller/api/customer.php</b> on line <b>58</b><b>Warning</b>: filter_var(): Unknown modifier '[' in <b>/home/ihateusernames/shop.indonesianwholesaler.com/catalog/controller/api/customer.php</b> on line <b>58</b>{"error":{"custom_field4":"Country required!"}}

I've cleared the cache etc, as described in the posts as well. I've now posted this in the other post as well, hopefully someone has a fix.
Thanks.

Using OC Version 3.0.3.2


Active Member

Posts

Joined
Wed Jul 24, 2019 10:31 am

Post by ihateusernames » Sun Oct 06, 2019 4:55 pm

If I disable the custom fields then I get the following Syntax Error...:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<br />
<b>Fatal error</b>: Uncaught ArgumentCountError: Too few arguments to function ModelExtensionTotalSubTotal::getTotal(), 0 passed in /home/ihateusernames/ocartdataclone/storage/modification/system/engine/loader.php on line 248 and exactly 1 expected in /home/ihateusernames/shop.indonesianwholesaler.com/catalog/model/extension/total/sub_total.php:3
Stack trace:
#0 /home/ihateusernames/ocartdataclone/storage/modification/system/engine/loader.php(248): ModelExtensionTotalSubTotal-&gt;getTotal()
#1 /home/ihateusernames/shop.indonesianwholesaler.com/catalog/controller/api/payment.php(146): Loader-&gt;{closure}(Array, Array, 0)
#2 /home/ihateusernames/ocartdataclone/storage/modification/system/engine/action.php(78): ControllerApiPayment-&gt;methods()
#3 /home/ihateusernames/shop.indonesianwholesaler.com/catalog/controller/startup/router.php(25): Action-&gt;execute(Object(Registry))
#4 /home/ihateusernames/ocartdataclone/storage/modification/system/engine/action.php(78): ControllerStartupRouter-&gt;index()
#5 /home/ihateusernames/shop.indonesianwholes in <b>/home/ihateusernames/shop.indonesianwholesaler.com/catalog/model/extension/total/sub_total.php</b> on line <b>3</b><br />

If anyone has a fix for this issue, that would be great. Thanks.

Using OC Version 3.0.3.2


Active Member

Posts

Joined
Wed Jul 24, 2019 10:31 am
Who is online

Users browsing this forum: No registered users and 172 guests