WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp E-commerce product images not shown - https is added to url (10 posts)

  1. MissJen
    Member
    Posted 5 years ago #

    Hi,

    I have a problem with the product images on the front end of my wp E-commerce installation.

    I built the site on my own hosting, moved it over to a new host and now the images do not show. I notice a 's' has crept its way into the http bit of image URL...

    https://memorialdiamonds.co.uk/wp-content/uploads/wpsc/product_images/thumbnails/Princess.jpg

    instead of

    http://memorialdiamonds.co.uk/wp-content/uploads/wpsc/product_images/thumbnails/Princess.jpg

    please see the product page here- http://memorialdiamonds.co.uk/?page_id=15

    I thought it may be something to do with the utf8 thing as I have a few Â's dotted through the site.

    As far as I can tell the database tables are set up the same way as on the previous host. I copied all the files directly too.

    Any help is much appreciated.

  2. psenechal
    Member
    Posted 5 years ago #

    I'm having the exact same problem. Let me know if you find a solution. Thanks.

  3. MissJen
    Member
    Posted 4 years ago #

    I think it was a database problem. Perhaps an out of date database sql version?

    I didnt find a way to fix it myself, so i moved hosts and it works now.

    Sorry I cant be of more help.

  4. mccormicky
    Member
    Posted 4 years ago #

    Is it possible you just forgot to load the images to the new server?
    Product images are not stored in the database but on the server.
    Importing and not losing images is simple:just make sure you have images in the same place as they are linked to in the source of the page. View source or paste the URL into the addressbar.
    Merely having https would not block images from showing...if there are images where the link says they are.
    Transferring from one database to another is just exporting and importing text files. The process doesn't inject https into urls.

  5. psenechal
    Member
    Posted 4 years ago #

    I don't have an SSL certificate installed on my domain, so at the least, it's going to generate an invalid certificate error. I also didn't open port 443 on the firewall since I don't have any secure connections going to it.

    I would think using a secured url for the images would be something optional you could turn on or off from the admin area, but I can't seem to find it. If it's hard coded somewhere, please let me know and I'll make the change.

  6. jvs
    Member
    Posted 4 years ago #

    I noticed the https issue too in my wp-ecommerce ver 3.7.4 installation- my GoDaddy installation would not allow images to download unless the correct http was there. Digging into the code, I found several places where $_SERVER['HTTPS'] is used to change the prefix to https. It looks like this is being addressed in version 3.7.5 (still in beta at this writing). The code was checking for this to be empty if https is not being used, however:

    $_SERVER['HTTPS'] is set to a non-empty value if the script was queried through the HTTPS protocol... BUT when using ISAPI with IIS, the value will be "off" if the request was not made through the HTTPS protocol.

    So the fix for me was to change:

    if(!empty($_SERVER['HTTPS'])) to

    if(!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != "off")

    Search for $_SERVER['HTTPS'] in the following scripts (under wp-content/plugins/wp-e-commerce/wpsc-includes) to catch the instances that need editing:

    • display.function.php
    • wpsc_query.php
    • cart.class.php
    • misc.functions.php

    Hope this helps.

  7. rodreading
    Member
    Posted 4 years ago #

    jvs
    Your fixed worked wonderfully! Thank you very much for taking the time to figure that out. Awesome.

  8. jvs
    Member
    Posted 4 years ago #

    Glad it helped!

  9. MissJen
    Member
    Posted 4 years ago #

    Just came across this problem again, thanks for your fix jvs :) works like a charm!

  10. inetwerx
    Member
    Posted 4 years ago #

    UNBELIEVABLE! IT WORKS. THANK YOU THANK YOU THANK YOU, THANK YOU VERY MUCH jvs. thanks for supporting this community.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags