Post by sergiubarbu » Tue Oct 20, 2015 9:59 pm

Hi

There is a BIG bug in the last version of OC 2.1.0.1 : I can't edit/modify the status of the order, or add a comment, when I use SSL!
If I deactivate SSL is working fine.
Any solution for this issue?

New member

Posts

Joined
Tue Jan 12, 2010 3:56 am

Post by Primatemc » Tue Oct 20, 2015 10:38 pm

I can,t edit too,
How desactive ssl?
I need make the test
Thank!

Newbie

Posts

Joined
Tue Jul 14, 2015 3:22 am

Post by sergiubarbu » Tue Oct 20, 2015 10:51 pm

Primatemc wrote:I can,t edit too,
How desactive ssl?
I need make the test
Thank!
From Settings

System - Settings - Stores - Edit your store - Server

New member

Posts

Joined
Tue Jan 12, 2010 3:56 am

Post by sergiubarbu » Fri Oct 23, 2015 8:35 pm

any solution for this issue?

somebody found a fix ?

New member

Posts

Joined
Tue Jan 12, 2010 3:56 am

Post by Lipper » Sun Nov 01, 2015 7:16 pm

Hi,

I can't edit/modify the status of the order, or add a comment, when I use SSL! If I deactivate SSL is working fine. Is any solution for this issue? My Opencart Version is 2.1.0.1

I hope someone can help me!!

Newbie

Posts

Joined
Sun Nov 01, 2015 7:12 pm

Post by herman2p » Tue Nov 03, 2015 9:37 am

I have same problem. Sysadmin made these comments & suggestions (I am not quite sure what to do).

Looks like there is a javascript error:

Blocked loading mixed active content "http://yoursite.com/index.php?route=api ... rder_id=18"
https://yoursite.com/admin/view/javascr ... 1.1.min.js
Line 4

Also, I was getting javascript popups with the error:

[Exception... "<no message>" nsresult: "0x805e0006 (<unknown>)" location: "JS frame :: https://yoursite.com/admin/view/javascr ... 1.1.min.js :: .send :: line 4" data: no]

[Exception... "<no message>" nsresult: "0x805e0006 (<unknown>)" location: "JS frame :: https://yoursite.com/admin/view/javascr ... 1.1.min.js :: .send :: line 4" data: no]

undefined

You might want to see if updating jquery separate from opencart would fix this. Jquery 2 is at 2.1.4 where opencart appears to use 2.1.1. However, you'll likely need to update themes and other such items to point to the updated file since it has 2.1.1 in the URL.

Newbie

Posts

Joined
Sat Oct 31, 2015 2:56 am

Post by keninorlando » Thu Nov 26, 2015 2:31 pm

My current version is: Version 2.1.0.1 on Apache

This is how I patched mine to get around this error:
While editing orders in the adming, you'll get an error message like this when viewing an order.
Exception... "<no message>" nsresult: "0x805e0006 (<unknown>)" location: "JS frame ::

Looks like the API user tries to login via HTTP while the browser is in HTTPS
in admin/view/template/sale/order_info.tpl you'll find this line:

