Вход • Регистрация

Таблица заказа в письме

  • 09 марта 2014 г.
  • В настройках уведомления "Сообщение пользователю о новом заказе" таблица с заказом выводиться через %order
    Я так понял верстка таблицы берется та же что и на сайте. Но у меня эта таблица сверстана дивами и списками - поэтому на почту приходит полная каша.

    Как можно сделать отдельный шаблон этой таблицы и выводить его в письме?
    • 09 марта 2014 г.
    • Если честно не сталкивался с данной проблемой, но по меому для e-mail рассылок стили прописываются инлайново
  • 15 марта 2014 г.
  • В общем, так
    Если у кого похожая проблема или просто хотите нормально оформить таблицу заказа в e-mail уведомлении, то делается это так:

    1. Берем файл вывода таблицы modules/cart/views/cart.view.table.php и делаем его копию, например называем его cart.view.table_email.php
    2. Меняем в нем оформление на нужное. Как уже выше сказал Сергей (darkheart), стили должны быть прописаны инлайн т.е. внедренные.
    3. Загружаем файл на сервер.
    4. В файле modules/cart/views/cart.ajax.php строка 539 $cart = $this->diafan->_tpl->get('table', 'cart', $result_cart); меняем table, на table_email т.е. указываем на нашу копию шаблон. За эту подсказку спасибо тех. поддержке.
    Все!
  • 13 августа 2017 г.
  • Всем добрый вечер! Товарищи, кто сможет помочь? Сверстал в befree письмо в html, все нормально. Но табличка cart.view.table_email.php на компьютере нормально отображается при получении, а на телефоне полная ерунда столбец с названием товара узкий становится, как я понял благодаря адаптивности верстки письма. Залез сам попробовал поковыряться убрать наименование, получаю ошибку в синтаксе. Может кто сталкивался, по-хорошему оставить название, артикул, но чтоб все не съезжало. Либо удалить, оставить только картинку. Или как вариант название товара вывести в столбце с картинкой (под ней).

    В общем, если кто сможет помочь, буду очень признателен!

    Во вложении скриншоты письма на компьютере, на телефоне.
    html письма
    Код
    <!-- [if gte mso 9]><xml>
    <o:OfficeDocumentSettings>
    <o:AllowPNG/>
    <o:PixelsPerInch>96</o:PixelsPerInch>
    </o:OfficeDocumentSettings>
    </xml><![endif]--><!-- [if !mso]><!--><!--<![endif]-->
    <p>&nbsp;</p>
    <!-- [if !mso]><!-- -->
    <p>&nbsp;</p>
    <!--<![endif]--><!-- [if IE]><div class="ie-browser"><![endif]-->
    <p>&nbsp;</p>
    <!-- [if mso]><div class="mso-container"><![endif]-->
    <div class="nl-container" style="min-width: 320px; margin: 0 auto; background-color: #ffffff;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #FFFFFF;"><![endif]-->
    <div style="background-color: transparent;">
    <div class="block-grid two-up" style="margin: 0 auto; min-width: 320px; max-width: 620px; width: calc(31000% - 197780px); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
    <div style="border-collapse: collapse; display: table; width: 100%;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="background-color:transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width: 620px;"><tr class="layout-full-width" style="background-color:transparent;"><![endif]--> <!-- [if (mso)|(IE)]><td align="center" width="310" style=" width:310px; padding-right: 10px; padding-left: 10px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num6" style="float: left; max-width: 320px; min-width: 310px; width: calc(6510px - 1000%); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 10px 5px 10px;"><!--<![endif]-->
    <div class="img-container left fullwidth" style="padding-right: 5px; padding-left: 5px;" align="left"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 5px; padding-left: 5px;" align="left"><![endif]-->
    <div style="line-height: 5px; font-size: 1px;">&nbsp;</div>
    <a href="https://xn--90ablmekqdsdu6h.xn--p1ai/" target="_blank"> <img class="left fullwidth" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: none; height: auto; float: none; width: 100%; max-width: 280px;" title="LOGO" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/188_logo3.png" alt="LOGO" width="280" align="left" border="0" /> </a>
    <div style="line-height: 5px; font-size: 1px;">&nbsp;</div>
    <!-- [if mso]></td></tr></table><![endif]--></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td><td align="center" width="310" style=" width:310px; padding-right: 10px; padding-left: 10px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num6" style="float: left; max-width: 320px; min-width: 310px; width: calc(6510px - 1000%); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 10px 5px 10px;"><!--<![endif]--> <!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px; padding-top: 15px; padding-bottom: 15px;"><![endif]-->
    <div style="font-family: TimesNewRoman, 'Times New Roman', Times, Baskerville, Georgia, serif; color: #555555; line-height: 120%; padding: 15px 0px 15px 0px;">
    <div style="font-size: 12px; line-height: 14px; font-family: TimesNewRoman, 'Times New Roman', Times, Baskerville, Georgia, serif; color: #555555; text-align: left;">
    <p style="margin: 0; font-size: 14px; line-height: 17px; text-align: center;"><em>Интернет-магазин станков для бритья и аксессуаров МужскойВыбор.рф</em></p>
    </div>
    </div>
    <!-- [if mso]></td></tr></table><![endif]-->
    <div class="button-container center" style="padding: 10px;" align="center"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top:10px; padding-bottom:10px;" align="center"><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="tel:+79053000309" style="height:40px; v-text-anchor:middle; width:256px;" arcsize="23%" strokecolor="#3AAEE0" fillcolor="#3AAEE0"><w:anchorlock/><center style="color:#ffffff; font-family:'Lato', Tahoma, Verdana, Segoe, sans-serif; font-size:20px;"><![endif]--> <a style="display: inline-block; text-decoration: none; -webkit-text-size-adjust: none; text-align: center; color: #ffffff; background-color: #3aaee0; border-radius: 9px; -webkit-border-radius: 9px; -moz-border-radius: 9px; max-width: 236px; width: 85%; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; mso-border-alt: none; border: 0px solid transparent; padding: 0px;" href="tel:+79053000309" target="_blank"> <span style="font-size: 12px; line-height: 24px;"><span style="font-size: 20px;"><strong><span style="line-height: 40px;">+7(905)3000-309</span></strong></span></span> </a> <!-- [if mso]></center></v:roundrect></td></tr></table><![endif]--></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    </div>
    <div style="background-color: transparent;">
    <div class="block-grid " style="margin: 0 auto; min-width: 320px; max-width: 620px; width: calc(31000% - 197780px); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
    <div style="border-collapse: collapse; display: table; width: 100%;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="background-color:transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width: 620px;"><tr class="layout-full-width" style="background-color:transparent;"><![endif]--> <!-- [if (mso)|(IE)]><td align="center" width="620" style=" width:620px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num12" style="min-width: 320px; max-width: 620px; width: calc(30000% - 185380px); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 0px 5px 0px;"><!--<![endif]-->
    <div class="img-container center" style="padding-right: 0px; padding-left: 0px;" align="center"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px;" align="center"><![endif]--> <img class="center" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: 0; height: auto; float: none; width: 100%; max-width: 250px;" title="Image" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13107_okok.gif" alt="Image" width="250" align="center" border="0" /> <!-- [if mso]></td></tr></table><![endif]--></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    </div>
    <div style="background-color: transparent;">
    <div class="block-grid " style="margin: 0 auto; min-width: 320px; max-width: 620px; width: calc(31000% - 197780px); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
    <div style="border-collapse: collapse; display: table; width: 100%;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="background-color:transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width: 620px;"><tr class="layout-full-width" style="background-color:transparent;"><![endif]--> <!-- [if (mso)|(IE)]><td align="center" width="620" style=" width:620px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:10px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num12" style="min-width: 320px; max-width: 620px; width: calc(30000% - 185380px); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 0px 10px 0px;"><!--<![endif]--> <!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 5px;"><![endif]-->
    <div style="font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; color: #000000; line-height: 120%; padding: 10px 10px 5px 10px;">
    <div style="font-size: 12px; line-height: 14px; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; color: #000000; text-align: left;">
    <p style="margin: 0; font-size: 14px; line-height: 17px; text-align: center;"><strong><span style="font-size: 18px; line-height: 21px;">Спасибо, что сделали заказ в МужскойВыбор.рф!</span></strong></p>
    </div>
    </div>
    <!-- [if mso]></td></tr></table><![endif]--> <!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 25px;"><![endif]-->
    <div style="font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; color: #71777d; line-height: 120%; padding: 10px 10px 25px 10px;">
    <div style="font-size: 12px; line-height: 14px; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; color: #71777d; text-align: left;">
    <p style="margin: 0; font-size: 14px; line-height: 17px; text-align: center;">Ниже представлена информация о Вашем заказе.</p>
    </div>
    </div>
    <!-- [if mso]></td></tr></table><![endif]--> <!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;"><![endif]-->
    <div style="color: #555555; line-height: 120%; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; padding: 10px;">
    <div style="font-size: 12px; line-height: 14px; color: #555555; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; text-align: left;">
    <p style="margin: 0; font-size: 14px; line-height: 17px;">Номер заказа: %id<br />%order<br />Способ оплаты: %payment<br /><br />%message</p>
    </div>
    </div>
    <!-- [if mso]></td></tr></table><![endif]-->
    <div style="padding: 10px;"><!-- [if (mso)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px;padding-left: 10px; padding-top: 10px; padding-bottom: 10px;"><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
    <div align="center">
    <div style="border-top: 1px solid #BBBBBB; width: 100%; line-height: 1px; height: 1px; font-size: 1px;">&nbsp;</div>
    </div>
    <!-- [if (mso)]></td></tr></table></td></tr></table><![endif]--></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    </div>
    <div style="background-color: transparent;">
    <div class="block-grid mixed-two-up" style="margin: 0 auto; min-width: 320px; max-width: 620px; width: calc(31000% - 197780px); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
    <div style="border-collapse: collapse; display: table; width: 100%;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="background-color:transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width: 620px;"><tr class="layout-full-width" style="background-color:transparent;"><![endif]--> <!-- [if (mso)|(IE)]><td align="center" width="207" style=" width:207px; padding-right: 10px; padding-left: 10px; padding-top:15px; padding-bottom:15px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num4" style="float: left; max-width: 320px; min-width: 204px; width: calc(72124px - 11600%); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 15px 10px 15px 10px;"><!--<![endif]-->
    <div class="img-container center" style="padding-right: 0px; padding-left: 0px;" align="center"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px;" align="center"><![endif]--> <img class="center" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: 0; height: auto; float: none; width: 100%; max-width: 160px;" title="Image" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13109_avatar.png" alt="Image" width="160" align="center" border="0" /> <!-- [if mso]></td></tr></table><![endif]--></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td><td align="center" width="413" style=" width:413px; padding-right: 0px; padding-left: 0px; padding-top:15px; padding-bottom:15px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num8" style="float: left; min-width: 320px; max-width: 408px; width: calc(9800% - 62312px); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 15px 0px 15px 0px;"><!--<![endif]--> <!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;"><![endif]-->
    <div style="color: #555555; line-height: 120%; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; padding: 10px;">
    <div style="font-size: 12px; line-height: 14px; color: #555555; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; text-align: left;">
    <p style="margin: 0; font-size: 12px; line-height: 14px; text-align: justify;"><span style="font-size: 16px; line-height: 19px;"><em>"Нам очень важно, как Вы оцениваете нашу работу, пожалуйста оставьте отзыв на нашем сайте. Несколько предложений помогут другим покупателям и сделают нашу работу еще лучше! "</em></span></p>
    </div>
    </div>
    <!-- [if mso]></td></tr></table><![endif]-->
    <div class="button-container center" style="padding: 10px;" align="center"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top:10px; padding-bottom:10px;" align="center"><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="" style="height:42px; v-text-anchor:middle; width:185px;" arcsize="10%" strokecolor="#3AAEE0" fillcolor="#3AAEE0"><w:anchorlock/><center style="color:#ffffff; font-family:'Lato', Tahoma, Verdana, Segoe, sans-serif; font-size:16px;"><![endif]--> <a style="color: #ffffff; background-color: #3aaee0; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; max-width: 195px; width: auto; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; text-align: center; mso-border-alt: none; border: 0px solid transparent; padding: 5px 20px 5px 20px;" href="https://мужскойвыбор.рф/reviews/" target="_blank"> <span style="font-size: 16px; line-height: 32px;">ОСТАВИТЬ ОТЗЫВ&rarr;</span></a> <!-- [if mso]></center></v:roundrect></td></tr></table><![endif]--></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    </div>
    <div style="background-color: transparent;">
    <div class="block-grid " style="margin: 0 auto; min-width: 320px; max-width: 620px; width: calc(31000% - 197780px); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
    <div style="border-collapse: collapse; display: table; width: 100%;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="background-color:transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width: 620px;"><tr class="layout-full-width" style="background-color:transparent;"><![endif]--> <!-- [if (mso)|(IE)]><td align="center" width="620" style=" width:620px; padding-right: 0px; padding-left: 0px; padding-top:0px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num12" style="min-width: 320px; max-width: 620px; width: calc(30000% - 185380px); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 0px 0px 5px 0px;"><!--<![endif]--> <!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;"><![endif]-->
    <div style="color: #555555; line-height: 120%; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; padding: 10px;">
    <div style="font-size: 12px; line-height: 14px; color: #555555; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; text-align: left;">
    <p style="margin: 0; font-size: 12px; line-height: 14px; text-align: center;"><span style="font-size: 16px; line-height: 19px;">С уважением, Станислав! Руководитель интернет-магазина МужскойВыбор.рф.</span></p>
    </div>
    </div>
    <!-- [if mso]></td></tr></table><![endif]-->
    <div style="padding: 15px 10px 15px 10px;"><!-- [if (mso)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px;padding-left: 10px; padding-top: 15px; padding-bottom: 15px;"><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
    <div align="center">
    <div style="border-top: 1px dotted #CCCCCC; width: 100%; line-height: 1px; height: 1px; font-size: 1px;">&nbsp;</div>
    </div>
    <!-- [if (mso)]></td></tr></table></td></tr></table><![endif]--></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    </div>
    <div style="background-color: transparent;">
    <div class="block-grid four-up" style="margin: 0 auto; min-width: 320px; max-width: 620px; width: calc(31000% - 197780px); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
    <div style="border-collapse: collapse; display: table; width: 100%;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="background-color:transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width: 620px;"><tr class="layout-full-width" style="background-color:transparent;"><![endif]--> <!-- [if (mso)|(IE)]><td align="center" width="155" style=" width:155px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num3" style="float: left; max-width: 320px; min-width: 155px; width: calc(102455px - 16500%); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 0px 5px 0px;"><!--<![endif]-->
    <div class="img-container center fullwidth" style="padding-right: 0px; padding-left: 0px;" align="center"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px;" align="center"><![endif]--> <a href="https://мужскойвыбор.рф/shop/stanki-dlya-britya/" target="_blank"> <img class="center fullwidth" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: 0; height: auto; float: none; width: 100%; max-width: 155px;" title="" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13101_1.png" alt="СТАНКИ ДЛЯ БРИТЬЯ" width="155" align="center" border="0" /> <!-- [if mso]></td></tr></table><![endif]--></a></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td><td align="center" width="155" style=" width:155px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num3" style="float: left; max-width: 320px; min-width: 155px; width: calc(102455px - 16500%); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 0px 5px 0px;"><!--<![endif]-->
    <div class="img-container center fullwidth" style="padding-right: 0px; padding-left: 0px;" align="center"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px;" align="center"><![endif]--> <a href="https://мужскойвыбор.рф/shop/nabory/" target="_blank"><img class="center fullwidth" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: 0; height: auto; float: none; width: 100%; max-width: 155px;" title="" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13105_2.png" alt="НАБОРЫ" width="155" align="center" border="0" /> <!-- [if mso]></td></tr></table><![endif]--></a></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td><td align="center" width="155" style=" width:155px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num3" style="float: left; max-width: 320px; min-width: 155px; width: calc(102455px - 16500%); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 0px 5px 0px;"><!--<![endif]-->
    <div class="img-container center fullwidth" style="padding-right: 0px; padding-left: 0px;" align="center"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px;" align="center"><![endif]--><a href="https://мужскойвыбор.рф/shop/sredstva-dlya-britya/" target="_blank"><img class="center fullwidth" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: 0; height: auto; float: none; width: 100%; max-width: 155px;" title="" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13106_3.png" alt="СРЕДСТВА ДЛЯ БРИТЬЯ" width="155" align="center" border="0" /> <!-- [if mso]></td></tr></table><![endif]--></a></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td><td align="center" width="155" style=" width:155px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num3" style="float: left; max-width: 320px; min-width: 155px; width: calc(102455px - 16500%); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 0px 5px 0px;"><!--<![endif]-->
    <div class="img-container center fullwidth" style="padding-right: 0px; padding-left: 0px;" align="center"><!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px;" align="center"><![endif]--> <a href="https://мужскойвыбор.рф/shop/pomazki/" target="_blank"><img class="center fullwidth" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: 0; height: auto; float: none; width: 100%; max-width: 155px;" title="" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13102_4.png" alt="ПОМАЗКИ" width="155" align="center" border="0" /> <!-- [if mso]></td></tr></table><![endif]--></a></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    </div>
    <div style="background-color: transparent;">
    <div class="block-grid " style="margin: 0 auto; min-width: 320px; max-width: 620px; width: calc(31000% - 197780px); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
    <div style="border-collapse: collapse; display: table; width: 100%;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="background-color:transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width: 620px;"><tr class="layout-full-width" style="background-color:transparent;"><![endif]--> <!-- [if (mso)|(IE)]><td align="center" width="620" style=" width:620px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:0px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num12" style="min-width: 320px; max-width: 620px; width: calc(30000% - 185380px); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 0px 0px 0px;"><!--<![endif]-->
    <div style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px;" align="center">
    <div style="line-height: 5px; font-size: 1px;">&nbsp;</div>
    <div style="display: table; max-width: 141;"><!-- [if (mso)|(IE)]><table width="131" cellpadding="0" cellspacing="0" border="0"><tr><td style="border-collapse:collapse; padding-right: 5px; padding-left: 5px; padding-bottom: 5px;" align="center"><table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; mso-table-lspace: 0pt;mso-table-rspace: 0pt; width:131px;"><tr><td width="32" style="width:32px; padding-right: 5px;" valign="top"><![endif]-->
    <table style="border-collapse: collapse; table-layout: fixed; border-spacing: 0; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top; margin-right: 5px;" border="0" width="32" cellspacing="0" cellpadding="0" align="left">
    <tbody>
    <tr style="vertical-align: top;">
    <td style="word-break: break-word; border-collapse: collapse !important; vertical-align: top;" align="left" valign="middle"><a title="Facebook" href="https://www.facebook.com/mensface/" target="_blank"> <img style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: none; height: auto; float: none; max-width: 32px !important;" title="Facebook" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13108_facebook2x.png" alt="Facebook" width="32" /> </a>
    <div style="line-height: 5px; font-size: 1px;">&nbsp;</div>
    </td>
    </tr>
    </tbody>
    </table>
    <!-- [if (mso)|(IE)]></td><td width="32" style="width:32px; padding-right: 5px;" valign="top"><![endif]-->
    <table style="border-collapse: collapse; table-layout: fixed; border-spacing: 0; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top; margin-right: 5px;" border="0" width="32" cellspacing="0" cellpadding="0" align="left">
    <tbody>
    <tr style="vertical-align: top;">
    <td style="word-break: break-word; border-collapse: collapse !important; vertical-align: top;" align="left" valign="middle"><a title="YouTube" href="https://www.youtube.com/channel/UC8c6f_uZ5t-BKj9T9eergow" target="_blank"> <img style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: none; height: auto; float: none; max-width: 32px !important;" title="YouTube" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13104_youtube2x.png" alt="YouTube" width="32" /> </a>
    <div style="line-height: 5px; font-size: 1px;">&nbsp;</div>
    </td>
    </tr>
    </tbody>
    </table>
    <!-- [if (mso)|(IE)]></td><td width="32" style="width:32px; padding-right: 0;" valign="top"><![endif]-->
    <table style="border-collapse: collapse; table-layout: fixed; border-spacing: 0; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top; margin-right: 0;" border="0" width="32" cellspacing="0" cellpadding="0" align="left">
    <tbody>
    <tr style="vertical-align: top;">
    <td style="word-break: break-word; border-collapse: collapse !important; vertical-align: top;" align="left" valign="middle"><a title="Instagram" href="https://www.instagram.com/mensface.ru/" target="_blank"> <img style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; display: block !important; border: none; height: auto; float: none; max-width: 32px !important;" title="Instagram" src="https://xn--90ablmekqdsdu6h.xn--p1ai/userfiles/editor/large/2/13103_instagram2x.png" alt="Instagram" width="32" /> </a>
    <div style="line-height: 5px; font-size: 1px;">&nbsp;</div>
    </td>
    </tr>
    </tbody>
    </table>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    <div style="padding: 15px 10px 15px 10px;"><!-- [if (mso)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px;padding-left: 10px; padding-top: 15px; padding-bottom: 15px;"><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
    <div align="center">
    <div style="border-top: 1px dotted #CCCCCC; width: 100%; line-height: 1px; height: 1px; font-size: 1px;">&nbsp;</div>
    </div>
    <!-- [if (mso)]></td></tr></table></td></tr></table><![endif]--></div>
    <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    </div>
    <div style="background-color: transparent;">
    <div class="block-grid " style="margin: 0 auto; min-width: 320px; max-width: 620px; width: calc(31000% - 197780px); overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
    <div style="border-collapse: collapse; display: table; width: 100%;"><!-- [if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="background-color:transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width: 620px;"><tr class="layout-full-width" style="background-color:transparent;"><![endif]--> <!-- [if (mso)|(IE)]><td align="center" width="620" style=" width:620px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><![endif]-->
    <div class="col num12" style="min-width: 320px; max-width: 620px; width: calc(30000% - 185380px); background-color: transparent;">
    <div style="background-color: transparent; width: 100% !important;"><!-- [if (!mso)&(!IE)]><!-->
    <div style="border: 0px solid transparent; padding: 5px 0px 5px 0px;"><!--<![endif]--> <!-- [if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;"><![endif]-->
    <div style="font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; color: #555555; line-height: 120%; padding: 10px;">
    <div style="font-size: 12px; line-height: 14px; color: #555555; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; text-align: left;">
    <p style="margin: 0; font-size: 12px; line-height: 14px; text-align: center;"><a style="color: #71777d; text-decoration: underline;" href="https://xn--90ablmekqdsdu6h.xn--p1ai/" target="_blank" rel="noopener noreferrer">МужскойВыбор.рф - станки для бритья и аксессуары</a> , <a style="color: #71777d; text-decoration: underline;" title="tel:+78462670309" href="tel:+78462670309">+7(846)267-0-309</a>, <a style="color: #71777d; text-decoration: underline;" title="tel:+79053000309" href="tel:+79053000309">+7(905)3000-309</a></p>
    </div>
    </div>
    <!-- [if mso]></td></tr></table><![endif]--> <!-- [if (!mso)&(!IE)]><!--></div>
    <!--<![endif]--></div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div>
    </div>
    </div>
    <!-- [if (mso)|(IE)]></td></tr></table><![endif]--></div>
    <!-- [if (mso)|(IE)]></div><![endif]-->

    cart.view.table_email.php
    Код
    <?php
    /**
    * Шаблон таблицы с товарами, отправляемый пользователю по почте
    *
    * @package DIAFAN.CMS
    * @author diafan.ru
    * @version 6.0
    * @license http://www.diafan.ru/license.html
    * @copyright Copyright (c) 2003-2017 OOO «Диафан» (http://www.diafan.ru/)
    */

    if (! defined('DIAFAN')) {
    $path = __FILE__; $i = 0;
    while(! file_exists($path.'/includes/404.php'))
    {
    if($i == 10) exit; $i++;
    $path = dirname($path);
    }
    include $path.'/includes/404.php';
    }


    //шапка таблицы
    echo '<table cellpadding="5" bgcolor="#eeeeee">
    <thead><tr>
    <th bgcolor="#f9f9f9"></th>
    <th bgcolor="#f9f9f9">'.$this->diafan->_('Наименование товара').'</th>';
    if(! empty($result["measure_unit"]))
    {
    echo '<th bgcolor="#f9f9f9">'.$this->diafan->_('Единица измерения').'</th>';
    }
    echo '
    <th bgcolor="#f9f9f9">'.$this->diafan->_('Кол-во').'</th>
    <th bgcolor="#f9f9f9" nowrap>'.$this->diafan->_('Цена').'('.$result["currency"].')</th>';
    if($result["discount"])
    {
    echo '<th bgcolor="#f9f9f9" nowrap>'.$this->diafan->_('Скидка').'('.$result["currency"].')</th>';
    echo '<th bgcolor="#f9f9f9">'.$this->diafan->_('Скидка').'(%)</th>';
    }
    echo '<th bgcolor="#f9f9f9" nowrap>'.$this->diafan->_('Сумма').'('.$result["currency"].')</th>
    </tr></thead><tbody>';

    //товары
    if (! empty($result["rows"]))
    {
    foreach ($result["rows"] as $row)
    {
    echo '
    <tr>
    <td bgcolor="#ffffff">';
    if (!empty($row["img"]))
    {
    echo '<a href="'.BASE_PATH_HREF.$row["link"].'"><img src="http'.(IS_HTTPS ? "s" : '')."://".getenv("HTTP_HOST").$row["img"]["src"].'" width="'.$row["img"]["width"].'" height="'.$row["img"]["height"].'" alt="'.$row["img"]["alt"].'" title="'.$row["img"]["title"].'"></a> ';
    }
    echo '</td>
    <td bgcolor="#ffffff">';
    if(! empty($row["cat"]))
    {
    echo '<a href="'.BASE_PATH_HREF.$row["cat"]["link"].'">'.$row["cat"]["name"].'</a> / ';
    }
    echo '<a href="'.BASE_PATH_HREF.$row["link"].'">'.$row["name"];
    if(! empty($row["param"]))
    {
    foreach($row["param"] as $name => $value)
    {
    echo ', '.$name.': '.$value;
    }
    }
    if(! empty($row["article"]))
    {
    echo '<br/>'.$this->diafan->_('Артикул').': '.$row["article"];
    }
    echo '</a>';
    if(! empty($row["additional_cost"]))
    {
    foreach($row["additional_cost"] as $a)
    {
    echo '<br>'.$a["name"];
    if($a["summ"])
    {
    echo ' + '.$a["format_summ"].' '.$result["currency"];
    }
    }
    }
    echo '</td>';
    if(! empty($result["measure_unit"]))
    {
    echo '<td bgcolor="#ffffff">'.($row["measure_unit"] ? $row["measure_unit"] : $this->diafan->_('шт.')).'</td>';
    }
    echo '
    <td bgcolor="#ffffff">'.$row["count"].'</td>';
    if($result["discount"])
    {
    echo '<td bgcolor="#ffffff">'.($row["old_price"] ? $row["old_price"] : $row["price"]).'</td>';
    echo '<td bgcolor="#ffffff">'.($row["old_price"] ? $row["price"] : '').'</td>';
    echo '<td bgcolor="#ffffff">'.($row["discount"] ? $row["discount"] : '').'</td>';
    }
    else
    {
    echo '<td bgcolor="#ffffff">'.$row["price"].'</td>';
    }
    echo '
    <td bgcolor="#ffffff">'.$row["summ"].'</td>
    </tr>';
    }

    if(! empty($result["old_summ_goods"]))
    {
    echo '
    <tr>
    <td bgcolor="#ffffff" colspan="'.($result["discount"] ? 6 : 4).'" align="right">'.$this->diafan->_('Итого без скидок').'</td>
    <th bgcolor="#ffffff">'.$result["old_summ_goods"].'</th>
    </tr>';
    }

    // общая скидка от объема
    if(! empty($result["discount_summ"]))
    {
    echo '
    <tr>
    <td bgcolor="#ffffff" colspan="'.($result["discount"] ? 6 : 4).'" align="right">'.$this->diafan->_('Общая скидка').'</td>
    <th bgcolor="#ffffff">'.$result["discount_summ"].'</th>
    </tr>';
    }



    //итоговая строка для товаров
    echo '
    <tr>

    <td bgcolor="#fefefe" colspan="2" align="right">'.$this->diafan->_('Всего товаров').'</td>';
    if(! empty($result["measure_unit"]))
    {
    echo '<td bgcolor="#ffffff"></td>';
    }
    echo '<th bgcolor="#fefefe">'.$result["count"].'</th>
    <td align="right" bgcolor="#ffffff" colspan="'.($result["discount"] ? 3 : 1).'">'.$this->diafan->_('на сумму').'</td>';
    echo '
    <th bgcolor="#fefefe">';
    echo $result["summ_goods"];
    echo '</th>
    </tr>';



    $count_clm = 0;
    if(! empty($result["discount"]))
    {
    $count_clm += 2;
    }
    if(! empty($result["measure_unit"]))
    {
    $count_clm++;
    }

    //дополнительно
    if (! empty($result["additional_cost"]))
    {
    echo '<tr><th colspan="'.($count_clm + 5).'" bgcolor="#ffffff" align="right">'.$this->diafan->_('Дополнительно').'</th></tr>';
    foreach ($result["additional_cost"] as $row)
    {
    if ($row['amount'])
    {
    $row['text'] .= '<br>'.$this->diafan->_('Бесплатно от суммы').' '.$row['amount'].' '.$result["currency"];
    }
    echo '
    <tr>
    <td bgcolor="#ffffff" colspan="'.($count_clm + 3).'">
    <div class="cart_additional_cost_name">'.$row["name"].'</div>
    </td>
    <td bgcolor="#ffffff">'.($row['percent'] ? $row['percent'].'%' : $row["price"]).'</td>
    <th bgcolor="#ffffff">'.$row["summ"].'</th>
    </tr>';
    }
    }

    //способы доставки
    if (! empty($result["delivery"]))
    {
    echo '<tr><td colspan="'.($count_clm + 4).'" bgcolor="#ffffff" align="right">'.$this->diafan->_('Способ доставки').': '.$result["delivery"]["name"].'
    </td>
    <th bgcolor="#ffffff">'.$result["delivery"]["summ"].'</th>
    </tr>';
    }
    }


    //итоговая строка таблицы
    echo '
    <tr>
    <th bgcolor="#ffffff" align="right" colspan="'.($count_clm + 4).'">'.$this->diafan->_('Итого к оплате').'</th>';

    echo '<th bgcolor="#ffffff">'.$result["summ"];
    if(! empty($result["tax"]))
    {
    echo '<br>'.$this->diafan->_('в т. ч. %s', true, $result["tax_name"]).'<br>'.$result["tax"];
    }
    echo '</th>
    </tr></tbody>
    </table>';
  • 14 августа 2017 г.
  • Кто-нибудь сможет помочь за небольшой профит изменить верстку, как в схеме от Дмитрия? (Дмитрий улетел, но обещал вернуться)
    • 14 августа 2017 г. , редакция: 14 августа 2017 г.
    • Станислав, советую делать верстку писем на сайте сервисных рассылок.
      Потом просто берешь исходный код и вставляешь его к себе куда нужно.
      Получается идеально, ну или по крайне мере лучше не сделаешь, потому что сервисы рассылок по максимум добиваются результата от верстки писем.

      Лично я пользуюсь sendpulse, там для новичков есть бесплатный тариф до 2000 подписчиков, но для тебя главное это сверстать письмо, а там это можно сделать бесплатно.
  • 14 августа 2017 г.
  • Стапан, спасибо за совет! Вечером гляну. Только сдается мне, я неправильно описал что мне нужно. Через этот сервис я сверстаю письмо. В принципе тоже самое сделал в https://beefree.io/ Но в письмо вставляется табличка, которая в html выглядит как %order. А сама табличка прописана в cart.view.table_email.php. Ваш сервис же не сможет мне его сделать. Это мне нужно его править как-то правильно? Там свой синтаксис, если сверстаю таблицу в html редакторе, я же не смогу ее вставить в php?
    • 14 августа 2017 г.
    • Почему?
      Выше вы привели код, в котором
      Код
      //шапка таблицы
      echo '<table cellpadding="5" bgcolor="#eeeeee">
      <thead><tr>
      <th bgcolor="#f9f9f9"></th>
      <th bgcolor="#f9f9f9">'.$this->diafan->_('Наименование товара').'</th>';
      if(! empty($result["measure_unit"]))
      {
      echo '<th bgcolor="#f9f9f9">'.$this->diafan->_('Единица измерения').'</th>';
      }
      echo '
      <th bgcolor="#f9f9f9">'.$this->diafan->_('Кол-во').'</th>
      <th bgcolor="#f9f9f9" nowrap>'.$this->diafan->_('Цена').'('.$result["currency"].')</th>';
      if($result["discount"])
      {
      echo '<th bgcolor="#f9f9f9" nowrap>'.$this->diafan->_('Скидка').'('.$result["currency"].')</th>';
      echo '<th bgcolor="#f9f9f9">'.$this->diafan->_('Скидка').'(%)</th>';
      }
      echo '<th bgcolor="#f9f9f9" nowrap>'.$this->diafan->_('Сумма').'('.$result["currency"].')</th>
      </tr></thead><tbody>';


      Собственно, вы так же вставляете свой код, подставляя в нужную ячейку нужный параметр.

      <table> и в Африке <table>, независимо от того, какой у вас файл php или html
  • 16 августа 2017 г.
  • Итак, благодаря Степану, получилось сделать такую табличку, только вопрос, можно ли чуть уменьшить размер картинки, где правильно прописать width? Заметил некоторые дополнительные сложности:
    1.Название товара, если не умещается уходит под картинку, знает кто как поправить?
    2.Цена в столбцах переносится, нужно прописывать nowrap? Где лучше сделать?
    Код
    <?php if(!defined("DIAFAN")){$path = __FILE__; $i=0;while(!file_exists($path.'/includes/404.php')){if($i == 10) exit; $i++;$path = dirname($path);}include $path.'/includes/404.php';}

    echo '<table style="border-collapse: collapse; font-size: 15px;" width="100%" cellpadding="10">';
    echo '<thead>';
    echo '<tr>';
    echo '<th style="padding: 3px;border: 1px solid #e9e9e9;text-align: center;background: #e9e9e9;">Наименование товара</th>';
    echo '<th style="padding: 3px;border: 1px solid #e9e9e9;text-align: center;background: #e9e9e9;">Кол-во</th>';
    echo '<th style="padding: 3px;border: 1px solid #e9e9e9;text-align: center;background: #e9e9e9;">Цена, р.</th>';
    echo '<th style="padding: 3px;border: 1px solid #e9e9e9;text-align: center;background: #e9e9e9;">Сумма, р.</th>';
    echo '</tr>';
    echo '</thead>';
    echo '<tbody>';
    foreach ($result["rows"] as $row){
    echo '<tr>';
    echo '<td style="padding: 3px;border: 1px solid #e9e9e9;text-align: center; vertical-align: center;"><a href="'.BASE_PATH_HREF.$row["link"].'">'.$row["name"].'</a>
    <a href="'.BASE_PATH_HREF.$row["link"].'"><img src="http'.(IS_HTTPS ? "s" : '')."://".getenv("HTTP_HOST").$row["img"]["src"].'" width="'.$row["img"]["width"].'" height="'.$row["img"]["height"].'" alt="'.$row["img"]["alt"].'" title="'.$row["img"]["title"].'"></a>
    </td>';
    echo '<td style="padding: 3px;border: 1px solid #e9e9e9;text-align: center;">'.$row["count"].'</td>';
    echo '<td style="padding: 3px;border: 1px solid #e9e9e9;text-align: center;" width="100">'.$row["price"].'</td>';
    echo '<td style="padding: 3px;border: 1px solid #e9e9e9;text-align: center;" width="100">'.$row["summ"].'</td>';
    echo '</tr>';
    }
    echo '</tbody>';
    echo '</table>';
    echo '<table class="table_product" width="100%" cellpadding="10" align="left" style="background: #f9f9f9;font-weight: bold; font-family: arial; text-align:left;">';
    echo '<tbody>';
    echo '<tr style="text-align:left;">';
    echo '<td align="right" style="text-align:right;padding: 10px;">Итоговая стоимость товаров: '.$result['summ_goods'].' руб. (<i>+доставка: '.$result["delivery"]["summ"].'руб.</i>)</td>';
    echo '</tr>';
    echo '</tbody>';
    echo '</table>';
    • 16 августа 2017 г.
    • У вас в коде

      Код
      width="'.$row["img"]["width"].'" height="'.$row["img"]["height"].'

      Пишите размеры прямо сюда.

      Цитата
      1.Название товара, если не умещается уходит под картинку, знает кто как поправить?

      Раскидайте по разным ячейкам или добавьте обтекание float: left;

      Цитата
      2.Цена в столбцах переносится, нужно прописывать nowrap? Где лучше сделать?

      Думаю, что если уменьшить картинку, то это может и не понадобиться.

Новости

  • 24 апреля, среда
  • В новой сборке совершили революцию в структурировании кастомизированной информации в шаблонах, добавили авторегистрацию пользователей, усовершенствовали защиту от спама, актуализировали накопительную скидку, а также улучшили производительность и стабильность работы системы.
  • 12 января
  • После выхода сборки 7.1 мы выпустили уже три патча, в каждом из которых улучшаем административную часть сайта. Сборка DIAFAN.CMS 7.1.3 уже доступна к установке. 
  • 15 декабря 2023 г.
  • Подводим итоги 2023 года. Выпустили новую сборку DIAFAN.CMS 7.1.1, вводим новые тарифы на аренду сайта и коммерческую поддержку и автообновления с января 2024 г., строим планы на будущий год.