Pierrox Posted December 5, 2013 Share Posted December 5, 2013 Bonjour, Je suis en train tenter de modifier le fonctionnement de la configuration du produit sur les déclinaisons en partie publique. Je réalise le tout dans un module je recupère mes variables en js avant d'utiliser la fonction ajax dans mon hookdisplayheader var query = $.ajax({ type: "POST", url: baseDir + "modules/monmodule/ajax.php", data: "method=myMethod&id_attributes=" + id_attribute +"&id_color="+ id_color +"&id_product="+ id_product +"&id_lang="+ id_lang, dataType: "html", success: function(reply) { $("#form_attributes").html(reply) } dans mon ajax.php je recupere bien les variables pour faire ma cuisine et les assigner à mon template de test dans modules/monmodule/test.tpl <?php require_once(dirname(__FILE__).'../../../config/config.inc.php'); require_once(dirname(__FILE__).'../../../init.php'); //include_once('../classes/Cookie.php'); $id_product = Tools::getValue('id_product'); $id_attribute = Tools::getValue('id_attributes'); $id_color = Tools::getValue('id_color'); $id_lang = Tools::getValue('id_lang'); $smarty->assignGlobal('id_product', $id_product); $smarty->assignGlobal('id_color', "$id_color"); $smarty->assignGlobal('id_attribute', $id_attribute); $smarty->display('test.tpl'); Je voudrai savoir comment vous faite: Recuperer les variables de lang dans mon template test.tpl? {l s="add to cart"} traduit dans le BO du module mais ne semble pas pris en compte? Comment faire en sorte que le template.tpl soit surchargeable dans un thème? Merci de votre attention Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now