123Kirill312 Posted February 8, 2016 Share Posted February 8, 2016 (edited) Hi, I spend a lot of hours trying to solve the problem. Hope for your help... I need to add a new variable to email template contact_form. This variable will generate random number or random code (it doesnt matter). I found "Contact controller" and here I add new variable as a test: $var_list['{test}'] = $product->name[Context::getContext()->language->id]; It is a copy of "product" variable. The question: How to edit it in order to have a random number. Any ideas... PS It is necessary to add this variable to make a ticket system. User receives Random number like a "ticket" that his letter was received and he knows the number of his inquery. PPS I have a few ideas but I am newbie. For example this is Smarty code for random number: {1|rand:20} But $var_list uses "$", so it is necessary to add something like <{assign var='random' value=1|rand:20}> and than put $random to $var_list. But how and where... Best regards, Kirill Edited February 8, 2016 by 123Kirill312 (see edit history) Link to comment Share on other sites More sharing options...
123Kirill312 Posted February 9, 2016 Author Share Posted February 9, 2016 Any ideas please... Link to comment Share on other sites More sharing options...
123Kirill312 Posted February 10, 2016 Author Share Posted February 10, 2016 Hi! Will try to ask in another form. I need to send automatic mail to customer when he send inquery from contact form. And I need to add to this template any number or code, so he could know the number of his question/inquery. Regards, Kirill 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