Commit 02ce366df3f5ad70540974924a6d64a0efb41e82

Authored by Alex Savenko
1 parent fa3fedef

generate letter

src/app/tasks/templates/basket/abandoned.php
... ... @@ -48,11 +48,10 @@
48 48 <td align="center">
49 49 <table border="0" cellpadding="0" cellspacing="0">
50 50 <tr>
51   - <td background="images/menu01.png" width="142" height="36" style="background-position:top center; background-repeat:no-repeat;text-align:center;" align="center"><a target="_blank" href="http://semena.in.ua/o-kompanii-1/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" style="font-family: Calibri;text-decoration: none;text-align: center;color: white;font-size: 14px;font-weight: bold;">О КОМПАНИИ</a>
52   - </td>
53   - <td background="images/menu02.png" width="183" height="36" style="background-position:top center; background-repeat:no-repeat;text-align:center;" align="center"><a target="_blank" href="http://semena.in.ua/dostavka-i-oplata-2/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" style="font-family: Calibri;text-decoration: none;text-align: center;color: white;font-size: 14px;font-weight: bold;">ДОСТАВКА И ОПЛАТА</a></td>
54   - <td background="images/menu03.png" width="96" height="36" style="background-position:top center; background-repeat:no-repeat;text-align:center;" align="center"><a target="_blank" href="http://semena.in.ua/news-actions/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" style="font-family: Calibri;text-decoration: none;text-align: center;color: white;font-size: 14px;font-weight: bold;">АКЦИИ</a></td>
55   - <td background="images/menu04.png" width="233" height="36" style="background-position:top center; background-repeat:no-repeat;text-align:center;" align="center"><a target="_blank" href="http://semena.in.ua/prof_tips/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" style="font-family: Calibri;text-decoration: none;text-align: center;color: white;font-size: 14px;font-weight: bold;">СОВЕТЫ ПРОФЕССИОНАЛОВ</a></td>
  51 + <td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/menu01.png" width="142" height="36" style="background-position:top center; background-repeat:no-repeat;text-align:center;" align="center"><a target="_blank" href="http://semena.in.ua/o-kompanii-1/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" style="font-family: Calibri;text-decoration: none;text-align: center;color: white;font-size: 14px;font-weight: bold;">О КОМПАНИИ</a></td>
  52 + <td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/menu02.png" width="183" height="36" style="background-position:top center; background-repeat:no-repeat;text-align:center;" align="center"><a target="_blank" href="http://semena.in.ua/dostavka-i-oplata-2/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" style="font-family: Calibri;text-decoration: none;text-align: center;color: white;font-size: 14px;font-weight: bold;">ДОСТАВКА И ОПЛАТА</a></td>
  53 + <td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/menu03.png" width="96" height="36" style="background-position:top center; background-repeat:no-repeat;text-align:center;" align="center"><a target="_blank" href="http://semena.in.ua/news-actions/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" style="font-family: Calibri;text-decoration: none;text-align: center;color: white;font-size: 14px;font-weight: bold;">АКЦИИ</a></td>
  54 + <td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/menu04.png" width="233" height="36" style="background-position:top center; background-repeat:no-repeat;text-align:center;" align="center"><a target="_blank" href="http://semena.in.ua/prof_tips/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" style="font-family: Calibri;text-decoration: none;text-align: center;color: white;font-size: 14px;font-weight: bold;">СОВЕТЫ ПРОФЕССИОНАЛОВ</a></td>
56 55 </tr>
57 56 </table>
58 57 </td>
... ... @@ -65,29 +64,29 @@
65 64 <td align="center">
66 65 <table cellspacing="0" cellpadding="0" border="0" width="660">
67 66 <tr>
68   - <td width="65" height="65" background="images/f-1.jpg" style="background-position:center center;background-repeat:no-repeat;">
  67 + <td width="65" height="65" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/f-1.jpg" style="background-position:center center;background-repeat:no-repeat;">
69 68 <a href="http://semena.in.ua/semena_ovoshchey_1c_20/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" target="_blank"><img width="65" height="65" valign="top" align="left" src="images/link.png" border="none"></a>
70 69 </td>
71 70 <td width="20" valign="top"></td>
72   - <td width="65" height="65" background="images/f-2.jpg" style="background-position:center center;background-repeat:no-repeat;">
  71 + <td width="65" height="65" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/f-2.jpg" style="background-position:center center;background-repeat:no-repeat;">
73 72 <a href="http://semena.in.ua/semena_tsvetov_1c_20/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" target="_blank"><img width="65" height="65" valign="top" align="left" src="images/link.png" border="none"></a></td>
74 73 <td width="20" valign="top"></td>
75   - <td width="65" height="65" background="images/f-3.jpg" style="background-position:center center;background-repeat:no-repeat;">
  74 + <td width="65" height="65" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/f-3.jpg" style="background-position:center center;background-repeat:no-repeat;">
