Secure images on checkout pages

Discussion in 'Templates customization' started by chriscarrier, Sep 28, 2009.

  1. chriscarrier

    chriscarrier New Member

    Joined:
    Sep 24, 2009
    Messages:
    2
    I can't believe I can't find the answer to this -- unless it's so obvious, I'm missing it.

    If you use absolute paths in template files, you'll get a mix of secure and insecure images in the secure checkout pages. This creates that popup warning about the page containing insecure items... which scares people away.

    What do I do? There is only one set of footer/header files to edit -- how can these work for both http and https pages if the image urls have to be absolute?


    Chris
  2. jackgordon

    jackgordon aMember Pro Customer

    Joined:
    Mar 23, 2009
    Messages:
    269
    If you make every url https, you should be ok. The popup only happens (for me at least) when you have unsecure images in a secure environment - not the other way around.
  3. chriscarrier

    chriscarrier New Member

    Joined:
    Sep 24, 2009
    Messages:
    2
    It appears to work - thanks.

    I've had errors doing this in the past (https in an http page) but it was a banner ad. This seems to work fine, however. Explicitly stating that https-ing image links in the absolute URLs in the template might be useful to some.


    Chris
  4. kengary

    kengary aMember Pro Customer

    Joined:
    Nov 13, 2008
    Messages:
    231
    If you want to reference the absolute path of an image within the amember directory in a template file you have two variables available to you:

    {$config.root_url} = http://www.yoursite.com/amember

    {$config.root_surl} = https://www.yoursite.com/amember

    You can configure those on the aMember CP -> Setup/Configuration -> Globals

    To repeat jackgordon, you won't get errors on an http page if you reference images as https but you will get them if you reference http images on an https page.

Share This Page