$.ajax({
url: '<?php echo $store_url; ?>index.php?route=api/login',


It shows that it's using a variable called '$store_url , which is defined in: admin/controller/sale/order.php

In admin/controller/sale/order.php Find this line:

$data['store_url'] = $order_info['store_url'];

You'll notice it pulls the url from the order, and not from your browsing context.
I'm not sure if I'm over riding some other functionality, but I added this:

$data['store_url'] = $order_info['store_url'];
# add the following
if( isset($_SERVER['HTTPS'] ) ) {
$data['store_url'] = str_replace('http://','https://',$data['store_url']);
}


It just checks if you're in SSL mode and swaps the http for https

When I did that everything started working.

Newbie

Posts

Joined
Sat Feb 22, 2014 12:12 am

Post by webbouk » Fri Nov 27, 2015 4:49 am

Excellent - it seems to work very well

New member

Posts

Joined
Tue Oct 27, 2015 3:56 am

Post by bassam » Fri Nov 27, 2015 8:18 pm

Is there any solution for this issue? :'(

Newbie

Posts

Joined
Fri Nov 27, 2015 8:01 pm

Post by webbouk » Sat Nov 28, 2015 11:40 pm

The solution is three posts above this one

Just change one file as per the instructions

New member

Posts

Joined
Tue Oct 27, 2015 3:56 am

Post by Lipper » Sat Dec 12, 2015 6:49 pm

I got this to work all i did was edit my admin/config.php i added s


// HTTP
define('HTTP_SERVER', 'https://www./'); <---- I added the s
define('HTTP_CATALOG', 'https://www./'); <---- I added the s

// HTTPS
define('HTTPS_SERVER', 'https://www./');
define('HTTPS_CATALOG', 'https://www./');

I saved and refresh and works for me and i don't have to shut off and turn on my SSL anymore!

Newbie

Posts

Joined
Sun Nov 01, 2015 7:12 pm

Post by Lipper » Tue Dec 15, 2015 5:56 am

This worked for me!!!

In admin/controller/sale/order.php Find this line:

$data['store_url'] = $order_info['store_url'];

You'll notice it pulls the url from the order, and not from your browsing context.
I'm not sure if I'm over riding some other functionality, but I added this:

$data['store_url'] = $order_info['store_url'];
# add the following
if( isset($_SERVER['HTTPS'] ) ) {
$data['store_url'] = str_replace('http://','https://',$data['store_url']);
}

Newbie

Posts

Joined
Sun Nov 01, 2015 7:12 pm

Post by pm-netti » Thu Jan 07, 2016 6:37 pm

Lipper wrote:This worked for me!!!

In admin/controller/sale/order.php Find this line:

$data['store_url'] = $order_info['store_url'];

You'll notice it pulls the url from the order, and not from your browsing context.
I'm not sure if I'm over riding some other functionality, but I added this:

$data['store_url'] = $order_info['store_url'];
# add the following
if( isset($_SERVER['HTTPS'] ) ) {
$data['store_url'] = str_replace('http://','https://',$data['store_url']);
}
This Ocmod file to this issue.

Attachments


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by mlbracewell » Tue Feb 02, 2016 2:38 am

Unfortunately this fix did not work for me. Thanks for the effort though.

Newbie

Posts

Joined
Tue May 01, 2012 2:04 am

Post by swisslink » Wed Feb 03, 2016 4:41 am

OCMOD file fixed my issue on OC 2.1.0.1

New member

Posts

Joined
Tue Dec 08, 2015 4:40 am

Post by EvolveWebHosting » Wed Feb 03, 2016 6:47 am

pm-netti wrote:
Lipper wrote:This worked for me!!!

In admin/controller/sale/order.php Find this line:

$data['store_url'] = $order_info['store_url'];

You'll notice it pulls the url from the order, and not from your browsing context.
I'm not sure if I'm over riding some other functionality, but I added this:

$data['store_url'] = $order_info['store_url'];
# add the following
if( isset($_SERVER['HTTPS'] ) ) {
$data['store_url'] = str_replace('http://','https://',$data['store_url']);
}
This Ocmod file to this issue.
Thank you for this contribution. It fixed the issue in v2.1.0.2

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhosting.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by Rainforest » Sun Feb 07, 2016 4:12 am

Yesssss!!!
This worked for me, too! OC 2.1.0.2
Thanks a ton!

Self Taught Opencart User & Developer Since 2010.


User avatar
Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by apparelmaster » Mon Feb 22, 2016 9:22 pm

This worked perfectly for me, just this minute.

in the following folder "Order.php" as advised by other members find line: 853

admin>controller>sale>order.php

find code: on line 853 if using Dreamweaver and Notepad++

Code: Select all

$data['store_url'] = $order_info['store_url'];
add below it:
# add the following

Code: Select all

if( isset($_SERVER['HTTPS'] ) ) {
$data['store_url'] = str_replace('http://','https://',$data['store_url']);
}
This worked perfectly for me on the 22/02/2016. just done it 5 minutes ago.

Also check your SSL settings in the admin>config.php file
It may not be necessary for every user, but have a play with the HTTP Line 2, 3, 4 and define your Server and Catalogue as HTTPS instead of HTTP.

You will need to have a dedicated SSL Certificate installed on your server. Shared certificates "May/May Not" be enough, every hosting server is different.

Im using build: 2.1.0.2

Newbie

Posts

Joined
Mon Feb 22, 2016 9:11 pm

Post by Randem » Tue Feb 23, 2016 4:44 pm

This may help you also move forward - http://www.randemsystems.com/support/op ... d-to-know/

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Web Studio West » Thu Mar 03, 2016 1:49 am

Hey Lipper, Your post saved me hours of work! The bit of code below fixed the problem for me. Thanks again!

See Lipper's post above for the full instructions. I think it's number eleven from the top.
Lipper wrote: $data['store_url'] = $order_info['store_url'];
# add the following
if( isset($_SERVER['HTTPS'] ) ) {
$data['store_url'] = str_replace('http://','https://',$data['store_url']);
}

Web Studio West
Phoenix Website Design


User avatar

Posts

Joined
Fri Sep 09, 2011 12:12 am
Location - Scottsdale AZ USA
Who is online

Users browsing this forum: No registered users and 4 guests