VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: rlspencer on September 28, 2011, 05:24:06 AM

Title: How do you enable Https in VM2
Post by: rlspencer on September 28, 2011, 05:24:06 AM
I want to enable https for the shopping cart and I am not sure how?
Title: Re: How do you enable Https in VM2
Post by: jjk on September 28, 2011, 08:38:25 AM
In 'Configuration' - 'Shop' tab: Enable SSL for sensible areas (recommended) :-)
Title: Re: How do you enable Https in VM2
Post by: Awerso on September 28, 2011, 15:48:59 PM
I don't see that option.. Joomla 1.7.1 VM 2.0.0-RC-2G
Title: Re: How do you enable Https in VM2
Post by: jjk on September 28, 2011, 16:13:01 PM
see screenshot below:  8)

[attachment cleanup by admin]
Title: Re: How do you enable Https in VM2
Post by: Awerso on September 28, 2011, 19:06:42 PM
ok.. I don't see this.. When was this feature added? I'm using the most recent version, that's also what my virtuemart is saying..
Title: Re: How do you enable Https in VM2
Post by: jjk on September 28, 2011, 19:10:43 PM
I'm using the SVN version from the trunk. If this feature was added after RC1.9.8g release, just wait a few days for the next one - probably RC1.9.8.h
Title: Re: How do you enable Https in VM2
Post by: rlspencer on October 02, 2011, 04:06:55 AM
Yeah I also do not see this option. So when is the next update to be released?
Title: Re: How do you enable Https in VM2
Post by: Hammerhead on October 22, 2011, 22:05:44 PM
Don't know if this suggestion is of any help, but I just went to the Joomla Global Config panel, clicked on the 'server' tab and selected "Force SSL - Entire Site", which in my view has the benefit of also protecting the Admin control panel.  I stumbled across this solution when being hassled by Security Metrics related to PCI compliance.
Title: Re: How do you enable Https in VM2
Post by: Studio 42 on December 27, 2011, 11:38:14 AM
rlspencer,
Final vm2.0 is out and you have the option now for ssl
Title: Re: How do you enable Https in VM2
Post by: Dokho on December 28, 2011, 16:43:17 PM
Quote"In 'Configuration' - 'Shop' tab: Enable SSL for sensible areas (recommended)"


It's works!.  But if you want to continue shopping, the https will be in the next pages. We only need it in the sensible pages.
Title: Re: How do you enable Https in VM2
Post by: alatak on January 01, 2012, 14:32:00 PM
Hi,

QuoteIt's works!.  But if you want to continue shopping, the https will be in the next pages. We only need it in the sensible pages.

SSL is only used for the sensible pages.
When you are returnong to the shop, SSL is off.
Title: Re: How do you enable Https in VM2
Post by: Dokho on January 03, 2012, 13:49:40 PM
QuoteSSL is only used for the sensible pages.
When you are returnong to the shop, SSL is off.

I'm testing this, but still don't work, take this example : I buy something, i will go to the checkout, the https get Enable, but if I want to buy something more and I go to the product, the https don't go away.
Title: Re: How do you enable Https in VM2
Post by: alatak on January 03, 2012, 14:14:44 PM
Hi,

Did you configured Joomla also?
Title: Re: How do you enable Https in VM2
Post by: Dokho on January 03, 2012, 15:26:27 PM
Nope, Joomla only have the opcion : ALl entire site.

THanks for your quickly answer.
Title: Re: How do you enable Https in VM2
Post by: alatak on January 03, 2012, 15:50:05 PM
Hi,

Ok. I will check then :)
Title: Re: How do you enable Https in VM2
Post by: Dokho on January 03, 2012, 15:54:59 PM
Thanks  !  :D
Title: Re: How do you enable Https in VM2
Post by: Dokho on January 23, 2012, 17:44:05 PM
Hey Everyone !

Some notice about my question ?
Title: Re: How do you enable Https in VM2
Post by: gsullins on April 26, 2012, 05:47:53 AM
I too need a solution for the https to generally be prevented with rest of website, after the checkout (sensitive) area is visited.  It causes a problem with session ID - "add to cart" buttons stop working when you return shopping (with https).
Title: Re: How do you enable Https in VM2
Post by: dragonita on May 09, 2012, 11:11:26 AM
Quote from: alatak on January 03, 2012, 15:50:05 PM
Hi,

Ok. I will check then :)
Any solution for this? I have the same issue and my client pay a lot for a SSL that we can not use... Please help!
Also posted same issues with more people here:
http://forum.virtuemart.net/index.php?topic=100584.0

btw, when I use google chrome I do not get a green https on the checkout, Y get https with a cross on it...Google says that the certificate or some are not secure..... I´m lost...
Title: Re: How do you enable Https in VM2
Post by: willxiao0790 on May 31, 2012, 21:23:15 PM
Quote from: dragonita on May 09, 2012, 11:11:26 AM

btw, when I use google chrome I do not get a green https on the checkout, Y get https with a cross on it...Google says that the certificate or some are not secure..... I´m lost...

This can be some of your contents are insecure, for more detailed, all contents including links, files, images, etc must be starting with https

