Jump to content

Mass update of non https images on website


Steveio

Recommended Posts

Hi,

I have approximately 2500 product pages on my website. Each product page has a 'Short decription' which consists of text and one icon/image. Since changing my site to https:// I have a "Connection is not secure" triangle in my browser's address bar. The reason that I am setting the "Connection is not secure" triangle is that the icon/image in my 'Short decription' field is http://.

Does anyone know if there is a way to bulk/mass update all http:// to https:// for all 2500 product pages in one go?

Thanks

Steve

Link to comment
Share on other sites

From my little experience i don't think there is a way to do it from back office options since we are talking(from what i understand reading your message) of image links used in description.

 

Anyways for sure a php script can be made to change every occurrence of "http://" into "https://" in your product short description if such data i stored in your database(unless you use some modules, it is the cae). It can be made to simply change all occurencies(easier) or to apply only to images(harder, only needed if you need to exclude some occrencies, like hrefs).

 

If you have some php knowledge(or know someone that does) it is not that hard. I came up with a more complex script database mass manipulation in half a day counting i am rusty with php and i am new to prestashop.

Edited by fatroy05 (see edit history)
Link to comment
Share on other sites

Hi Fatroy05,

Thanks for the info.

Yes, I presume the short description info must be stored somewhere in my websites database. I would need a script that changes all instances of http: to https: (not just images).

I don't suppose you would be willing/able to create the php script for me as a paid job?

Thanks

Steve

Link to comment
Share on other sites

You can do it from back-office with a free module, you can use Presta Store Manager for free, or you can export with phpMyAdmin as well the table ps_product_lang for this.

Export the products, rework the descriptions with Excel and than import products again with Prestashop back-office (Advanced Parameters -> csv import). You can also import only ID, name and description. You don't need to import all. Required fields are ID and name of the product. All other fields are compulsory.

  • Thanks 1
Link to comment
Share on other sites

Also if you go to the trouble of changing all the links protocol, consider using a relative protocol, in case you would need to move your store on a local development machine to do some testing and you would not have set up SSL. Having links "hard-coded" with https or http will make it difficult to move back and forth between a SSL and non-SSL configuration.

Using a relative protocol means that your links start with // and they will default to the protocol used to access the store.

Example:
old links: http://mystore.com/product
new links: //mystore.com/product

If store is accessed with https, the new links will also use https, otherwise will use http.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...