====== Prestashop ======
* [[http://doc.prestashop.com/display/PS16/PHP+Coding+Standards|Coding standards 1.6]]
* [[http://doc.prestashop.com/display/PS16/System+Administrator+Guide#SystemAdministratorGuide-NginxfriendlyURLs|System administrator guide]]
===== Accéder à la BDD : =====
[[http://doc.prestashop.com/display/PS16/Best+Practices+of+the+Db+Class|Doc 1.6]]
Db::getInstance()->méthodes
==== Échapper les caractères : ====
Ou **bqSQL()** :
> bqSQL() can also be used. Note that besides escaping the ` character, it also calls pSQL() afterwards, but without the option to sanitize HTML.
===== Récupérer l'ID customer : =====
$context = Context::getContext();
echo 'ID customer : '. $context->customer->id;
===== Charger un module dans un controller / override : =====
Ne pas faire :
require_once(_PS_MODULE_DIR_.'/projets/projets.php');
Mais plutôt :
$projets = Module::getInstanceByName('projets');
**Fonctions utiles pour dev :**\\
http://nemops.com/prestashop-functions-1/#.Vb8upPnzrmg
------------------
$this->context->cookie->id_lang //Lang ID
$this->context->customer->id_lang // Probably better than the above