notcrack Posted June 9, 2014 Share Posted June 9, 2014 Hey everyone, I have been setting up a new store and have been pulling my hair out over the variables used in the mailalert modules. I have modified the templates for account.html - This template works perfectly as I haven't added any new variables to the html. Variables used {email} - Works {passwd} - Works {shop_name} - Works order_conf.html {firstname} - Works {lastname} - Works {email} - Works {date} - Works {payment} - Works {products} - Changed from {items} and now works {total_products} - Works {total_discounts} - Works {total_wrapping} - Works {total_shipping} - Works {total_tax_paid} - Works {total_paid} - Works {carrier} - Works {delivery_block_html} - Works {invoice_block_html} - Works {message} - Not working {shop_name} - Works payment.html {payment} - Not working {order_name} - Working {date} - Not working {payment} - Not working {total_paid} - Working {delivery_block_html} - Not working {invoice_block_html} - Not working preparartion.html {firstname} - Working {lastname} - Working {order_name} - Working {date} - Not working {delivery_block_html} - Not working {invoice_block_html} - Not working refund.html {firstname} - Working {lastname} - Working {order_name} - Working {date} - Not working {payment} - Not working {total_paid} - Working shipped.html {firstname} - Works {lastname} - Works {order_name} - Works {date} - Not working {payment} - Not working {total_paid} - Working {items} - Not working {total_products} - Not working {total_discounts} - Not working {total_wrapping} - Not working {total_shipping} - Not working {total_tax_paid} - Not working {total_paid} - Works {carrier} - Not working {shipping_number} - Not working {followup} - Not working {delivery_block_html} - Not working {invoice_block_html} - Not working {message} - Not working {shop_name} - Works When I went to test I found the above results, so I've done a lot of searching, but the only real result I have come up with is creating a mail.php override, but then I have no idea how to add all the above variables to it. I know it's a tall order, but if someone could help me out that would be amazing. I'm using 1.5.6.2 Thank you. Link to comment Share on other sites More sharing options...
notcrack Posted June 10, 2014 Author Share Posted June 10, 2014 I'm not one for bumping, but does anyone have any idea on what I should be doing with this issue. Cheers Link to comment Share on other sites More sharing options...
Scully Posted August 19, 2014 Share Posted August 19, 2014 Same here on presta 1.5.6.2. We'd like to insert the product details into the shipped.html but where is the code which triggers the shipped.html to be sent? Any help is highly appreciared. Scully Link to comment Share on other sites More sharing options...
Twingo74 Posted October 7, 2016 Share Posted October 7, 2016 (edited) I have the same problem with presta 1.6.1.7 (default bootstrap) Would appreciate any help on the topic Is there a way to add the shop contact info (address) at the footer of the email using a variable? Edited October 7, 2016 by Twingo74 (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted October 8, 2016 Share Posted October 8, 2016 It's the validateOrder function in classes/PaymentModule.php that sends the order confirmation email and the changeIdOrderState function in classes/order/OrderHistory.php that sends all other emails. Each of these functions has a $data array that contains all the variables available to the email templates. If you want to add extra variables, you should add them there. For example: 'shop_name' => Configuration::get('PS_SHOP_NAME'), 'shop_email' => Configuration::get('PS_SHOP_EMAIL'), 'shop_registration' => Configuration::get('PS_SHOP_DETAILS'), 'shop_address1' => Configuration::get('PS_SHOP_ADDR1'), 'shop_address2' => Configuration::get('PS_SHOP_ADDR2'), 'shop_postcode' => Configuration::get('PS_SHOP_CODE'), 'shop_city' => Configuration::get('PS_SHOP_CITY'), 'shop_country' => Country::getNameById((int)$order->id_lang, (int)Configuration::get('PS_SHOP_COUNTRY_ID')), 'shop_state' => State::getNameById((int)Configuration::get('PS_SHOP_STATE_ID')), 'shop_phone' => Configuration::get('PS_SHOP_PHONE'), 'shop_fax' => Configuration::get('PS_SHOP_FAX'), 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