nbafan Posted August 19, 2011 Share Posted August 19, 2011 hi, i added form to the product to select i add next code to "themes/mytheme/product.tpl" <SELECT NAME="mymonth"> <option value="January">January</option> </SELECT> and now i want to get this information when client will buy product how to put it to "modules/mailalerts/mails/en/new_order.html"? Link to comment Share on other sites More sharing options...
shokinro Posted August 19, 2011 Share Posted August 19, 2011 Here is the steps you need to take. I assume you have managed to save the data in database some where what used input for the order. 1. Add a new keyword {mymonth} to your new-order html where you it appear. 2. In /classes/PaymentModule.php file, Looking for the code that send order confirmation email A. Load data you saved in databasem B. Set it to the variable array This should be done before the send mail is called. Link to comment Share on other sites More sharing options...
nbafan Posted August 19, 2011 Author Share Posted August 19, 2011 Here is the steps you need to take. I assume you have managed to save the data in database some where what used input for the order. 1. Add a new keyword {mymonth} to your new-order html where you it appear. 2. In /classes/PaymentModule.php file, Looking for the code that send order confirmation email A. Load data you saved in databasem B. Set it to the variable array This should be done before the send mail is called. thanks, information is very useful first step is done, i put {mymonth} to new-order.html can you help me with second step. im new in prestashop. how to create this '{mymonth}'? us i understand i need to write something like '{mymonth}' = $_GET['mymonth']? Link to comment Share on other sites More sharing options...
shokinro Posted August 19, 2011 Share Posted August 19, 2011 The data should saved in database some where when the order placed. So I don't think you can get it from $_GET which is URL parameter. First you will need to find a way to save user selection of mymobth in dstabase some where. Then you can get this data at above step2 of my instructions. If you don't know much about PHP coding, it might be a little bit of charllenge for you. Link to comment Share on other sites More sharing options...
nbafan Posted August 19, 2011 Author Share Posted August 19, 2011 The data should saved in database some where when the order placed. So I don't think you can get it from $_GET which is URL parameter. First you will need to find a way to save user selection of mymobth in dstabase some where. Then you can get this data at above step2 of my instructions. If you don't know much about PHP coding, it might be a little bit of charllenge for you. Is it means, that i need to create a new HOOK? Link to comment Share on other sites More sharing options...
nbafan Posted August 21, 2011 Author Share Posted August 21, 2011 Maybe i need to create new module? Can you help me, i spend 2 days in searching solution, but still no result.. Link to comment Share on other sites More sharing options...
Recommended Posts