General Prestashop Coding

General Prestashop coding articles.

https://www.prestashop.com/blog/en/best-practices-class-db-prestashop-1-5/

www.prestashop.com/blog/en/best-practices-class-db-prestasho...

Most modules and developments on PrestaShop require you to use or enter information on a database. Any developer sees the core DB class as an essential part of the process.

On top of providing potential abstraction for other types of relational ...

Visited75
https://www.prestashop.com/forums/topic/34227-module-add-css-to-head-tag/

www.prestashop.com/forums/topic/34227-module-add-css-to-head...

Is there any method at all for a module to add CSS to the head tag? I know I can add a CSS file in the header.php file. But I'm wanting the module to do this itself if it's installed, and page specific.

Visited78
https://www.prestashop.com/forums/topic/220639-setmedia-addjs-not-loading-javascript-files/?pid=1100842#entry1100842

www.prestashop.com/forums/topic/220639-setmedia-addjs-not-lo...

Hi, when I am trying to load js in a ModuleFrontController through the setMedia function it does not seem to pull through. This also happens when I put the css in a sub folder, but works when it is in the top folder.

Visited79
http://doc.prestashop.com/display/PS16/Using+the+Context+Object

doc.prestashop.com/display/PS16/Using+the+Context+Object

What is the Context object?

The Context is a technical feature introduced with version 1.5 of PrestaShop. Its two goals are:

  • preventing developers from using global variables.
  • enabling them to change th ...

    Visited102
https://www.prestashop.com/forums/topic/219525-solved-what-is-html-for/#entry1083727

www.prestashop.com/forums/topic/219525-solved-what-is-html-f...

This is a forum thread dealing with this topic which goes on to describe what $_html = is for.

This thread also discusses OOP programming

Visited95