Jump to content

is Javascript the Cinderella's Prestashop ?


Recommended Posts



I'm a french front-end developer, works in a web-agency,
works in team with Prestashop framework, on many projects.

I've recently participated at the official « Prestashop integrateur niveau 2 » (front-end level 2) lesson.


here is my opinion : the Javascript usages in Prestashop are very deficients.


some topics :

  • massive usage of global scope, function and variable
  • no dependencies management
  • theme js/autoload directory : cool for starters dev, wrong for pro dev
  • no alternative to autoload mechanism in theme.  
  • hard dependencies on many jQuery plugins (fancybox, …) in theme
  • usage of inline javascript call in link <a href="javascript:[…]">
  • usage of inline javascript tag <script></script>
  • usage of ugly* name for functions and variables names, any guideline for those names ?


I know that the retro-compatibilities are very hard, specially in front-end development.

I know that prestashop is a PHP Framework, made by backend dev. 

* When i say ugly names (all those functions have a global scope, in default-bootstrap theme) : 

  • get (yes, get function is also a part of ECMASCRIPT, never-mind)
  • submitFunction (yes, this function must submit something, may be a function, or maybe this function is a function ?)
  • display (this function must display something ! but what !)
  • dropDown (a jqueryPlugin for that, too much simple)
  • totalValue (this function must calculate something…)
  • accordion (this function is not a var, this is not a jQuery plugin, this is accordion)
  • accordionFooter (this function is only a fork of the well known accordion function)
  • blockHover (this function is not a block initiator, not a hover event callback, maybe both of them, but nobody knows the block)
  • quick_view (yes, underscore is a cool thing — sometime) 
  • function_exists (you are not in PHP environment, don't care)
  • totalValue (the total value of everything, everything)
  • deleteProductFromSummary (AllYourBaseAreBelongToUs)
  • refreshOddRow (refreshing stuff is very cool, specially HTML table row)

If you are PHP dev, imagine use those functions in global scope, with global vars… 


I'm the only front-end who practice a modern Javascript here ?
Is there a project for javascript developers in the forge ?


thank you. 

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

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