Jump to content

Mails Alerts errror adding a new field


Recommended Posts

Hi

 

I just installed a module called RENTAL MODULE , and its add a new field called "start_date" in ps_order_detail table

 

I want include this field in the mail i get on new order but dont know why , it doesnt works

 

i tried

 

$start_date=$product['star_date'];

 

Cause this sentence works for all the other fields in ps_order_detail table.

 

After that i tried with a SQL

 

 

$sql = 'SELECT start_date FROM '._DB_PREFIX_.'order_detail WHERE id_order_detail='.$product['id_order_detail'];

 

$start_date = Db::getInstance()->getValue($sql);

 

Its only works then i put a number but not with .$product['id_order_detail'];

 

I use a new variable $idorderdate and aply (int) to it

 

... and still nothing yet.

 

 

Any Ideas?

 

 

thanks for your time

Link to comment
Share on other sites

Thanks for your time Nemo

 

I upload the mailsalerts.php , http://neoyra.com/mailsalerts.rar

 

U can see the modifications on line 129

 

Here is a capture what i get on mail

 

The first cell gets the result of

$sql = 'SELECT start_date FROM '._DB_PREFIX_.'order_detail WHERE id_order_detail='.$product['id_order_detail'];

$start_date = Db::getInstance()->getValue($sql);

<td style="padding:0.6em 0.4em;">'.$start_date.'Sql Sentence'.$sql.'</td>

 

U can see that its get the Id order detail 55 but dont get the result of the sql sentence

 

 

The second sell get the result of

$sql2 = 'SELECT start_date FROM '._DB_PREFIX_.'order_detail WHERE id_order_detail=2';

$start_date2 = Db::getInstance()->getValue($sql2);

<td style="padding:0.6em 0.4em;">'.$start_date2.'Sql Sentence'.$sql2.'</td>

 

and its works

 

daterror.jpg

Link to comment
Share on other sites

×
×
  • Create New...