Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.0.0 - SSL Issue, cannot edit orders #4347

Closed
xcentriq opened this issue May 9, 2016 · 21 comments
Closed

2.2.0.0 - SSL Issue, cannot edit orders #4347

xcentriq opened this issue May 9, 2016 · 21 comments

Comments

@xcentriq
Copy link

xcentriq commented May 9, 2016

Fresh installation of OC 2.2.0.0 and I get an SSL error when viewing orders.

[Exception... "" nsresult: "0x805e0006 ()" location: "JS frame :: https://www.MYWEBSITE.com/shop/admin/view/javascript/jquery/jquery-2.1.1.min.js :: .send :: line 4" data: no]

[Exception... "" nsresult: "0x805e0006 ()" location: "JS frame :: https://www.MYWEBSITE.com/shop/admin/view/javascript/jquery/jquery-2.1.1.min.js :: .send :: line 4" data: no]

undefined

What I've done:

  • Installed fresh OC 2.2.0.0 - No mods, no updates, just pure download from the website and install.
  • Edited "config.php" and "admin/config.php"
  • Enabled SSL in store settings/server
  • Create new order on front end and using guest check out
  • Go into Admin panel, Sales -> Orders -> View Orders - At this point a popup with the error above comes up.

I've tried the following:

  • Using Softaculous installer in Cpanel
  • Installing manually from downloading from OC website
  • Enabled SSL in store settings/server
  • Disabled SSL in store settings/server
  • Disable ALL SSL https protocols from settings, config.php and admin/config.php (no error above but I get this API error: ** Warning: You do not have permission to access the API!**)

What I think it is:

  • While all is SSL enabled and in HTTPS protocol, on the order details page, when viewing source code, I found 3 instances of HTTPSS, rather than HTTPS.
  • While all SSL and HTTPS is disabled, on the same order detail page, now with the API issue, source code shows "HTTPS" in the same instances where "HTTPSS" was.

Something is causing the extra "S" when SSL is not enabled, and when it is, enabling SSL mode adds another "S", resulting in HTTPSS.

Please address this issue ASAP. My store is on hold from being released to do business.

@pekka2
Copy link

pekka2 commented May 9, 2016

Hi, how is your config.php HTTPS_SERVER, http:// or https:// ?
When it is 'http://' and SSL add 'S', it is work?

@xcentriq
Copy link
Author

xcentriq commented May 9, 2016

Admin/config.php

// HTTP
define('HTTP_SERVER', 'https://www.mysite.com/shop/admin/');
define('HTTP_CATALOG', 'https://www.mysite.com/shop/');

// HTTPS
define('HTTPS_SERVER', 'https://www.mysite.com/shop/admin/');
define('HTTPS_CATALOG', 'https://www.mysite.com/shop/');

config.php

// HTTP
define('HTTP_SERVER', 'https://www.mysite.com/shop/');

// HTTPS
define('HTTPS_SERVER', 'https://www.mysite.com/shop/');

@pekka2
Copy link

pekka2 commented May 9, 2016

Can you change to:
// HTTP
define('HTTP_SERVER', 'http://www.mysite.com/shop/');

// HTTPS
define('HTTPS_SERVER', 'http://www.mysite.com/shop/');

@xcentriq
Copy link
Author

xcentriq commented May 9, 2016

Tried that, issue still persists.

@pekka2
Copy link

pekka2 commented May 9, 2016

@xcentriq
You mean, that it yet add connect 'httpss://' ??

@xcentriq
Copy link
Author

xcentriq commented May 10, 2016

Yes, with HTTP, the page source code still shows HTTPS.

Line 274:
<td><a href="httpss://www.mysite.com/shop/" target="_blank">Your Store</a></td>

Line 669-671:

