SliderFlash Posted January 3, 2023 Share Posted January 3, 2023 Contact form, form fields missing This is what the admin gets: Customer's email address: Order no.: - Attached file: - This is what the customer gets: Order no.: - Item: Attached file: - and this is the contact form, but where are the fields ? Link to comment Share on other sites More sharing options...
Mediacom87 Posted January 3, 2023 Share Posted January 3, 2023 Hi, the field for choosing an order reference only appears when the customer is connected to his account and has an active order. Link to comment Share on other sites More sharing options...
SliderFlash Posted January 4, 2023 Author Share Posted January 4, 2023 (edited) vor 10 Stunden schrieb Mediacom87: Hi, the field for choosing an order reference only appears when the customer is connected to his account and has an active order. no it is the same. Prestashop 1.7.8.8 two fields are missing, item and order no. Edited January 4, 2023 by SliderFlash (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted January 4, 2023 Share Posted January 4, 2023 (edited) Hi, sorry I misread the post. Example of how to add a message to a template. 1. go to admin -> International -> Translations 2. Modify translations Type of translation -> Email translations Select the type of email content -> Body Select your theme -> your theme Select your language -> your language 3. find Core emails -> contact_form 4. edit -> add {message} 5. Repeat the process for all languages 6. go to ./modules/contactform/contactform.php 7. comment this line $var_list['{message}'] = self::MESSAGE_PLACEHOLDER_FOR_OLDER_VERSION; to // $var_list['{message}'] = self::MESSAGE_PLACEHOLDER_FOR_OLDER_VERSION; 8. save 9. clear cache Edited January 4, 2023 by prestashopfree.com (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted January 4, 2023 Share Posted January 4, 2023 (edited) Example of how to add the subject of the message to the template? 1. edit ./modules/contactform/contactform.php 2. find $var_list = [ $var_list = [ '{firstname}' => '', '{lastname}' => '', '{order_name}' => '-', '{attached_file}' => '-', '{message}' => Tools::nl2br(Tools::htmlentitiesUTF8(Tools::stripslashes($message))), '{email}' => $from, '{product_name}' => '', ]; 3. add after custom vars $var_list = [ '{firstname}' => '', '{lastname}' => '', '{order_name}' => '-', '{attached_file}' => '-', '{message}' => Tools::nl2br(Tools::htmlentitiesUTF8(Tools::stripslashes($message))), '{email}' => $from, '{product_name}' => '', ]; $subject = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'contact_lang WHERE id_lang = '.(int)$this->context->language->id.' AND id_subject = '.(int)$id_contact); $var_list['{subject_name}'] = $subject['name']; $var_list['{subject_description}'] = $subject['description']; 4. save 5. modify email template contact_form 6. add {subject_name} or {subject_description} And this way you can play with the template and parameters indefinitely 😄 Edited January 4, 2023 by prestashopfree.com (see edit history) Link to comment Share on other sites More sharing options...
SliderFlash Posted January 4, 2023 Author Share Posted January 4, 2023 ok thanks, i will check. 1 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