Jump to content

How to send my own data to email


Recommended Posts

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"?

post-248723-0-53073100-1313757519_thumb.jpg

Link to comment
Share on other sites

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

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

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

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

×
×
  • Create New...