// Login to the API
$.ajax({
url: 'httpss://www.mysite.com/shop/index.php?route=api/login',

Line 718:
url: 'httpss://www.mysite.com/shop/index.php?route=api/order/history&token=' + token + '&order_id=1',

@pekka2
Copy link

pekka2 commented May 10, 2016

Your store url from table order start 'https'?
Can you test, how this mod to file admin/controller/sale/order.php to line 851-853 is work:

if( $this->server['HTTPS'] && substr($order_info['store_url'],0,5) !='https' ){
               $data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];
 } elseif ( !$this->server['HTTPS'] ){
               $data['store_url'] = str_replace('https:', 'http:', $order_info['store_url']);
} else {
               $data['store_url'] = $order_info['store_url'];
}

@pekka2
Copy link

pekka2 commented May 10, 2016

#4353

@demartini
Copy link

This solved my problem: #3536

@mike222taylor
Copy link

Hi,
still issue exist.

i am trying all above code but issue still persist in opencart version 2.2.0.0.

if( $this->server['HTTPS'] && substr($order_info['store_url'],0,5) !='https' ){
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];
} elseif ( !$this->server['HTTPS'] ){
$data['store_url'] = str_replace('https:', 'http:', $order_info['store_url']);
} else {
$data['store_url'] = $order_info['store_url'];
}

order_edit_issue

@mike222taylor
Copy link

can anybody help me??

@mike222taylor
Copy link

mike222taylor commented Oct 25, 2016

@pekka2
can you help me.
i am stuck on this issue after upgrading sites from version 1.5.6 to 2.2.0.0

please help me..

@coder480
Copy link

coder480 commented Nov 4, 2016

Mike222, I have the OC 2.2 and I have the same problem did you ever solve anyone can help please

@danielkerr
Copy link
Member

this is an old issue that has already been fixed for 2.2.0 try 2.2.3

@coder480
Copy link

coder480 commented Nov 5, 2016

On Fri, Nov 4, 2016 at 8:52 PM, Daniel Kerr notifications@github.com
wrote:

2.2.3

​my OC is 2.2... I can't really update as my theme is on 2.2​

Thanks and regards,

Adam Nguyen

@danielkerr
Copy link
Member

you should only need to rep[lace parts of the code with the latest vewrsion
i dont think there were any big changes in between files

@coder480
Copy link

coder480 commented Nov 5, 2016

Do you know if there was a database change can I just overwrite all the
file to update to 2.3 from 2.2
thank you

Thanks and regards,

Adam Nguyen

On Fri, Nov 4, 2016 at 9:41 PM, Daniel Kerr notifications@github.com
wrote:

you should only need to rep[lace parts of the code with the latest vewrsion
i dont think there were any big changes in between files


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#4347 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWMP9WK65u8RmJ5p8z5GyvXi66DwtYKAks5q7AjtgaJpZM4IZ1Yc
.

@coder480
Copy link

coder480 commented Nov 5, 2016

I am getting this error. even after I have update my cs to 2.3 I can't
figure out why. Please help me

Thanks and regards,

Adam Nguyen

On Fri, Nov 4, 2016 at 10:01 PM, Adam Nguyen coder480@gmail.com wrote:

Do you know if there was a database change can I just overwrite all the
file to update to 2.3 from 2.2
thank you

Thanks and regards,

Adam Nguyen

On Fri, Nov 4, 2016 at 9:41 PM, Daniel Kerr notifications@github.com
wrote:

you should only need to rep[lace parts of the code with the latest
vewrsion
i dont think there were any big changes in between files


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#4347 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWMP9WK65u8RmJ5p8z5GyvXi66DwtYKAks5q7AjtgaJpZM4IZ1Yc
.

@mike222taylor
Copy link

Hello Deniel Kerr,

Make sure that this admin can change order edit from admin panel in live
site when i will use opencart version 2.2.3

On Sat, Nov 5, 2016 at 9:22 AM, Daniel Kerr notifications@github.com
wrote:

this is an old issue that has already been fixed for 2.2.0 try 2.2.3


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#4347 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AV9og-SUMn5FxE5EsYVBtzarpD0z8HqQks5q6_2GgaJpZM4IZ1Yc
.

@sfaragy
Copy link

sfaragy commented Aug 9, 2017

<iframe src="https://www.youtube.com/embed/SHwzJ7rI6Zk" width"500" height"200"></iframe>

Please visit http://opencartprogrammer.com/

And then contact us.
We have real solution. We have ready module that will help you to edit your order.

@fyoozr
Copy link

fyoozr commented Nov 15, 2017

I solve this by modifying line 850 in admin/controller/sale/order.php file.

I just removed s from str_replace(https) in the following line:

$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];

Instead of str_replace("http", "https" ... i put
str_replace("http", "http"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants