Page 1 of 1

OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Mon Jul 04, 2016 11:24 am
by GatorTim
I am on OpenCart 2.1.0.2 and am getting a popup error when I try to edit an order that just says Error Undefined. I was getting this error when viewing orders and found all of the posts that said that the issue was related to either the API setup or multiple stores or moving a store to a new URL which then causes a URL mismatch between the one captured on the Order and the one used to connect to the admin site. I am using a single store and have recently moved it to a new URL, so I have fixed the API configuration and the store URL on all of the existing orders. I then found that when I installed SSL it was still recording the non-SSL URL on the order and found the patch to resolve that, installed it, and that fixed the HTTP vs HTTPS issue with the recording of the store URL on the order.

I am no longer having any issues viewing an order and I can update the order status and generate notification emails to the customer. However, I cannot edit an order. What else do I need to do?

Thanks!

Tim

Re: OpenCart 2.1.0.2 Edit Order Error Undefined

Posted: Mon Jul 04, 2016 7:59 pm
by platypuspuzzles
It sounds like the same issues I was having.

I can highly recommend purchasing the forced SSL from the extensions page as the money more than quickly covered the time I wasted trying to sort this issue out.

Once installed, if you're still having issues, just message the creator, and they sort it out for you.

Re: OpenCart 2.1.0.2 Edit Order Error Undefined

Posted: Wed Jul 06, 2016 8:18 am
by GatorTim
Thanks for the input about buying yet another extension to solve a problem. But I would like to understand why I am having the problem in the first place. Is there anywhere I can get more information about what is causing the problem? I know that if there is a mismatch in the HTTP vs HTTPS on the order vs the URL that I am in for the admin site then it will cause this issue. However, that causes the error if you go into view order or edit order. However, I am currently getting this error only on edit order. Why?

I also do not really understand the role that the API setting has in this. What does it really do? Other than making sure my IP address is registered, what else do I need to do in order to make sure that I am set up right?

Thanks!

Tim

Re: OpenCart 2.1.0.2 Edit Order Error Undefined

Posted: Thu Jul 07, 2016 10:15 pm
by EvolveWebHosting
I have been seeing this when there is a difference between the URL in your config file and what URL you're actually visiting.

For example, you go to http://www.domain.com but your config files say http://domain.com

To fix this, you would either add a 301 redirect to force www or non www (in your .htaccess file) and then make sure that the rewrite rule matches the URL in both of your config files.

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Sun Jul 10, 2016 8:37 pm
by GatorTim
I was able to resolve this, with the help of postings from Randem and a few others. It required doing the following things:

1) set up the .htaccess file to force www.domain.com to domain.com
2) add a redirect for http to https in the .htaccess file
3) change all URLs in the config.php files in both the root and admin folders to use https

I didn't have any issues with the API setup, the real problem was making sure that everyone was using the same URL to access the site and ensuring that it always had HTTPs turned on.

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Sun Jul 10, 2016 10:16 pm
by straightlight
An alternative solution by enforcing HTTPS without manipulating the .htaccess file: http://forum.opencart.com/viewtopic.php?f=24&t=165085

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Fri Jul 22, 2016 4:01 am
by hpmon
GatorTim wrote:I was able to resolve this, with the help of postings from Randem and a few others. It required doing the following things:

1) set up the .htaccess file to force http://www.domain.com to domain.com
2) add a redirect for http to https in the .htaccess file
3) change all URLs in the config.php files in both the root and admin folders to use https

I didn't have any issues with the API setup, the real problem was making sure that everyone was using the same URL to access the site and ensuring that it always had HTTPs turned on.
I'm a complete dummy when it comes to this stuff, how do I set up an .htaccess file? I already have one in there that only allows computers from my IP to modify the site (I think). How do I add to it? Also, I have opencart installed into a folder within the main directory, (www.mysite.com/OC/ instead of www.mysite.com). Do you mind giving a detailed step by step?

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Fri Jul 22, 2016 5:59 am
by straightlight
hpmon wrote:
GatorTim wrote:I was able to resolve this, with the help of postings from Randem and a few others. It required doing the following things:

1) set up the .htaccess file to force http://www.domain.com to domain.com
2) add a redirect for http to https in the .htaccess file
3) change all URLs in the config.php files in both the root and admin folders to use https

I didn't have any issues with the API setup, the real problem was making sure that everyone was using the same URL to access the site and ensuring that it always had HTTPs turned on.
I'm a complete dummy when it comes to this stuff, how do I set up an .htaccess file? I already have one in there that only allows computers from my IP to modify the site (I think). How do I add to it? Also, I have opencart installed into a folder within the main directory, (http://www.mysite.com/OC/ instead of http://www.mysite.com). Do you mind giving a detailed step by step?
The following are step-by-step details on how to create an .htaccess file and how to upload it: https://mediatemple.net/community/produ ... cess-files

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Tue Jul 26, 2016 12:57 am
by hpmon
straightlight wrote: The following are step-by-step details on how to create an .htaccess file and how to upload it: https://mediatemple.net/community/produ ... cess-files
I appreciate the link but I'm still kinda lost.


also, this is the message I get when I try to edit an order, if that helps.
help.jpg

help.jpg (58.17 KiB) Viewed 2255 times


Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Tue Jul 26, 2016 1:06 am
by straightlight
The edit order statuses errors has been fixed into the Opencart v2.3 Beta release: http://forum.opencart.com/viewtopic.php?f=2&t=164930

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Tue Jul 26, 2016 1:16 am
by hpmon
I would totally jump on it if I weren't afraid certain extensions would stop working and I would have to rework the whole site. Is there anyway of fixing this issue without updating to the beta?

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Tue Jul 26, 2016 1:25 am
by straightlight
hpmon wrote:I would totally jump on it if I weren't afraid certain extensions would stop working and I would have to rework the whole site. Is there anyway of fixing this issue without updating to the beta?
Yes, by downloading the package and by manually comparing the files with either WinMerge or Beyond Compare tool.

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Tue Jul 26, 2016 1:27 am
by hpmon
like I said, I'm a big dummy and I really have no idea what I'm doing. I'm stumbling my way through and barely getting by.

Re: OpenCart 2.1.0.2 Edit Order Error Undefined [SOLVED]

Posted: Tue Jul 26, 2016 1:28 am
by straightlight
hpmon wrote:like I said, I'm a big dummy and I really have no idea what I'm doing. I'm stumbling my way through and barely getting by.
That is no problem. If you'd like someone to do this for you, you can always post a custom job request in the Commercial Support section of the forum.