Fatal error: Call to undefined method ModelSaleOrder
38 posts
• Page 1 of 2 • 1, 2
Fatal error: Call to undefined method ModelSaleOrder
Fatal error: Call to undefined method ModelSaleOrder::getOrderOption() in /home/deb44075/domains/myrali.nl/public_html/winkel/admin/controller/sale/order.php on line 1783
This is what I get when loged in as admin and do a SALES/ORDER/VIEW/products selection and than click on an uploaded picture
This is the url produced by the procedure
http://www.myrali.nl/winkel/admin/index ... ption_id=6
The picture is in the directory download with added a codeword behind the filetype
The picture is owned by user apache not by the owner of the application.
I tried with reset owner to the application owner but this has no effect what so ever
Version of opencart is the last
v1.5.1.3 is instaled with instalitron of my provider
Hope someone can help me
This is what I get when loged in as admin and do a SALES/ORDER/VIEW/products selection and than click on an uploaded picture
This is the url produced by the procedure
http://www.myrali.nl/winkel/admin/index ... ption_id=6
The picture is in the directory download with added a codeword behind the filetype
The picture is owned by user apache not by the owner of the application.
I tried with reset owner to the application owner but this has no effect what so ever
Version of opencart is the last
v1.5.1.3 is instaled with instalitron of my provider
Hope someone can help me
- fadomain
- Posts: 8
- Joined: Sat Oct 08, 2011 9:33 am
Re: Fatal error: Call to undefined method ModelSaleOrder
i have no idea what you are talking about. undefined method and a picture.
OpenCart®
Project Owner & Developer.
OpenCart commercial support now available!
Project Owner & Developer.
OpenCart commercial support now available!
-

Daniel - Administrator
- Posts: 5173
- Joined: Fri Nov 03, 2006 10:57 am
Re: Fatal error: Call to undefined method ModelSaleOrder
Daniel wrote:i have no idea what you are talking about. undefined method and a picture.
On the new version its possible to upload a file as a customer when you order a product, its something to use with a printable product so you can use the file or picture to ad to your product.
on the admin pages its possible to view the order, in one of the links its possible to click on the name of the uploaded customer file, here is where I get the error. Hope this will help you understand better
if you want I can give you the admin password , it's only a test installation of opencart, I want to use the technology of customer file upload, to sell printable products.
- fadomain
- Posts: 8
- Joined: Sat Oct 08, 2011 9:33 am
Re: Fatal error: Call to undefined method ModelSaleOrder
yes, after go to order for open att'd file, than have this warning
admin/controller/sale/order.php on line 1783
so how can we fix that? thank you.
admin/controller/sale/order.php on line 1783
so how can we fix that? thank you.
-

okmarket - Posts: 51
- Joined: Sat Jul 09, 2011 3:47 pm
- Location: Guangzhou,China
Re: Fatal error: Call to undefined method ModelSaleOrder
for Fatal error: Call to undefined method ModelSaleOrder, i make two screenshot for your check it,pls advise how to fix it?
- Attachments
-
- problem1.JPG (39.07 KiB) Viewed 2837 times
-
- problem2.JPG (36.24 KiB) Viewed 2837 times
-

okmarket - Posts: 51
- Joined: Sat Jul 09, 2011 3:47 pm
- Location: Guangzhou,China
Re: Fatal error: Call to undefined method ModelSaleOrder
I've fixed
Open : admin/model/sale/order.php
add this method to this file
hope this help!
Open : admin/model/sale/order.php
add this method to this file
- Code: Select all
public function getOrderOption($order_id, $order_option_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_option_id = '" . (int)$order_option_id . "'");
return $query->row;
}
hope this help!
- banktp106
- Posts: 15
- Joined: Mon May 16, 2011 8:18 am
Re: Fatal error: Call to undefined method ModelSaleOrder
your code which order.php already have. so can you help to check it? tks.
-

