mo des variables Prestashop

Exemple d’utilisation pour récupérer la catégorie par défaut d'un produit : {$product.category}

Globals

$category

$subcategory

$product

$conf

$smarty.const (Constantes/Globales)

Constantes crées par la configuration Prestashop :

Base et thèmes

define(‘THEMES_DIR‘, PS_BASE_URI.‘themes/’);

define(‘THEME_IMG_DIR‘, THEMES_DIR.THEME_NAME.’/img/’);

define(‘THEME_CSS_DIR‘, THEMES_DIR.THEME_NAME.’/css/’);

define(‘THEME_JS_DIR‘, THEMES_DIR.THEME_NAME.’/js/’);

define(‘THEME_CAT_DIR‘, PS_BASE_URI.‘img/c/’);

define(‘THEME_PROD_DIR‘, PS_BASE_URI.‘img/p/’);

define(‘THEME_PROD_PIC_DIR‘, PS_BASE_URI.‘upload/’);

define(’THEME_MANU_DIR‘, PS_BASE_URI.‘img/m/’);

define(’THEME_SCENE_DIR‘, PS_BASE_URI.‘img/scenes/’);

define(’THEME_SCENE_THUMB_DIR‘, PS_BASE_URI.‘img/scenes/thumbs’);

define(’THEME_SUP_DIR‘, PS_BASE_URI.‘img/su/’);

define(’THEME_SHIP_DIR‘, PS_BASE_URI.‘img/s/’);

define(’THEME_LANG_DIR‘, PS_BASE_URI.‘img/l/’);

define(’THEME_COL_DIR‘, PS_BASE_URI.‘img/co/’);

define(’SUPP_DIR‘, PS_BASE_URI.‘img/su/’);

define(’THEME_DIR‘, THEMES_DIR.THEME_NAME.’/’);

define(’MAIL_DIR‘, PS_BASE_URI.‘mails/’);

define(’MODULE_DIR‘, PS_BASE_URI.‘modules/’);

define(’PS_IMG‘, PS_BASE_URI.‘img/’);

define(’PS_ADMIN_IMG‘, PS_IMG.‘admin/’);

Dossier :

define(’PS_ROOT_DIR‘, realpath($currentDir.’/..’));

define(’PS_CLASS_DIR‘, PS_ROOT_DIR.’/classes/’);

define(’PS_TRANSLATIONS_DIR‘, PS_ROOT_DIR.’/translations/’);

define(’PS_DOWNLOAD_DIR‘, PS_ROOT_DIR.’/download/’);

define(’PS_MAIL_DIR‘, PS_ROOT_DIR.’/mails/’);

define(’PS_MODULE_DIR‘, PS_ROOT_DIR.’/modules/’);

define(’PS_ALL_THEMES_DIR‘, PS_ROOT_DIR.’/themes/’);

define(’PS_THEME_DIR‘, PS_ROOT_DIR.’/themes/’.THEME_NAME.’/’);

define(’PS_IMG_DIR‘, PS_ROOT_DIR.’/img/’);

define(’PS_CAT_IMG_DIR‘, PS_IMG_DIR.‘c/’);

define(’PS_PROD_IMG_DIR‘, PS_IMG_DIR.‘p/’);

define(’PS_SCENE_IMG_DIR‘, PS_IMG_DIR.‘scenes/’);

define(’PS_SCENE_THUMB_IMG_DIR‘, PS_IMG_DIR.‘scenes/thumbs/’);

define(’PS_MANU_IMG_DIR‘, PS_IMG_DIR.‘m/’);

define(’PS_SHIP_IMG_DIR‘, PS_IMG_DIR.‘s/’);

define(’PS_SUPP_IMG_DIR‘, PS_IMG_DIR.‘su/’);

define(’PS_COL_IMG_DIR‘, PS_IMG_DIR.‘co/’);

define(’PS_TMP_IMG_DIR‘, PS_IMG_DIR.‘tmp/’);

define(’PS_PROD_PIC_DIR‘, PS_ROOT_DIR.’/upload/’);

define(’PS_TOOL_DIR‘, PS_ROOT_DIR.’/tools/’);

define(’PS_SMARTY_DIR‘, PS_TOOL_DIR.‘smarty/’);

define(’PS_STEST_DIR‘, PS_TOOL_DIR.‘simpletest/’);

define(’PS_SWIFT_DIR‘, PS_TOOL_DIR.‘swift/’);

define(’PS_FPDF_PATH‘, PS_TOOL_DIR.‘fpdf/’);

define(’PS_PEAR_XML_PARSER_PATH‘, PS_TOOL_DIR.‘pear_xml_parser/’);

define(’PS_CSS_DIR‘, PS_BASE_URI.‘css/’);

define(’PS_JS_DIR‘, PS_BASE_URI.‘js/’);


Mots clés : variables prestashop

Keywords : template tags prestashop

Contributeurs :

Auteur : Maxime Le Breton

Document sous licence GPL