Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to make Add to Cart button SSL


josh1r

Recommended Posts

Hi.  I've been busy trying to make my site fully SSL-friendly.  One of the last issues I'm having is that the Add to Cart button is not SSL, and I don't know how to change it.  

I believe the relevant code in the product_info.php file is this:

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>

How do I make that generate an https:// url?   

Currently it's generating:  <form name="cart_quantity" action="http://www.mydomain.com/productname-2222.html?action=add_product" method="post">

I can't figure out hot to get an "s" in there...

Thanks!

Link to comment
Share on other sites

The easy way to do this is to use the HTML rewrite rules for your particular Web server and OS. This will redirect all http://.... requests into the equivalent https://.... request. The way to do this will vary for different software configurations, but it's often as easy as ticking a single option box in the server configuration area. In my case I also changed the URL's in the includes/configure.php file so that both paths to the site (ie, both HTTP_SERVER and HTTPS_SERVER) used the https: syntax rather than http:, and also set all of the rest of the links in that file to point to the same places for files and cookies. After doing all that I appear to have caught all of the major ways to get an internal reference to an http: URL on my site, and even if I've missed some they'll still get redirected to https.

All of this is now vastly easier than the bad old days when https was limited to protecting only one site per IP address.

Hope that helps.

Bruce

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...