okmarket - Posts: 51
- Joined: Sat Jul 09, 2011 3:47 pm
- Location: Guangzhou,China
Re: Fatal error: Call to undefined method ModelSaleOrder
banktp106 wrote:I've fixed
Open : admin/model/sale/order.php
add this method to this file
- Code: Select all
public function getOrderOption($order_id, $order_option_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_option_id = '" . (int)$order_option_id . "'");
return $query->row;
}
hope this help!
Thanks for posting that fix. I just ran into the same issue with the error mentioned in the first post. This thread came up when I Google'd. With your fix, it works fine now. Thanks for taking the time to post the fix.
- JSR
- Posts: 7
- Joined: Fri Dec 30, 2011 1:56 pm
Re: Fatal error: Call to undefined method ModelSaleOrder
I updated the admin/model/sale/order.php and it no longer throws the error now.
However, now the file never downloads. The browser gets stuck trying to download the file and it never completes and finally the browser errors out and says it can't download the file. I can verify that the files exist in /store/download/ directory, but it seems that the code can't locate the file to serve it.
Any help would be greatly appreciated!
However, now the file never downloads. The browser gets stuck trying to download the file and it never completes and finally the browser errors out and says it can't download the file. I can verify that the files exist in /store/download/ directory, but it seems that the code can't locate the file to serve it.
Any help would be greatly appreciated!
-

Concept211 - Posts: 39
- Joined: Thu Oct 13, 2011 5:40 pm
Re: Fatal error: Call to undefined method ModelSaleOrder
In your admin - > systems - > error logs, what does it report regarding this event ?
Regards,
Straightlight
Straightlight
- straightlight
- Posts: 1924
- Joined: Mon Nov 14, 2011 3:38 pm
- Location: Canada, ON
Re: Fatal error: Call to undefined method ModelSaleOrder
straightlight wrote:In your admin - > systems - > error logs, what does it report regarding this event ?
That's what's strange, it's not throwing any errors at all. The error logs are blank.

-

Concept211 - Posts: 39
- Joined: Thu Oct 13, 2011 5:40 pm
Re: Fatal error: Call to undefined method ModelSaleOrder
Are at least one download file linked with an order option from the orders under the admin and from database ?
It is possible that you see no throwing errors from the event tracker due to empty results.
It is possible that you see no throwing errors from the event tracker due to empty results.
Regards,
Straightlight
Straightlight
- straightlight
- Posts: 1924
- Joined: Mon Nov 14, 2011 3:38 pm
- Location: Canada, ON
Re: Fatal error: Call to undefined method ModelSaleOrder
straightlight wrote:Are at least one download file linked with an order option from the orders under the admin and from database ?
It is possible that you see no throwing errors from the event tracker due to empty results.
I'm not sure exactly what you mean but attached are several screenshots to show you what's happening. You'll notice that the downloads just get "stuck" until they finally time out and fail. Everything else on the entire cart works perfectly except for this. You'll also see in the last screenshot that the JPG files DO exist on the server/FTP. Something is just wrong when serving up the file.
Thanks for your help!
-

Concept211 - Posts: 39
- Joined: Thu Oct 13, 2011 5:40 pm
Re: Fatal error: Call to undefined method ModelSaleOrder
Here are the other screenshots:
-

