Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| webdev:prestashop:start [04/04/2017 12:22] – dolo | webdev:prestashop:start [07/07/2017 16:37] (Version actuelle) – [Charger un module dans un controller / override :] dolo | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | ====== Prestashop ====== | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | ===== Accéder à la BDD : ===== | ||
| + | [[http:// | ||
| + | < | ||
| + | |||
| + | ==== Échapper les caractères : ==== | ||
| + | < | ||
| + | /** | ||
| + | * Sanitize data which will be injected into SQL query | ||
| + | * | ||
| + | * @param string $string SQL data which will be injected into SQL query | ||
| + | * @param bool $htmlOK Does data contain HTML code ? (optional) | ||
| + | * @return string Sanitized data | ||
| + | */ | ||
| + | pSQL($string, | ||
| + | </ | ||
| + | |||
| + | 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:: | ||
| + | echo 'ID customer : '. $context-> | ||
| + | </ | ||
| + | | ||
| + | ===== Charger un module dans un controller / override : ===== | ||
| + | Ne pas faire : | ||
| + | < | ||
| + | Mais plutôt : | ||
| + | < | ||
| + | |||
| + | **Fonctions utiles pour dev :**\\ | ||
| + | http:// | ||
| + | |||
| + | ------------------ | ||
| + | < | ||
| + | $this-> | ||
| + | $this-> | ||
| + | </ | ||