Post by reginamor » Fri Apr 21, 2017 6:39 am

Hi! i've installed a ssl certificate on my domain, and when i enter to the old orders apears the famous "error undefined" message and i can't modify the old orders.
I've read a lot of topics with similiar problems, but with old opencarts versions, any way i've made all the suggetions that i found, but still apears that error.
Any sugetion to 2.3 opencart version?
Last edited by reginamor on Sun Apr 23, 2017 8:01 pm, edited 1 time in total.

User avatar
Newbie

Posts

Joined
Wed Sep 21, 2011 4:44 am

Post by artcore » Fri Apr 21, 2017 3:33 pm

Yes Daniel built in many Easter Eggs ;D
This egg has to do with orders being saved with the url at that time. So with http:// if you weren't using ssl.
Either change the database entries at oc_order, column 'store_url' or change admin>controller>sale>order.php

Code: Select all

if ($order_info['store_id'] == 0) {
				$data['store_url'] = $this->request->server['HTTPS'] ? HTTPS_CATALOG : HTTP_CATALOG;
			} else {
				$data['store_url'] = $order_info['store_url'];//probably strreplace http with https here if you use multi-store
			}
Hopefully that helps you, I can't remember if I made any other changes for this error when I ran into it.

User avatar
Newbie

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by reginamor » Fri Apr 21, 2017 8:05 pm

no, it dosen't works :-[
The strange thing that i've found, it's that the store url link do not apears with the http, only starts with www
In my other store (with 2.2 version) apears the http in front

Attachments

captura2.png

captura2.png (20.22 KiB) Viewed 214 times

Captura.JPG

Captura.JPG (27.92 KiB) Viewed 215 times


User avatar
Newbie

Posts

Joined
Wed Sep 21, 2011 4:44 am

Post by reginamor » Sat Apr 22, 2017 10:07 pm

also i had problem with the new orders... someone can help me?

User avatar
Newbie

Posts

Joined
Wed Sep 21, 2011 4:44 am

Post by reginamor » Sat Apr 22, 2017 10:31 pm

i found this another code, this work with the url of the store, but still apears the error, idon't know if i have to change anthing else

Code: Select all

if ($this->request->server['HTTPS']) {
            $data['store_url'] = str_replace('http://', 'https://', $order_info['store_url']);
        } else {
            $data['store_url'] = $order_info['store_url'];
        }

Attachments

captura3.png

captura3.png (14.9 KiB) Viewed 190 times


User avatar
Newbie

Posts

Joined
Wed Sep 21, 2011 4:44 am

Post by artcore » Sun Apr 23, 2017 2:12 am

Hi Regina,
I doublechecked for you. That fix I posted turned out, was for 2.2
2.3 is working fine on ssl with or without an old saved store url having http.
Maybe if you turn on error display in system>settings>store you can see what the issue actually is.

By the way
Make sure you have a redirect in your htaccess to your domain either with www or without www
I posted an example a few times for this, if you want to search; look for my posts for the past few days

User avatar
Newbie

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by reginamor » Sun Apr 23, 2017 7:21 am

yes, i've read a lot of post of 2.2 and said that install the 2.3 version (that the reason that i've intalled)
But apears that error and i dn't know why
I have activated show the errors, but don't show any error on the page or in the log, only shows the pop up of "error undefined" ad i can't modify the order, olers or newers
I don't know what to do

i had www and https redirect on my htacces file

User avatar
Newbie

Posts

Joined
Wed Sep 21, 2011 4:44 am

Post by reginamor » Sun Apr 23, 2017 8:00 pm

i found this solution in the forum and it's works. I've only modified the admin config.php

Modify from
define('HTTP_SERVER', 'http://www.URL.com/admin/');
define('HTTP_CATALOG', 'http://www.URL.com/');

define('HTTPS_SERVER', 'https://www.URL.com/admin/');
define('HTTPS_CATALOG', 'https://www.URL.com/');
To
define('HTTP_SERVER', '/admin/');
define('HTTP_CATALOG', '/');

define('HTTPS_SERVER', '/admin/');
define('HTTPS_CATALOG', '/');

User avatar
Newbie

Posts

Joined
Wed Sep 21, 2011 4:44 am
Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 29 guests