Concept211 - Posts: 39
- Joined: Thu Oct 13, 2011 5:40 pm
Re: Fatal error: Call to undefined method ModelSaleOrder
Fixed. VQMod version ready. No core files modifications needed to install this fix as it is now cross-browsing compatible under PA-DSS Compliance and WCAG Compliance which the OC team didn't seem to have developed yet.
While the previous model fix above may had removed the error event issue on screen, the download header was not functioning correctly as without cross-browsing methodology when trying to download from the admin - > sales - > orders - > products tab on the left - > file name: filename.extension as a product option value file while the header being canceled to process the download. My fix should now handle all that. It also handles windows / linux, UNIX / MAC file path either from localhost or PCI Compliance servers.
While the previous model fix above may had removed the error event issue on screen, the download header was not functioning correctly as without cross-browsing methodology when trying to download from the admin - > sales - > orders - > products tab on the left - > file name: filename.extension as a product option value file while the header being canceled to process the download. My fix should now handle all that. It also handles windows / linux, UNIX / MAC file path either from localhost or PCI Compliance servers.
- Attachments
-
admin_product_option_download_fix_1_5_2_1.xml- v1.5.2.1
- (5.13 KiB) Downloaded 64 times
-
admin_product_option_download_fix.xml- Product option download fix (PA-DSS Compliance and WCAG Compliance standards included). Also added the order option solution from the above.
- (5.12 KiB) Downloaded 196 times
Last edited by straightlight on Sat Mar 17, 2012 5:34 pm, edited 2 times in total.
Regards,
Straightlight
Straightlight
- straightlight
- Posts: 1924
- Joined: Mon Nov 14, 2011 3:38 pm
- Location: Canada, ON
Re: Fatal error: Call to undefined method ModelSaleOrder
Wow, thank you so much straightlight! My experience with the OpenCart team and community has been nothing less than spectacular! I really appreciate all of the hard work everyone has put into such a great product and I hope to contribute more and more with everything that I can.
-

Concept211 - Posts: 39
- Joined: Thu Oct 13, 2011 5:40 pm
Re: Fatal error: Call to undefined method ModelSaleOrder
Hi,
i am completely new to the realms of opencart (which is fantastic) and i have come up against the same error with the upload option - I noted your fix admin_product_option_download_fix.xml & the download /download/file.php?id=8977 and wanted to ask how i apply this?
I would be most greatful if someone could explain this to me.
Regards
Patrick
i am completely new to the realms of opencart (which is fantastic) and i have come up against the same error with the upload option - I noted your fix admin_product_option_download_fix.xml & the download /download/file.php?id=8977 and wanted to ask how i apply this?
I would be most greatful if someone could explain this to me.
Regards
Patrick
- airtagmedia
- Posts: 3
- Joined: Sun Jan 08, 2012 9:01 pm
Re: Fatal error: Call to undefined method ModelSaleOrder
This fix is if you use VQMod on your OpenCart copy. If so, upload this XML file in your ./vqmod/xml folder as it should load automatically once you logged in into the admin - > sales - > orders page. 
This URL link is simply the way phpBB from this forum generates the download link. There are no specific instructions based on this link other than clicking on the file to download it into your local environment.

/download/file.php?id=8977
This URL link is simply the way phpBB from this forum generates the download link. There are no specific instructions based on this link other than clicking on the file to download it into your local environment.
Regards,
Straightlight
Straightlight
- straightlight
- Posts: 1924
- Joined: Mon Nov 14, 2011 3:38 pm
- Location: Canada, ON
Re: Fatal error: Call to undefined method ModelSaleOrder
Thanks for your reply, I uploaded the xml file into the relevant folder vqmod/xml/file_name but i still encounter the following problem Fatal error: Call to undefined method ModelSaleOrder::getOrderOption() in /vqmod/vqcache/vq2-admin_controller_sale_order.php on line 1869. I am unsure if this is the same problem. (I realised the download reference was down to the bb and the way it handles links etc.)
I will have a tinker but would appreciate any input you could offer in resolving this issue.
regards
Patrick.
I will have a tinker but would appreciate any input you could offer in resolving this issue.
regards
Patrick.
Last edited by airtagmedia on Mon Jan 09, 2012 2:23 am, edited 1 time in total.
- airtagmedia
- Posts: 3
- Joined: Sun Jan 08, 2012 9:01 pm
Re: Fatal error: Call to undefined method ModelSaleOrder
I have now updated my XML file which now includes this modification so that no one else uses a core modification when following this post: viewtopic.php?f=161&t=42888&p=237517#p234653 . All users who followed this instruction should rather remove this from the core file so during and after the upgrade you won't encounter the same error message in case this method is not being implemented by the OC team on the next release but rather be ran from my XML file during while.
Regards,
Straightlight
Straightlight
- straightlight
- Posts: 1924
- Joined: Mon Nov 14, 2011 3:38 pm
- Location: Canada, ON
38 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 15 guests














