Jump to content

jquery update


Recommended Posts

The problem is that jQuery and co. are NOT inside the theme, but are sort of part of PrestaShop's core (correct me if I'm wrong, but jQuery is added by the FrontController)

 

They shouldn't be there. JavaScript is part of the presentation layer and should be package inside the theme.

Unfortunately, there are lots of thing in PS that are coupled to jQuery somehow...

Link to comment
Share on other sites

@mexique1 :

in product.tpl, there are some things related to the calculation of one product's price,

in the related javascript inside the template too,

and in the related classes/controllers too...

 

guess what ?

you should update the template at nearly each version of prestashop 1.4 :)

of course it means more work for template designers...

 

i really hope that it will end with prestashop 1.5 and that all attributes & products prices will be sent from the controller

and not subcalculated in the theme's javascript...

Link to comment
Share on other sites

They should be like in WordPress. WordPress comes packaged with a jQuery version, usually the latest, and you can override it in the theme. Or call it on demand inside the theme.

 

So, there's one jQuery for the backend, and one for the frontend, depending on your theme's requirements.

Link to comment
Share on other sites

  • 2 weeks later...

Use Google library will not improve your page speed or your web site loading time !

 

1. Prestashop merge all file together

2. Don't add a new domain to load in your HTML page (only 1 domain will decrease performance actually since JS & CSS are loaded using HTTP keep alive method)

 

Upgrade jQuery only if you need new features, else its stupid since the file is bigger !

Link to comment
Share on other sites

please see the point 3 on the page :

http://www.prestashop.com/en/top-tips

 

"Loading files from different domains will help decrease server load and deliver files quicker on the customer's browser. Make a copy of the compressed CSS/JavaScript files and images of your site and upload to another domain. Once the new domain with files is completed, enter the domain into the designated "Media Server" field in the back office."

 

thus, a cdn could still be very effective, for images moreover.

Link to comment
Share on other sites

×
×
  • Create New...