Post by yarac » Sun Jun 17, 2012 11:51 am

Hi all,
I noticed if I go to a product/category page and change currency while being on the page, the product/category url address suddenly changed to HTTPS and has insecure content warning.

To see what I mean, try changing the currency on my site's category page here. http://www.ziccy.com/shoes

I know the facebook like box is the cause of the warnings but I thought SSL should only work on the login, account and checkout page, how do I fix the product and category pages to be only on HTTP even after currency change? I'm using 1.5.2.1
Last edited by yarac on Sun Jun 17, 2012 11:28 pm, edited 1 time in total.

New member

Posts

Joined
Thu Apr 12, 2012 12:24 pm

Post by Aladdin » Sun Jun 17, 2012 7:14 pm

I do have same problem and I have not solved it yet. Hopefully someone shows up with solution post.
I use same version 1.5.2.1

Regards
A.T

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by yarac » Tue Jun 19, 2012 11:13 am

Is there no solution to this? Is this a bug? Please help.

New member

Posts

Joined
Thu Apr 12, 2012 12:24 pm

Post by Aladdin » Tue Jun 19, 2012 3:51 pm

Hi,
Yes, I hope someone helps on this.
If someone is able to solve this issue with Rewrite in htaccess file, it would be great!, I mean to force HTTP on all pages except checkout and account pages. then problem solved!!
I managed to force HTTPS on checkout and account pages but have not yet solved with forcing HTTP on other pages.
I did on htaccess the following;

Code: Select all

# Force SSL non clean url
RewriteCond %{HTTPS} !=on
RewriteCond %{QUERY_STRING} ^(.*)(checkout/checkout|checkout/success|account)
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Regards
A.T

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by Avvici » Tue Jun 19, 2012 4:38 pm

Just for shits and giggles, open up /catalog/controller/module/currency.php and find this code:

Code: Select all

if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
				$connection = 'NOSSL';
			} else {
				$connection = 'SSL';
			}
Reverse the connection variable values like this:

Code: Select all

if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
				$connection = 'SSL';
			} else {
				$connection = 'NOSSL';
			}
Make sure it works with those pages that actually need to be SSL like checkout, register etc...

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by Aladdin » Tue Jun 19, 2012 4:50 pm

Thanks dude but it didn't work for me..same results. :s

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by Avvici » Tue Jun 19, 2012 5:16 pm

PMing you

For everyone else experiencing the same issue I will post a solution when it comes.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by JAY6390 » Tue Jun 19, 2012 7:51 pm

The above solution that Avvici has posted should work, however there is some code that's even simpler that you can use for this. Open up the file above again. Just before this line

Code: Select all

$this->data['redirect'] = $this->url->link($route, $url, $connection); 
put

Code: Select all

$connection = empty($_SERVER['HTTPS']) ? 'NONSSL' : 'SSL'; 
Be sure to check that the file gets saved once you make the change

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Aladdin » Tue Jun 19, 2012 8:31 pm

Thank you JAY6390, actually it works now!!!
Added your line code into both ../controller/module/currency.php and ../controller/module/language.php
and problem is now solved! ..no HTTPS anymore when currency/language change.

Regards
A.T

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by JAY6390 » Tue Jun 19, 2012 8:36 pm

Great. Out of interest, did you check that HTTPS pages work correctly maintaining HTTPS?

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Aladdin » Tue Jun 19, 2012 8:49 pm

Yup dude..
checkout/account/affilate pages work perfectly fine with this change.
I force HTTPS -htaccess- on these pages anyway. so all good. Thanks again

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by JAY6390 » Tue Jun 19, 2012 8:52 pm

ah ok cool

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Avvici » Tue Jun 19, 2012 9:22 pm

Das right, you my biatch doin the dirty work.. :-X

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by Qphoria » Wed Jun 20, 2012 8:34 am

avvici wrote:Das right, you my biatch doin the dirty work.. :-X
Fo sho!

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JAY6390 » Wed Jun 20, 2012 8:36 am

well someone's got to do some work around here ;)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 94 guests