Jump to content

Prestashop modules doesn't load from CDN


Recommended Posts

Hello,

 

Does any person had a problem where the modules in prestashop doesn't load from CDN? All others images/css/js everything is loading fine except modules and themes.

 

Thanks in advance.

 

Dinesh

 

 

  • Like 1
Link to comment
Share on other sites

We have the same issue with our shop, the problem is that the path to the modules is relative.

 

For example I use the varriable {$module_dir}img/image.jpg in the mymodule.tpl.

 

This creates a path like /modules/mymodule/img/image.jpg

Instead of www.example.com/modules/mymodule/img/image.jpg

 

This is part of the reason why the images are still loaded from the main domain (www.example.com) and not from the CDN.

 

Maybe this can be fixed with a .htaccess tweak, I'm not an expert in this area so until now I did not find a solution.

 

An example;

 

The native prestashop module "Product payment logos block v1.3.6 - by PrestaShop" does this.

 

the path to the image with a media server enabled is as follows;

<img src="/modules/productpaymentlogos/img/2e8686d04cc00384b3493846631bac8b.png" alt="" class="img-responsive">

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

×
×
  • Create New...