close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Force the checkout.php page to http instead of https

Thread began 10/12/2011 1:34 pm by Rune Brynestad | Last modified 10/14/2011 12:01 pm by Jason Byrnes | 3056 views | 3 replies |

Rune Brynestad

Force the checkout.php page to http instead of https

I does not use any payment gateway, so my site does not make use of a SSL certificate. Nevertheless the checkout page try to access the https protocol.
To force the checkout.php page to use http instead of https, I have tested this 3 code blocks at line 1 one by one for the checkout.php page

<?php if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); ?>

<?php if(((isset($_SERVER['HTTPS']))) && ($_SERVER['HTTPS'] != "") || ($_SERVER['HTTPS'] == "on"))header("Location: http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); ?>

<?php
if((!(isset($_SERVER['HTTPS']))) || ($_SERVER['HTTPS'] == "") || ($_SERVER['HTTPS'] == "off")) {
header("Location: https://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
die();
}
?>

The checkout.php page is not redirected to http as expected.

Please help.

You can test my site on live URL here: www.totalweb.no

The site is translated to norwegian, but I think you should be able to find the exact buttons.

Regards
Rune

Sign in to reply to this post

Jason ByrnesWebAssist

in the webassist/plugins/shopping_cart/checkout_form.php file, change:

php:
if (empty($_SERVER['HTTPS'])) {

  $testRedirect = "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
  $c = curl_init();
  curl_setopt($c, CURLOPT_URL, $testRedirect);
  curl_setopt($c, CURLOPT_TIMEOUT, 90);
  curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 1);
  curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 1);
  $result = curl_exec($c);
  if ($result)  {
      header("location: ".$testRedirect);
      die();
  }
}



to:

php:
/*if (empty($_SERVER['HTTPS'])) {

  $testRedirect = "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
  $c = curl_init();
  curl_setopt($c, CURLOPT_URL, $testRedirect);
  curl_setopt($c, CURLOPT_TIMEOUT, 90);
  curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 1);
  curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 1);
  $result = curl_exec($c);
  if ($result)  {
      header("location: ".$testRedirect);
      die();
  }
}*/
Sign in to reply to this post

Rune Brynestad

Thanks for helping me on this.

I also have problems with foreign characters encoding under Billinginfo for the cart.php and checkout_success.php pages.

Rune Brynestad
Skårer Terrasse 13
1473 Lørenskog

should have been

Rune Brynestad
Skårer Tarrasse 13
1473 Lørenskog

The cart.php and checkout_success.php pages are the only files in Powerstore 4.5 I have this problem. I use

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

for all my pages. I also use utf-8 for my database connection and utf-8 as the database encoding type.

Regards
Rune

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...