jonsecu Posted March 26, 2014 Share Posted March 26, 2014 Hi... I am using Prestashop 1.5.3. I am developing a module and I requiere to retrieve de current language ID to pass it to the Mail::Send method. This is the piece of relevant code, which is located on the main root of the module folder. So far I am passing manually a 4 to the Send method, I want to replace this int by a method/class/function or whatever that may retrieve the current language ID. Any ideas please? Thank you very much. $data = array( '{name}' => $inputName, '{link}' => _PS_BASE_URL_.__PS_BASE_URI__ . "index.php?fc=module&module=presentforme&controller=default&id_regalo=" . $insertedID, '{imgUrl}' => getProdImgUrl($productID), '{prodUrl}' => "http://www.prestashop.com", '{prodName}' => "Titulo", '{prodDesc}' => "Descripción" ); Mail::Send( 4, 'html_template_title', 'A subject', $data, $inputEmail, $inputName, '[email protected]', 'Example', null, null, dirname(__FILE__).'/mails/', false, false ); Link to comment Share on other sites More sharing options...
vekia Posted April 8, 2014 Share Posted April 8, 2014 you can use context variable to get current language id $id_lang = Context::getContext()->language->id; 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