View Full Version : PowerStore SSL Checkout
Jason Kline
06-24-2009, 07:06 PM
I am ready to go live with my PowerStore. How do I configure the PowerStore checkout process to use SSL encryption? I tried changing the following code in cart.php:
//WA eCart Redirect Check Out
if (isset($_POST["WA_Store_Cart_Checkout"]) || isset($_POST["WA_Store_Cart_Checkout_x"])) {
$Redirect_redirStr="checkout.php";
********** change to *********
//WA eCart Redirect Check Out
if (isset($_POST["WA_Store_Cart_Checkout"]) || isset($_POST["WA_Store_Cart_Checkout_x"])) {
$Redirect_redirStr="https://mydomain.com/store/checkout.php";
This works but keeps you in SSL encryption mode until you close the browser.
Ray Borduin
06-25-2009, 08:00 AM
Right... when would you like to go out of ssl encryption? At that point send them back just like you got them there in the first place this time using http://. You control when and where you send someone to and from your ssl site by specifying it in the link.
warrenphillips25336771
09-07-2009, 02:02 PM
Right... when would you like to go out of ssl encryption? At that point send them back just like you got them there in the first place this time using http://. You control when and where you send someone to and from your ssl site by specifying it in the link.
how do you do that then ray? and where?
Ray Borduin
09-08-2009, 03:00 PM
Any time you specify a redirect page or have a link to another page you have the opportunity to change to or from an https:// location. When would you like to return someone to the http:// version? On the receipt page? Linking from the receipt page?
That is where you would update the navigation.
morc.mzw383871
10-19-2009, 08:21 AM
Hi,
How do we redirect the entire powerstore from "http://" to "https://"?
I tried changing it in the WA_Global.php (to "https://")but when I click on my website "www.xyz.com", it still show http://.
Please advise. Thank you
Ray Borduin
10-19-2009, 11:23 AM
When do you want to?
Always? A mod rewrite in your .htaccess might be the best route:
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
or you could probably add code to your globals file to do it with php like:
if($_SERVER['HTTPS'] != 'on'){
$url = "https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
header("location: ".$url);
}
morc.mzw383871
10-19-2009, 07:20 PM
Hi,
1. How do we implement option (a), e.g. create the .htaccess file?
2. How do we implement option (b), global files? I wrote those lines in the WA_Globals.php and upload the file. The error message is "Parse error: syntax error, unexpected '{' in D:\Hosting\3905780\html\WA_Globals\WA_Globals.php on line 13"
3. Which option is optimal/better?
Thank you. Please advise.
Ray Borduin
10-20-2009, 07:54 AM
Here is a tutorial I found that talks about .htaccess:
http://www.freewebmasterhelp.com/tutorials/htaccess/
Are you sure you copied the code I gave correctly? It sounds like you missed something... post lines 1-13 of that file here and I can try to spot the problem.
3) mod-rewrite is probably better, but it is 6 of one and half a dozen of the other. It is worth investigating the mod-rewrite concept, so maybe number 1 is worth doing for the experience alone. 2 is probably easier, so really it is up to you.
morc.mzw383871
10-20-2009, 08:30 PM
Hi,
1. Tried .htaccess method but to no avail.
2. The code line 1-15:
$WAGLOBAL_Root_URL = "http://www.xxxxxx.com/" ;
$WAGLOBAL_Site_Name = "xxxxxxx" ;
$WAGLOBAL_Address = "xxxxx Center Blvd";
$WAGLOBAL_City = "New York City";
$WAGLOBAL_State = "NY";
$WAGLOBAL_Zip = "11109";
$WAGLOBAL_Country = "US";
$WAGLOBAL_GoogleAPIKey = "ABQIAAAAbrDo7RkoC8-w_3CWMPTV4BSOJpghMGQ8yTCQ5uInKAzgbZ0gmhTzjWM_GcEQp 7saeZe5JstiKJChcw";
$WAGLOBAL_localRoot = "/NurtureStore/";
$WAGLOBAL_remoteRoot = "/";
if($_SERVER['HTTPS'] != 'on'){
$url = "https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
redirect($url);
}
Is there anything wrong with the code?
Thanks.
Ray Borduin
10-21-2009, 10:23 AM
instead of:
redirect($url);
it should be:
header("location: ".$url);
and you should probably update:
$WAGLOBAL_Root_URL = "http://www.xxxxxx.com/" ;
to:
$WAGLOBAL_Root_URL = "https://www.xxxxxx.com/" ;
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.