76 75 <a href="http://semena.in.ua/udobrenija_i_sredstva_zashchity_1c_20/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" target="_blank"><img width="65" height="65" valign="top" align="left" src="images/link.png" border="none"></a></td>
77 76 <td width="20" valign="top"></td>
78   - <td width="65" height="65" background="images/f-4.jpg" style="background-position:center center;background-repeat:no-repeat;">
  77 + <td width="65" height="65" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/f-4.jpg" style="background-position:center center;background-repeat:no-repeat;">
79 78 <a href="http://semena.in.ua/gazonnye_travy_1c_20/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" target="_blank"><img width="65" height="65" valign="top" align="left" src="images/link.png" border="none"></a></td>
80 79 <td width="20" valign="top"></td>
81   - <td width="65" height="65" background="images/f-5.jpg" style="background-position:center center;background-repeat:no-repeat;">
  80 + <td width="65" height="65" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/f-5.jpg" style="background-position:center center;background-repeat:no-repeat;">
82 81 <a href="http://semena.in.ua/sadjenci_1c_20/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" target="_blank"><img width="65" height="65" valign="top" align="left" src="images/link.png" border="none"></a></td>
83 82 <td width="20" valign="top"></td>
84   - <td width="65" height="65" background="images/f-6.jpg" style="background-position:center center;background-repeat:no-repeat;">
  83 + <td width="65" height="65" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/f-6.jpg" style="background-position:center center;background-repeat:no-repeat;">
85 84 <a href="http://semena.in.ua/tovary_dlja_sada_i_ogoroda_1c_20/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" target="_blank"><img width="65" height="65" valign="top" align="left" src="images/link.png" border="none"></a></td>
86 85 <td width="20" valign="top"></td>
87   - <td width="65" height="65" background="images/f-7.jpg" style="background-position:center center;background-repeat:no-repeat;">
  86 + <td width="65" height="65" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/f-7.jpg" style="background-position:center center;background-repeat:no-repeat;">
88 87 <a href="http://semena.in.ua/zootovari_1c_20/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" target="_blank"><img width="65" height="65" valign="top" align="left" src="images/link.png" border="none"></a></td>
89 88 <td width="20" valign="top"></td>
90   - <td width="65" height="65" background="images/f-8.jpg" style="background-position:center center;background-repeat:no-repeat;">
  89 + <td width="65" height="65" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/f-8.jpg" style="background-position:center center;background-repeat:no-repeat;">
91 90 <a href="http://semena.in.ua/biopreparati_1c_20/ru?utm_source=newsletter&utm_campaign=lost%20basket&utm_medium=email​" target="_blank"><img width="65" height="65" valign="top" align="left" src="images/link.png" border="none"></a></td>
92 91 </tr>
93 92 <tr><td height="10px"></td></tr>
... ... @@ -131,11 +130,11 @@
131 130 <tr>
132 131 <td align="center" valign="top" width="100%">
133 132 <table border="0" cellpadding="0" cellspacing="0" width="682">
134   - <tr><td background="images/top_white.png" width="100%" height="30" align="center" valign="top">
  133 + <tr><td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/top_white.png" width="100%" height="30" align="center" valign="top">
135 134  
136 135 </td></tr>
137 136 <tr>
138   - <td align="center" background="images/center_white.png">
  137 + <td align="center" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/center_white.png">
139 138  
140 139 <table border="0" cellpadding="0" cellspacing="0" width="620px">
141 140 <tr><td align="center">
... ... @@ -154,7 +153,7 @@
154 153 <tr><td height="10px"></td></tr>
155 154 <tr>
156 155 <td align="center">
157   - <table border="0" cellpadding="0" cellspacing="0" background="images/buy_but.png" width="127px" height="39px" style="background-position:center center;background-repeat:no-repeat;">
  156 + <table border="0" cellpadding="0" cellspacing="0" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/buy_but.png" width="127px" height="39px" style="background-position:center center;background-repeat:no-repeat;">
158 157 <tr><td align="center" style="font-weight:bold;text-align:center;color: #fff;font-family: Calibri;font-size: 24px;line-height: 18px;letter-spacing: -0.2px;">5318219</td></tr>
159 158 </table>
160 159 </td>
... ... @@ -166,7 +165,7 @@
166 165 <tr><td height="10px"></td></tr>
167 166 <tr>
168 167 <td align="center">
169   - <table border="0" cellpadding="0" cellspacing="0" background="images/buy_but.png" width="127px" height="39px" style="background-position:center center;background-repeat:no-repeat;">
  168 + <table border="0" cellpadding="0" cellspacing="0" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/buy_but.png" width="127px" height="39px" style="background-position:center center;background-repeat:no-repeat;">
170 169 <tr><td align="center" style="font-weight:bold;text-align:center;color: #fff;font-family: Calibri;font-size: 24px;line-height: 18px;letter-spacing: -0.2px;">7826236</td></tr>
171 170 </table>
172 171 </td>
... ... @@ -195,7 +194,7 @@
195 194 </td>
196 195 </tr>
197 196 <tr>
198   - <td background="images/bottom_white.png" width="100%" style="background-position: bottom center;" align="center" valign="top">
  197 + <td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/bottom_white.png" width="100%" style="background-position: bottom center;" align="center" valign="top">
