jhaxey Posted March 13, 2013 Share Posted March 13, 2013 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 More sharing options...
NemoPS Posted March 14, 2013 Share Posted March 14, 2013 I assume you're trying to edit the email directly from the order controller? Correct? can you show us a chuck of that exact code, including the "mail::send" function call? Link to comment Share on other sites More sharing options...
jhaxey Posted March 14, 2013 Author Share Posted March 14, 2013 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 Link to comment Share on other sites More sharing options...
NemoPS Posted March 14, 2013 Share Posted March 14, 2013 Try dumping this: $product['id_order_detail'] and see what you get Link to comment Share on other sites More sharing options...
Recommended Posts