Post by mstone » Sat Oct 22, 2011 3:58 am

I'm trying to use a SSL certificate with 1.5.1.3 and I am having a problem:

config.php

Code: Select all

define('HTTP_SERVER', 'https://www.yourcompany.com/shop/');
define('HTTP_IMAGE', 'https://www.yourcompany.com/shop/image/');
define('HTTP_ADMIN', 'http://www.yourcompany.com/shop/admin/');

// HTTPS
define('HTTPS_SERVER', 'https://www.yourcompany.com/shop/');
define('HTTPS_IMAGE', 'https://www.yourcompany.com/shop/image/');

First I didn't have the https in the first two lines and although it would switch to the https mode on check out, the check out page was broken. If I put the the "s" in the first two lines everything works but the whole site in running in secure.

Furthermore when the home page loads it is not automatically in the secure mode and the add to cart buttons do not work for the featured items. Once you add the "s" to the url it works. I think the problem is in the code that decides when to run in secure and if the script loads in secure mode. Not sure. For now I'm going to fix it by hard coding a force to secure if not in https mode. This needs to be fixed though because referring links don't always have the "s" in the url.
Last edited by i2Paq on Sun Oct 23, 2011 12:21 am, edited 1 time in total.
Reason: Split, renamed and moved

Newbie

Posts

Joined
Sat Oct 22, 2011 3:22 am

Post by Xsecrets » Sat Oct 22, 2011 4:03 am

mstone wrote:I'm trying to use a SSL certificate with 1.5.1.3 and I am having a problem:

config.php

Code: Select all

define('HTTP_SERVER', 'https://www.yourcompany.com/shop/');
define('HTTP_IMAGE', 'https://www.yourcompany.com/shop/image/');
define('HTTP_ADMIN', 'http://www.yourcompany.com/shop/admin/');

// HTTPS
define('HTTPS_SERVER', 'https://www.yourcompany.com/shop/');
define('HTTPS_IMAGE', 'https://www.yourcompany.com/shop/image/');

First I didn't have the https in the first two lines and although it would switch to the https mode on check out, the check out page was broken. If I put the the "s" in the first two lines everything works but the whole site in running in secure.

Furthermore when the home page loads it is not automatically in the secure mode and the add to cart buttons do not work for the featured items. Once you add the "s" to the url it works. I think the problem is in the code that decides when to run in secure and if the script loads in secure mode. Not sure. For now I'm going to fix it by hard coding a force to secure if not in https mode. This needs to be fixed though because referring links don't always have the "s" in the url.
well you never explained what the checkout didn't work meant. You are not supposed to put the s on the HTTP_ stuff only on the HTTPS stuff and let the cart work it out. The only places that need to be secured are the checkout and the login, and they are both secured by default when you configure it correctly. As far as external links there shouldn't be any external links to your checkout or login pages.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by mstone » Sat Oct 22, 2011 8:15 am

Xsecrets wrote:
well you never explained what the checkout didn't work meant. You are not supposed to put the s on the HTTP_ stuff only on the HTTPS stuff and let the cart work it out. The only places that need to be secured are the checkout and the login, and they are both secured by default when you configure it correctly. As far as external links there shouldn't be any external links to your checkout or login pages.
Not working means it does not work. The steps are supposed to expand open and would not. You could not check out. For me it would not work if SSL was enabled as you recommended. It worked if there was no https in the config and SSL was off. Of course that is useless since we need https. With the https only on the second part of the config and SSL on, it would not let you checkout and you could not add to cart from the home page featured items. I don't know how to be more clear about that.

Once I made all the urls https the checkout started working but the home page items could not be added to cart unless the home page was in the secure mode which it wasn't by default because it was being linked from an external source without the "s". I have looked at the code in index.php with respect to ... if (isset($_SERVER['HTTPS'] and that is a total mess. That is not how it is should be done especially with php 5.3 which should use ...if (!empty($_SERVER['HTTPS'] .... Something is broken with respect to a script as is indicated with fire bug turned on... blah, blah blah is not a function....but because the whole application is unnecessarily complex it is taking a while to find where the error is. Everything worked before upgrading.

I'm ok for now as I have added some code that forces the entire site into https mode.

Thanks for your help.

Newbie

Posts

Joined
Sat Oct 22, 2011 3:22 am

Post by Daniel » Sat Oct 22, 2011 10:33 pm

mstone wrote:I'm trying to use a SSL certificate with 1.5.1.3 and I am having a problem:

config.php

Code: Select all

define('HTTP_SERVER', 'https://www.yourcompany.com/shop/');
define('HTTP_IMAGE', 'https://www.yourcompany.com/shop/image/');
define('HTTP_ADMIN', 'http://www.yourcompany.com/shop/admin/');

// HTTPS
define('HTTPS_SERVER', 'https://www.yourcompany.com/shop/');
define('HTTPS_IMAGE', 'https://www.yourcompany.com/shop/image/');

First I didn't have the https in the first two lines and although it would switch to the https mode on check out, the check out page was broken. If I put the the "s" in the first two lines everything works but the whole site in running in secure.

Furthermore when the home page loads it is not automatically in the secure mode and the add to cart buttons do not work for the featured items. Once you add the "s" to the url it works. I think the problem is in the code that decides when to run in secure and if the script loads in secure mode. Not sure. For now I'm going to fix it by hard coding a force to secure if not in https mode. This needs to be fixed though because referring links don't always have the "s" in the url.

if your using shared ssl it won't work. its not supposed to. that's why your add to cart button is not working because its a different domain.

is that right? did you just happen to forget to tell us this obvious reason.

if you have dones some customization in the opencart template and a insecure message is appearing its because you have done somethiogn wrong.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Sat Oct 22, 2011 10:37 pm

mstone wrote: blah, blah blah is not a function....but because the whole application is unnecessarily complex it is taking a while to find where the error is. Everything worked before upgrading.

"because the whole application is unnecessarily complex"

really i would like to see you write a a onepage checkout system that was not complex.

IDIOT!

opencart is the most well programmed cart out!

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by mstone » Sat Oct 22, 2011 11:34 pm

Daniel wrote:
if your using shared ssl it won't work. its not supposed to. that's why your add to cart button is not working because its a different domain.

is that right? did you just happen to forget to tell us this obvious reason.

if you have dones some customization in the opencart template and a insecure message is appearing its because you have done somethiogn wrong.
It is not a shared certificate. Don't worry Daniel, I'll figure it out on my own. With all the mistakes you introduced with this release you certainly have a lot of balls claiming your software to be the best. When you start with the name calling it only serves to further diminish your credibility.

Newbie

Posts

Joined
Sat Oct 22, 2011 3:22 am

Post by Daniel » Sun Oct 23, 2011 12:28 pm

i said well programmed.the structure of the code is easy to understand.

ssl works on this guys site fine:

http://www.kupuvajoddoma.com

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 10 guests