Post by nguy » Thu Jan 26, 2017 10:38 am

Hello,

I get an "error undefined" when viewing order details in admin dashboard. This prevents me from updating order status and saving changes with 'add history' button. I narrowed it down to an SSL issue, but don't know where to go from there.

This is not a new issue, it's been ignored for a while, but now it's preventing the use of a new extension.

When I disable SSL on the store back-end admin side via config.php, everything works fine.

Questions:
1. How bad is it to just keep the SSL disabled for admin dashboard? (obv. this is the quick solution)
2. What could be causing this error? Possible real fix? See config below

Thank you for any help up front! :)

OC v. 2.1.0.1

Main Config:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.domain.com/store/');

// HTTPS
define('HTTPS_SERVER', 'https://www.domain.com/store/');
Admin Config:

Code: Select all

define('HTTP_SERVER', 'http://www.domain.com/store/admin/');
define('HTTP_CATALOG', 'http://www.domain.com/store/');

// HTTPS
define('HTTPS_SERVER', 'http://www.domain.com/store/admin/');
define('HTTPS_CATALOG', 'https://www.domain.com/store/');
htaccess

Code: Select all

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 Order deny,allow
 allow from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /store/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


Newbie

Posts

Joined
Thu Jan 26, 2017 10:19 am

Post by paulfeakins » Thu Jan 26, 2017 6:44 pm


For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by nguy » Fri Jan 27, 2017 3:09 am

paulfeakins wrote:Is this your issue?
viewtopic.php?f=190&t=157453&p=654850
YES! This does seem to fix it. I replied to your original post. I'm not sure how to change the store URL for new orders to include https in the store URL. I also don't need to force all of the front end store to be secure, just the key checkout/account pages.

Let me know. Thank you!!!!

Newbie

Posts

Joined
Thu Jan 26, 2017 10:19 am

Post by nguy » Mon Feb 06, 2017 8:42 am

Still having the same issue, any help?

Newbie

Posts

Joined
Thu Jan 26, 2017 10:19 am

Post by pipoy » Mon Feb 06, 2017 10:37 am

nguy wrote:Still having the same issue, any help?

Go to admin/controller/sale/order.php

Find

Code: Select all

$data['store_url'] = $order_info['store_url'];
and add this below it

Code: Select all

if( isset($_SERVER['HTTPS'] ) ) {
						$data['store_url'] = str_replace('http://','https://',$data['store_url']);
			}
I just saw this fix somewhere but I cannot remember where.
I use this bug fix for my 2.1.0.2

Active Member

Posts

Joined
Fri Mar 04, 2016 12:18 pm

Post by smit » Fri Apr 06, 2018 4:45 am

BRAVO. YOU ARE GENIUS. IT SOLVED MY STORE ISSUE AS WELL.

thanks & regards,
Smit
Unless you walk dream does not walk.


Newbie

Posts

Joined
Wed Jan 31, 2018 4:34 am

Post by smit » Fri Apr 06, 2018 4:50 am

but i can not edit an order. getting the same undefined popup. Any solution fro this?
Any help would be highly appreciated.

thanks & regards,
Smit
Unless you walk dream does not walk.


Newbie

Posts

Joined
Wed Jan 31, 2018 4:34 am

Post by escozul » Fri Apr 27, 2018 7:01 pm

Hello,

I see that this issue is appears for some time now.

I get this issue on my 3.0.2.0 OC installation.

Is there any fix that would work for that version?

Newbie

Posts

Joined
Wed Dec 13, 2017 9:57 pm

Post by nickthesail0r » Sun Jul 01, 2018 4:18 am

FOR ERROR UNDEFINED OPENCART 2.2.0.0 AFTER SSL INSTALLATION

Here is the solution
Go to
admin/controller/sale/order.php in line 850
change
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) :
to
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("https", "https", $order_info['store_url']) :

Newbie

Posts

Joined
Thu May 25, 2017 7:19 am

Post by FabTop » Tue Sep 11, 2018 4:36 am

nickthesail0r wrote:
Sun Jul 01, 2018 4:18 am
FOR ERROR UNDEFINED OPENCART 2.2.0.0 AFTER SSL INSTALLATION

Here is the solution
Go to
admin/controller/sale/order.php in line 850
change
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) :
to
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("https", "https", $order_info['store_url']) :
Thank you,
great solution for a tricky issue.

It works for my OC 2.2 SSL website
Regards

Newbie

Posts

Joined
Tue Jan 31, 2017 10:33 pm

Post by escozul » Tue Sep 11, 2018 11:40 pm

nickthesail0r wrote:
Sun Jul 01, 2018 4:18 am
FOR ERROR UNDEFINED OPENCART 2.2.0.0 AFTER SSL INSTALLATION

Here is the solution
Go to
admin/controller/sale/order.php in line 850
change
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) :
to
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("https", "https", $order_info['store_url']) :
Hello, does this work for OC 3.0.2.0?

Newbie

Posts

Joined
Wed Dec 13, 2017 9:57 pm

Post by straightlight » Wed Sep 12, 2018 12:00 am

escozul wrote:
Tue Sep 11, 2018 11:40 pm
nickthesail0r wrote:
Sun Jul 01, 2018 4:18 am
FOR ERROR UNDEFINED OPENCART 2.2.0.0 AFTER SSL INSTALLATION

Here is the solution
Go to
admin/controller/sale/order.php in line 850
change
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) :
to
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("https", "https", $order_info['store_url']) :
Hello, does this work for OC 3.0.2.0?
For OC v3.x releases, simply change all instances of http to https in your config.php and admin/config.php files.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 24 guests