So, you better use relative url for content such as /shop/logo.png

You can use this http://www.whynopadlock.com/ to check which elements are insecure and try to fix them out.

Hope this help.
Title: Re: How do you enable Https in VM2
Post by: JohnHunter on June 05, 2012, 17:57:33 PM
This has been an issue for a short while, as it seems that there are soo many server configurations and versions of VM or Joomla variations...

This is what worked for me:

adding to you main Joomla! template just after the <head> tag before and css or .js loads

<?php if ((JRequest::getVar('option') == 'com_virtuemart' and JRequest::getVar('view') == 'user' || JRequest::getVar('view') == 'orders'  || JRequest::getVar('view') == 'cart'  )): ?>
<?php if($_SERVER['SERVER_PORT'] != '443') { header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); } ?>
<?php endif; ?>


<?php if ((JRequest::getVar('view') !== 'cart' )): ?>
<?php if ((JRequest::getVar('view') !== 'user' )): ?>
<?php if ((JRequest::getVar('view') !== 'orders'  )): ?>
<?php if($_SERVER['SERVER_PORT'] != '80') { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); } ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>

not really tested with SEF turned on (built in or add-on)
works for me with the latest (as of june 5th 2012)  Virtuemart 2.0.7.b  and Joomla! 2.5.4

the only problem I noticed, is when logged in (front-end) with the main super user, I'm brought to the vendor screen (as designed) and the vendor image does not load in ssl and causes the page to be insecure. not a problem as only the admin uses this page and can just click the "ok" button in IE insecure content popup (no pop in FF). This can probably be fixed by modifying the over-ride template in  /templates/YOURTEMPLATE/html/com_virtuemart/user

a quick and dirty way to get it done until someone creates a plugin that adjusts for this, otherwise -- try  "System - SSL Redirect"
http://extensions.joomla.org/extensions/site-management/url-redirection/11326
This worked in some instances and not in others, but see what works for your server configuration.
Unfortunately, this plugin also STAYS in SSL mode when going from ssl to other unrequired ssl pages, so try my above code if this plugin is not working the way it should.


Also, for my template code changes -- I've turned off "Enable SSL for sensitive areas (recommended) " in the VM config and let the above do the work.


Title: Re: How do you enable Https in VM2
Post by: PRO on June 05, 2012, 21:16:53 PM

Here we go, please test

http://www.kaizenmediaworks.com/virtuemart-2-0-redirect-back-to-http-plugin
Title: Re: How do you enable Https in VM2
Post by: JohnHunter on June 07, 2012, 04:51:27 AM
very nice, thank you...

your original plugin code works well turning things off while in the VM component category and product details pages,
but does not redirect from https to http when following the https menu links or module links back to other components or pages outside of VM component.
Below, I made only minor changes to your original code in virtuemartsslredirect.php

please test on your end,  my settings in VM are:     under configuration tab "shop" with "Enable SSL for sensitive areas (recommended)" checked on

this will remove ssl on all pages but VM "cart", "user" or "orders" views
and should redirect  all other back to non-ssl

============================= cut n' paste ================================================
<?php
// Banquet Tables Pro pay with a tweet @BanquetTables


$app = JFactory::getApplication();
   if (!$app->isAdmin()) {
$viewpage=JRequest::getVar('view');
if ( $viewpage!='cart' || $viewpage!='user'|| $viewpage!='orders'){
$uri = JURI::getInstance();
         $currentcheck = $uri->toString(array('scheme', 'host', 'port', 'path', 'query', 'fragment'));
         $comparethis = str_replace( 'https:', 'http:', $currentcheck );
      if ($comparethis !== $currentcheck){
       $app = JFactory::getApplication();
$app->redirect($comparethis, null, null, true, true);
       }   

}   
   }   

?>
============================= cut n' paste ================================================


the above change caused a weird thing, and now the VM pages no longer go into ssl when the above code is used
just me? please test....

Thank you for sharing

Title: Re: How do you enable Https in VM2
Post by: PRO on June 07, 2012, 13:05:49 PM
JohnHunter,
I do not know.

BUT: The logic of the way I wrote the plugin to only do category and product details is because you do NOT want extra code running on every single page on your website.
Its a performance issue. For my site, I am keeping it the way it is
Title: Re: How do you enable Https in VM2
Post by: DayCounts on August 26, 2013, 18:05:18 PM
Hey Guys,

Have you explored the possibility in Joomla 2.5 menus to force http or https for specific menu items?
Let's say you have a contact us page and it should remain non-secure, open the menu item pointing to it and in the meta data settings, seet the secure setting to 'off'.
even if you are on a secure page (let's say cart), the menu links pointing to the contact us page will be in http.
Title: Re: How do you enable Https in VM2
Post by: deneme03 on August 26, 2013, 21:08:10 PM
thanks
Title: Re: How do you enable Https in VM2
Post by: volksman3 on October 29, 2013, 02:14:00 AM
Hi All,

Been having the SSL issues people have mentioned here and i found this worked for me http://extensions.joomla.org/extensions/site-management/url-redirection/11326 allows redirection to SSL and back to SSL for selected pages, works with SEF URLs and VM2