199 198 <table border="0" cellpadding="0" cellspacing="0" width="620px">
200 199  
201 200 <tr><td height="30px"></td>
... ... @@ -213,7 +212,7 @@
213 212  
214 213 <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>
215 214 <td>
216   - <table cellpadding="0" cellspacing="0" border="0" width="100%" height="236" background="images/bg-2.jpg">
  215 + <table cellpadding="0" cellspacing="0" border="0" width="100%" height="236" background="http://<?= \config::get( 'global#domains/www' ) ?>/images/bg-2.jpg">
217 216 <tr>
218 217 <td align="center">
219 218 <table cellspacing="0" border="0" cellpadding="0" width="660">
... ... @@ -231,11 +230,11 @@
231 230 </td>
232 231 <td align="center">
233 232 <table cellspacing="0" cellpadding="0" border="0">
234   - <tr><td background="images/tel01.png" width="150" height="29" title="(044) 581-67-15" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
235   - <tr><td background="images/tel02.png" width="150" height="29" title="(044) 451-48-59" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
236   - <tr><td background="images/tel03.png" width="150" height="29" title="(050) 464-48-49" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
237   - <tr><td background="images/tel04.png" width="150" height="29" title="(067) 464-48-59" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
238   - <tr><td background="images/tel05.png" width="150" height="29" title="(093) 026-86-64" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
  233 + <tr><td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/tel01.png" width="150" height="29" title="(044) 581-67-15" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
  234 + <tr><td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/tel02.png" width="150" height="29" title="(044) 451-48-59" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
  235 + <tr><td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/tel03.png" width="150" height="29" title="(050) 464-48-49" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
  236 + <tr><td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/tel04.png" width="150" height="29" title="(067) 464-48-59" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
  237 + <tr><td background="http://<?= \config::get( 'global#domains/www' ) ?>/images/tel05.png" width="150" height="29" title="(093) 026-86-64" style="background-position: top left; background-repeat:no-repeat;"></td></tr>
239 238 </table>
240 239 </td>
241 240 <td align="right">
... ... @@ -244,9 +243,9 @@
244 243 <td>
245 244 <table cellspacing="0" cellpadding="0" border="0" width="168" style="text-align: right">
246 245 <tr>
247   - <td><a target="_blank" href="https://www.facebook.com/Professionalseeds"><img src="images/fb.png" width="48" height="48" border="0" alt=""></a></td>
248   - <td><a target="_blank" href="https://www.youtube.com/channel/UCMnG-NxtoprcTxKcPouwWdQ"><img src="images/youtube.png" width="48" height="48" border="0" alt=""></a></td>
249   - <td><a target="_blank" href="https://vk.com/public116774284"><img src="images/vk.png" width="48" height="48" border="0" alt=""></a></td>
  246 + <td><a target="_blank" href="https://www.facebook.com/Professionalseeds"><img src="http://<?= \config::get( 'global#domains/www' ) ?>/images/fb.png" width="48" height="48" border="0" alt=""></a></td>
  247 + <td><a target="_blank" href="https://www.youtube.com/channel/UCMnG-NxtoprcTxKcPouwWdQ"><img src="http://<?= \config::get( 'global#domains/www' ) ?>/images/youtube.png" width="48" height="48" border="0" alt=""></a></td>
  248 + <td><a target="_blank" href="https://vk.com/public116774284"><img src="http://<?= \config::get( 'global#domains/www' ) ?>/images/vk.png" width="48" height="48" border="0" alt=""></a></td>
250 249 </tr>
251 250 </table>
252 251 </td>
... ...
src/lib/sendmail.php
... ... @@ -300,13 +300,13 @@ namespace
300 300 'X-Mailer: PHP/' . phpversion();
301 301  
302 302 //msg body
303   - $view = new \Phalcon\Mvc\View();
304   - $view->setViewsDir( ROOT_PATH.config::get( 'dirs/viewsDir' ) );
305   - $view->start();
306   - $view->pick( 'basket/abandoned' );
307   - $view->finish();
308   - $body = $view->getContent();
309   - //$body = file_get_contents(ROOT_PATH.config::get( 'dirs/viewsDir' ).'abandoned_basket.php');
  303 +// $view = new \Phalcon\Mvc\View();
  304 +// $view->setViewsDir( ROOT_PATH.config::get( 'dirs/viewsDir' ) );
  305 +// $view->start();
  306 +// $view->render( 'basket', 'abandoned' );
  307 +// $view->finish();
  308 +// $body = $view->getContent();
  309 + $body = file_get_contents(ROOT_PATH.config::get( 'dirs/viewsDir' ).'basket/abandoned.php');
310 310  
311 311 if( mail( $email, $data_base['subject'], $body, $header, '-f '.$email_from ) ) {
312 312 return true;
... ...