Remove SSL from cart page

hi,

can somebody give me a clue how to remove SSL from the cart page (not from checkout)? I want to do it because when hit add to cart my customers go there but page is very slow due to SSL. There is no sensitive data on this page, so we don’t need SSL there?

Thanks

First I would figure out what’s slow. Shouldn’t be noticable with a reasonable internet connection… My guess is you have some other issue going on.

Yes, I have. My version is 2.08 and I really don’t know how to speed up this damned cart - smarthoptimizer messed my css and java (I am not sure but it can be related with my host which doesn’t allow mod_deflate and gzip), zeke’s caching method gives me fatal error, I can’t afford webo right now…Pingdom gives me 22 s on the cart page and 25 s on checkout which is too much.

I’ll appreciate any help.




Please answer the following questions so we can get an idea of what you have:

  1. How many products?
  2. Do you use filters? Features?
  3. What is your traffic (visits/day)?



    If you get errors from the PDOsqlite registry, please post them. I run that and don’t have any issues other than it doesn’t write through correctly so more cache clears are necessary than should be.



    I would NOT use any of the 3rd party optimizers unless/until you get the basic cart running properly. Trying to optimize something that has problems will only optimize the problems, not provide a solution.

To make it so your cart page is not https do the following:


  1. Open the file “/core/fn.control.php”


  2. Find the following code:


// if we are not on https but controller is secure, redirect to https
if (isset($secure_controllers[CONTROLLER]) && $secure_controllers[CONTROLLER] == 'active' && !defined('HTTPS')) {
fn_redirect(Registry::get('config.https_location') . '/' . Registry::get('config.current_url'));
}

// if we are on https and the controller is insecure, redirect to http
if (!isset($secure_controllers[CONTROLLER]) && defined('HTTPS')) {
fn_redirect(Registry::get('config.http_location') . '/' . Registry::get('config.current_url'));
}




Change it to:



// if we are not on https but controller is secure, redirect to https
if (isset($secure_controllers[CONTROLLER]) && $secure_controllers[CONTROLLER] == 'active' && !defined('HTTPS') && MODE != 'cart') {
fn_redirect(Registry::get('config.https_location') . '/' . Registry::get('config.current_url'));
}

// if we are on https and the controller is insecure, redirect to http
if ((!isset($secure_controllers[CONTROLLER]) || (CONTROLLER == 'checkout' && MODE == 'cart')) && defined('HTTPS')) {
fn_redirect(Registry::get('config.http_location') . '/' . Registry::get('config.current_url'));
}




Note: I did this on my version, 2.0.15. As long as the initial code is the same in 2.1.x you should be fine. If it is different it shouldn’t be difficult to fix it to work the same as my above code. All it does it add an exception for the cart mode of the checkout controller. During updates this code will have to be manually updated.

thank u, adodric. works like a charm :smiley: