Уведомление об отправке и прибытии товара от СДЭК Есть решение

Здравствуйте, хотел бы отправлять своим клиентам уведомлении о прибытии товара на склад для выдачи, но не могу настроить это более информативно, с адресом ПВЗ например. Может у кого-то есть шаблон или код? Помогите пожалуйста

5 ответов

  • 2
    Bostich 1 декабря 2018 18:20 #

    а СДЭК сам с этой функцией не справляется?

  • 2
    Distrupt 2 декабря 2018 23:41 # Решение

    1. Создайте статус заказа "Прибыл" ссылка тут

    2. Создайте новое уведомление с событием "прибыл" 

    {strip}
    
    {$_background_color = "#eeeeee"}
    {$_products_bg = "#ffffff"}
    {$_bonus_background = "#ffffcc"}
    {$_button_background = "#fcd630"}
    {$_main_border_color = "#cccccc"}
    {$_border_color = "#dddddd"}
    
    <table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="
        font-family:Helvetica,Arial,sans-serif;
        letter-spacing:normal;
        text-indent:0;
        text-transform:none;
        word-spacing:0;
        background-color:rgb(232,232,232);
        border-collapse:collapse
    ">
        <tr>
            <td style="padding: 20px;">
                <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="
                    width: 600px !important;
                    background-color:#fff;
                    border:1px solid {$_main_border_color};
                    border-radius: 4px;
                    margin:auto;
                    overflow: hidden;
                    ">
    
                    <!-- HEADER -->
                    <tr>
                        <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>
                        <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">
                            <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">
                                <tr>
                                    <td>
                                        <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>
                                        <font style="color: #888">{$order.create_datetime|wa_date:'humandate'}</font>
                                    </td>
                                    <td style="text-align: right;">
                                        <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>
                    </tr>
    
                    <!-- STATUS -->
                    <tr>
                        <td></td>
                        <td>
                            <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">
                                <tr>
                                    <td>
                                        <p style="
                                        color:rgb(48,48,48);
                                        font-style:normal;
                                        font-variant:normal;
                                        font-weight:normal;
                                        font-size:14px;
                                        line-height:16px;
                                        font-family:Helvetica,Arial,sans-serif;
                                        margin: 20px 0 0;
                                        text-align:center;
                                        ">Спасибо за покупку в магазине «{$wa->shop->settings("name")}»!</p>
                                        <p align="center" style="margin: 20px 0;">
                                            <a href="{$order_url}" style="
                                                text-decoration:none;
                                                font-style:normal;
                                                font-variant:normal;
                                                font-weight:normal;font-size:17px;line-height:40px;font-family:Helvetica,Arial,sans-serif;color:rgb(48,48,48);display:block;
                                                width:225px;
                                                background: {$_button_background};
                                                border-radius: 4px;
                                                " target="_blank">Статус заказа</a>
                                        </p>
                                        {if !empty($order.params.auth_pin)}
                                            <p style="
                                            color:rgb(48,48,48);
                                            font-style:normal;
                                            font-variant:normal;
                                            font-weight:normal;
                                            font-size:14px;
                                            line-height:16px;
                                            font-family:Helvetica,Arial,sans-serif;
                                            margin: 20px 0;
                                            text-align:center;
                                            text-transform: uppercase;
                                            ">
                                                PIN: <b>{$order.params.auth_pin}</b>
                                            </p>
                                        {/if}
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td></td>
                    </tr>
    
                    <!-- TEXT -->
                    <tr>
                        <td bgcolor="{$_bonus_background}"></td>
                        <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">
                            <p>Здравствуйте, {$customer.name|escape}!</p>
                            <p>Ваш заказ {$order.id} прибыл в место вручения <strong>{$order.params.shipping_name}</strong></p>
                        </td>
                        <td bgcolor="{$_bonus_background}"></td>
                    </tr>
    
                    <!-- TEXT -->
                    <tr>
                        <td></td>
                        <td style="padding: 24px 0 36px 0;">
                            <h3 style="margin: 0;">Контактная информация</h3>
                            {if strlen($wa->shop->settings("email"))}
                                <p style="margin: 10px 0 0;">
                                    Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>
                                </p>
                            {/if}
                            {if strlen($wa->shop->settings("phone"))}
                                <p style="margin: 10px 0 0;">
                                    Телефон: {$wa->shop->settings("phone")}
                                </p>
                            {/if}
                        </td>
                        <td></td>
                    </tr>
                </table>
    
                <!-- BOTTOM SITE INFORMATION -->
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
                    <tr>
                        <td valign="middle" align="center" height="45">
                            <p style="
                            font-style:normal;
                            font-variant:normal;
                            font-weight:normal;
                            font-size:13px;
                            line-height:16px;
                            font-family:Arial,sans-serif,Helvetica;
                            color:rgb(147,154,164);
                            margin: 20px 0 0;
                            ">
                                © {date("Y")} {$wa->shop->settings("name")}<br>
                                <a href="http://{$order.params.storefront_decoded}" target="_blank">{$order.params.storefront_decoded}</a>
                            </p>
                        </td>
                    </tr>
                </table>
    
            </td>
        </tr>
    </table>
    
    {/strip}
    

    Вот простой шаблон, в переменной {$order.params.shipping_name} информация с адресом пвз.

    • +1
      Вадим А Г Вадим А Г 2 декабря 2018 23:59 #

      Спасибо большое!

      • +1
        Distrupt Distrupt 15 декабря 2018 21:46 #

        Кстати у плагинов Сдек и боксбери от Syrnik можно более подробную инфу вставлять в письмо (про другие не вкурсе), вот замените кусок:

                        <!-- TEXT -->
                        <tr>
                            <td bgcolor="{$_bonus_background}"></td>
                            <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">
                                <p>Здравствуйте, {$customer.name|escape}!</p>
                                <p>Ваш заказ {$order.id} прибыл в место вручения.</p>
                                                        <!-- Boxberry -->
                                {if !empty($order.params.shipping_plugin) && ($order.params.shipping_plugin == 'bxb') && !empty($order.params.shipping_rate_id) && !empty($shipping_plugin)}
            {$point_info = $shipping_plugin->getPointInfo($order.params.shipping_rate_id)}
            {if !empty($point_info) && !empty($point_info.name)}
                <p>Пункт выдачи <b>{$point_info.name|escape}</b>:<br>
                Адрес: {$point_info.address|escape}
                {if !empty($point_info.metro)}(ближайшая станция метро: {$point_info.metro|escape}){/if}<br>
                {if !empty($point_info.phone)}Телефон: {$point_info.phone|escape}<br>{/if}
                {if !empty($point_info.trip_description)}Как добраться: <i>{$point_info.trip_description|escape}</i><br><br>{/if}
                {if !empty($point_info.schedule)}Время работы: {$point_info.schedule|escape}{/if}
                </p>
            {/if}
        {/if}
        
                               <!-- CDEK -->
                               {if !empty($order.params.shipping_plugin) && ($order.params.shipping_plugin == 'sydsek') && !empty($order.params.shipping_rate_id) && !empty($shipping_plugin)}
            {$point = $shipping_plugin->getPointInfo($order.params.shipping_rate_id)}
            {if !empty($point) && !empty($point.code)}
                <p>Пункт выдачи <b>{$point.name|escape}</b>:<br>
                Адрес: {$point.city}, {$point.address|escape}<br>
                {if !empty($point.work_time)}Время работы: {$point.work_time|escape}<br>{/if}
                {if !empty($point.phone)}Телефон: {$point.phone|escape}{/if}
                {if !empty($point.note)}Примечание: {$point.note|escape}{/if}
                </p>
            {/if}
        {/if}
                                
                 
                            </td>
                            <td bgcolor="{$_bonus_background}"></td>
                        </tr>
        
                        <!-- TEXT -->

  • 2
    Andrew Kovalevitch 14 января 2021 15:49 #

    А есть ли возможность после блока с информацией о ПВЗ

    <p>Пункт выдачи <b>{$point.name|escape}</b>:<br>
    Адрес: {$point.city}, {$point.address|escape}<br>
    {if !empty($point.work_time)} Время работы: {$point.work_time|escape}<br>{/if}
    {if !empty($point.phone)} Телефон: {$point.phone|escape}{/if}
    {if !empty($point.note)} Примечание: {$point.note|escape}{/if}

    вставить блок с картой как в корзине?

    или в принципе оформить это блок как в корзине выводит?

Добавить ответ

Чтобы добавить комментарий, зарегистрируйтесь или войдите