Page 1 of 2

I can't edit/mody orders (with SSL)after update to 2.1.1.0

Posted: Tue Oct 20, 2015 9:59 pm
by sergiubarbu
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?

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Tue Oct 20, 2015 10:38 pm
by Primatemc
I can,t edit too,
How desactive ssl?
I need make the test
Thank!

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Tue Oct 20, 2015 10:51 pm
by sergiubarbu
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

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Fri Oct 23, 2015 8:35 pm
by sergiubarbu
any solution for this issue?

somebody found a fix ?

I can't edit/mody orders (with SSL) with opencart 2.1.0.1

Posted: Sun Nov 01, 2015 7:16 pm
by Lipper
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!!

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Tue Nov 03, 2015 9:37 am
by herman2p
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.

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Thu Nov 26, 2015 2:31 pm
by keninorlando
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.

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Fri Nov 27, 2015 4:49 am
by webbouk
Excellent - it seems to work very well

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Fri Nov 27, 2015 8:18 pm
by bassam
Is there any solution for this issue? :'(

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Sat Nov 28, 2015 11:40 pm
by webbouk
The solution is three posts above this one

Just change one file as per the instructions

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Sat Dec 12, 2015 6:49 pm
by Lipper
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!

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Tue Dec 15, 2015 5:56 am
by Lipper
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']);
}

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Thu Jan 07, 2016 6:37 pm
by pm-netti
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.

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Tue Feb 02, 2016 2:38 am
by mlbracewell
Unfortunately this fix did not work for me. Thanks for the effort though.

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Wed Feb 03, 2016 4:41 am
by swisslink
OCMOD file fixed my issue on OC 2.1.0.1

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Wed Feb 03, 2016 6:47 am
by EvolveWebHosting
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

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Sun Feb 07, 2016 4:12 am
by Rainforest
Yesssss!!!
This worked for me, too! OC 2.1.0.2
Thanks a ton!

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Mon Feb 22, 2016 9:22 pm
by apparelmaster
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

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Tue Feb 23, 2016 4:44 pm
by Randem
This may help you also move forward - http://www.randemsystems.com/support/op ... d-to-know/

Re: I can't edit/mody orders (with SSL)after update to 2.1.1

Posted: Thu Mar 03, 2016 1:49 am
by Web Studio West
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']);
}