Marketpress and SSL/HTTPS

Hello,

I have set up my Marketpress Pro to work perfectly in my site (single site; no multisite or anything fancy like that). I have an SSL certificate that I purchsed through my hosting provider. My question is as follows:

Does Marketpress have a way to use the SSL certificate for just the store pages? If not, is there a way to make my whole site use HTTPS? I am new to Wordpress and Marketpress, so I am on a steep learning curve.

Thank you for your help!

  • bigmantenor
    • WPMU DEV Initiate

    OK, I did some more digging and installed the Wordpress HTTPS plugin. I was able to check the "Force SSL" button on the "Store" page, but the other pages that I want this applied to ("Products", "Shopping Cart", and "Order Status") are still not forcing HTTPS. These pages exist, but are not under the "Pages" tab (only "Store" is). How can I get the rest of these pages to encrypt???

  • aecnu
    • WP Unicorn

    Greetings bigmantenor,

    OK, I did some more digging and installed the Wordpress HTTPS plugin. I was able to check the "Force SSL" button on the "Store" page, but the other pages that I want this applied to ("Products", "Shopping Cart", and "Order Status") are still not forcing HTTPS. These pages exist, but are not under the "Pages" tab (only "Store" is). How can I get the rest of these pages to encrypt???

    Thank you for this great question and I believe I have a great answer.

    Please put the below code in the theme header.php file right at the very top but underneath the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> statement if it exists:

    <?php if($_SERVER["HTTPS"] != "on") {
       header("HTTP/1.1 301 Moved Permanently");
       header("Location: https://&quot; . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
       exit();
    } ?>

    Please let me know if this works for you.

    Cheers, Joe :slight_smile:

  • bigmantenor
    • WPMU DEV Initiate

    aecnu,

    Thank you for the help, but this did not work. Now when I go to the site, the site itself won't even load. Here is what I did:

    <?php
    /**
     * @package Scrappy
     */
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <?php if($_SERVER["HTTPS"] != "on") {
       header("HTTP/1.1 301 Moved Permanently");
       header("Location: https://&quot; . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
       exit();
    } ?>

    Was this the correct placement?

  • aecnu
    • WP Unicorn

    Greetings bigmantenor,

    Yes that is the correct placement and I tested it before sending it to you on our production server.

    Can you please try deactivating the Wordpress HTTPS plugin and give it a test?

    Possibly they are conflicting?

    In addition, which theme are you using? Grid Market?

    Cheers, Joe :slight_smile:

  • bigmantenor
    • WPMU DEV Initiate

    OK, I deactivated WordPress HTTPS plugin and it still did not work. It is the same as before, wherein I attempt to access the site and am faced with a blank screen (no 404 errors or anything). The theme I am using is called "Scrappy"; it was a free theme that I chose because it goes well with the site I am making (a knitting site). Should I try moving this bit of code to a different spot in the "header.php" file?

  • aecnu
    • WP Unicorn

    Greetings bigmantenor,

    Why certainly - the place I had suggested was exactly where I had it placed when I ran my test.

    Is this by any chance on a sub-domain?

    This script is specific to a root domain install and as I have found out with further testing it is very theme sensitive.

    Please advise.

    Cheers, Joe :slight_smile:

  • aecnu
    • WP Unicorn

    Greetings bigmantenor,

    Believe it or not it i was hoping you would have said sub site because there is a another way to make this happen with a sub site using server commands (apache) to force https but now that would bring up a SSL certificate problem if SSL certificate is not covering sub sites.

    Perhaps it is just not playing nice with that theme ("Scrappy" by Caroline Moore)?

    That is for certain since it is operating great with News Magazine Theme 640 1.7 by antisocialmediallc.com in which I got lucky to do the first test with it.

    So our options now are either to test themes, and I promise you that it works with this one. I tested with Twenty Eleven and it gave errors but have not tried many more due to time constraints.

    However, our options are to either test it with other themes, the script does work, or to put this in a sub domain so that we can server redirect it forcing https but you would first want to check with your host on what kind of cert they installed and if it will work on sub domains - then the theme should be irrelevant because we force the redirect using the hosting control panel.

    It will not work this way in root because it will cause an endless loop.

    Now the ball is in your corner and I await to hear your reply of what action and options we have now considering the information above.

    Cheers, Joe :slight_smile:

  • bigmantenor
    • WPMU DEV Initiate

    Joe,

    OK, so I found out that my SSL cert doesn't support subdomains. Do you have any guidance as far as finding themes which will work with your piece of code that you wrote?? The only reason I chose the theme that I am currently using is that it is somewhat feminine, and this particular site is a knitting site with ecommerce.

    Thanks,
    Adam

  • aecnu
    • WP Unicorn

    Greetings Adam,

    Sorry for the delay in a reply and unfortunately as you have probably noticed no else has any answers to offer a way to get around this.

    However, I have not given up just yet.

    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

    Here is another to test using the htaccess file. I hope this one works out for you :slight_smile:

    You do not need to turn "RewriteEngine On" twice so I recommend putting this right below the first "RewriteEngine On" statement provided for WordPress in the htaccess file.

    Please advise.

    Cheers, Joe :slight_smile:

  • aecnu
    • WP Unicorn

    Greetings Adam,

    I have not heard from you in quite some time.

    In my support house keeping efforts I am going to mark this ticket as resolved. However, if it is not resolved and we are still having issues relative to this thread please fell free to check mark as not resolved below and be sure to post any news regarding the issue at hand.

    Cheers, Joe :slight_smile:

  • RobertGrover
    • WPMU DEV Initiate

    Problem resolved with the Wordpress HTTPS plugin and all is fine. Summary for anyone out there with similar problems:

    1) installed Marketpress and tested with the manual payment method all good.
    2) installed authorize.net gateway and system broke - missing shipping page.
    3) purchased and installed SSL cert - authorize.net working OK then.
    4) discovered I was receiving non-SSL warning on my checkout process due to non-SSL links scaring customers.
    5) installed Wordpress HTTPS and it corrected the final problems. all is well now.

    Hope this helps someone out there. Good luck.

    :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.