Jump to content

[SOLVED] How to set URL for download of virtual product in email with https:// prefix?


Trampino

Recommended Posts

Hello,
I have setting Enable SSL on all pages=YES.
But when client receives email, which is created by PrestaShop based on product_download email template, then URL for virtual product download is still generate there with http:// and not with https:// prefix. And it leads to problem with download of virtual product file.

Can anyone help me, where I can set, that hyperlinks for download of product in email will be generated with URL starts with https://   prefix?

Thanks 

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

  • 3 weeks later...

Proble was solved.

Module pfvirtualcombinations (version 1.0.0) contains override for class ProductDownload . And this modification contains only hardcoded use of  _PS_BASE_URL_ but not use of  _PS_BASE_URL_SSL_

 

So if I change 

$link = ($admin) ? 'get-file-admin.php?' : _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=get-file&';

to

$link = ($admin) ? 'get-file-admin.php?' : _PS_BASE_URL_SSL_.__PS_BASE_URI__.'index.php?controller=get-file&';

then everything is OK and hyperlink in email for download of virtual product file is generated with HTTPs prefix now.   

  • Thanks 1
Link to comment
Share on other sites

  • Trampino changed the title to [SOLVED] How to set URL for download of virtual product in email with https:// prefix?
  • 3 months later...
  • 1 year later...
On 1/2/2022 at 11:27 AM, Trampino said:

Proble was solved.

Module pfvirtualcombinations (version 1.0.0) contains override for class ProductDownload . And this modification contains only hardcoded use of  _PS_BASE_URL_ but not use of  _PS_BASE_URL_SSL_

 

So if I change 

$link = ($admin) ? 'get-file-admin.php?' : _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=get-file&';

to

$link = ($admin) ? 'get-file-admin.php?' : _PS_BASE_URL_SSL_.__PS_BASE_URI__.'index.php?controller=get-file&';

then everything is OK and hyperlink in email for download of virtual product file is generated with HTTPs prefix now.   

What should I do to solve the same problem with Prestashop version 1.61.5?

Thanks in advance

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...