Help order_print

Правила раздела: faq.php?mode=okay
Модератор: Модераторы

Djenovan M
Djenovan M
Возраст: 36
Репутация: 0
Сообщения: 14
Зарегистрирован: 20.04.2017
С нами: 6 лет 11 месяцев
Откуда: Казахстан

Сообщение #1 Djenovan » 20.12.2021, 15:13

Уважаемые помогите пожалуйста!!
Как вывести в печать (order_print.tpl)
1. сумма товара
2. скидка в проценте и в денежном если есть
3. общая сумма уже со скидкой
Изображение
как тут
попытался перенести с 3 на новую версию не выводит

OkayCMS M
Администратор
Аватара
OkayCMS M
Администратор
Репутация: 216
Сообщения: 1627
Зарегистрирован: 12.11.2015
С нами: 8 лет 4 месяца
Сайт Skype

Сообщение #2 OkayCMS » 20.12.2021, 17:22

А что не выходит? Эта часть в третьей и четвертой версии не менялась.

Djenovan M
Djenovan M
Возраст: 36
Репутация: 0
Сообщения: 14
Зарегистрирован: 20.04.2017
С нами: 6 лет 11 месяцев
Откуда: Казахстан

Сообщение #3 Djenovan » 20.12.2021, 18:09

как я понимаю этот кусок должен вывести скидку
<div id="total">
<table>
{if $order->discount>0}
<tr>
<th>Скидка</th>
<td>{$order->discount} %</td>
</tr>
{/if}
{if $order->coupon_discount>0}
<tr>
<th>Купон{if $order->coupon_code} ({$order->coupon_code}){/if}</th>
<td>{$order->coupon_discount} {$currency->sign}</td>
</tr>
{/if}
<tr>
<th>Итого</th>
<td class="total">{$order->total_price} {$currency->sign}</td>
</tr>
{if $payment_method}
<tr>
<td colspan="2">Способ оплаты: {$payment_method->name}</td>
</tr>
<tr>
<th>К оплате</th>
<td class="total">{$order->total_price|convert:$payment_method->currency_id} {$payment_currency->sign}</td>
</tr>
{/if}
</table>

но ее нет

Добавлено спустя 1 минуту 51 секунду:
<div id="total">
<table>
{if $order->discount>0}
<tr>
<th>{$btr->general_discount|escape}</th>
<td>{$order->discount|escape} %</td>
</tr>
{/if}
{if $order->coupon_discount>0}
<tr>
<th>{$btr->general_coupon|escape} {if $order->coupon_code} ({$order->coupon_code|escape}){/if}</th>
<td>{$order->coupon_discount|escape}&nbsp;{$currency->sign|escape}</td>
</tr>
{/if}
<tr>
<th>{$btr->general_total|escape}</th>
<td class="total">{$order->total_price|convert:$currency->id}&nbsp;{$currency->sign|escape}</td>
</tr>
{if $payment_method}
<tr>
<td colspan="2">{$btr->order_print_payment|escape} {$payment_method->name|escape}</td>
</tr>
<tr>
<th>{$btr->order_to_pay|escape}</th>
<td class="total">{$order->total_price|convert:$payment_method->currency_id}&nbsp;{$payment_currency->sign|escape}</td>
</tr>
{/if}
{get_design_block block="order_print_total_price_custom"}
</table>
тоже не работает

Master
Master
Репутация: 28
Сообщения: 84
Зарегистрирован: 25.01.2016
С нами: 8 лет 2 месяца

Сообщение #4 Master » 23.12.2021, 21:12

Код: Выделить всё

<div id="total">
    <table>
        {if $discounts}
            {foreach $discounts as $discount}
         <tr>
            <th>{$discount->name}</th>
            <td><i>{$discount->percentDiscount|string_format:"%.2f"} %</i>
            &minus; {$discount->absoluteDiscount|convert}{$currency->sign|escape}</td>
         </tr>
         {/foreach}
      {/if}
        <tr>
            <th>{$btr->general_total|escape}</th>
            <td class="total">{$order->total_price|convert:$currency->id}&nbsp;{$currency->sign|escape}</td>
        </tr>
        {if $payment_method}
        <tr>
            <td colspan="2">{$btr->order_print_payment|escape} {$payment_method->name|escape}</td>
        </tr>
        <tr>
            <th>{$btr->order_to_pay|escape}</th>
            <td class="total">{$order->total_price|convert:$payment_method->currency_id}&nbsp;{$payment_currency->sign|escape}</td>
        </tr>
        {/if}
        {get_design_block block="order_print_total_price_custom"}
    </table>
</div>

Djenovan M
Djenovan M
Возраст: 36
Репутация: 0
Сообщения: 14
Зарегистрирован: 20.04.2017
С нами: 6 лет 11 месяцев
Откуда: Казахстан

Сообщение #5 Djenovan » 25.12.2021, 23:01

Спасибо большом все отлично работает!
только итог надо подводится сумма без скидки общая, а к оплате уже со скидкой

Djenovan M
Djenovan M
Возраст: 36
Репутация: 0
Сообщения: 14
Зарегистрирован: 20.04.2017
С нами: 6 лет 11 месяцев
Откуда: Казахстан

Сообщение #6 Djenovan » 26.12.2021, 19:38

Master писал(а):

Код: Выделить всё

<div id="total">
    <table>
        {if $discounts}
            {foreach $discounts as $discount}
         <tr>
            <th>{$discount->name}</th>
            <td><i>{$discount->percentDiscount|string_format:"%.2f"} %</i>
            &minus; {$discount->absoluteDiscount|convert}{$currency->sign|escape}</td>
         </tr>
         {/foreach}
      {/if}
        <tr>
            <th>{$btr->general_total|escape}</th>
            <td class="total">{$order->total_price|convert:$currency->id} {$currency->sign|escape}</td>
        </tr>
        {if $payment_method}
        <tr>
            <td colspan="2">{$btr->order_print_payment|escape} {$payment_method->name|escape}</td>
        </tr>
        <tr>
            <th>{$btr->order_to_pay|escape}</th>
            <td class="total">{$order->total_price|convert:$payment_method->currency_id} {$payment_currency->sign|escape}</td>
        </tr>
        {/if}
        {get_design_block block="order_print_total_price_custom"}
    </table>
</div>

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

zenlounge
zenlounge
Репутация: 0
Сообщения: 23
Зарегистрирован: 22.07.2022
С нами: 1 год 8 месяцев

Сообщение #7 zenlounge » 22.10.2023, 08:50

А кто то выводил в order_print.tpl информацию о Новой почте, если выбрал покупатель?

Добавлено спустя 5 минут 41 секунду:
Кому интересно, сделал таким образом) После информации о покупателе вставил код с модуля новой почты

Код: Выделить всё

{if $delivery->settings['service_type'] == 'DoorsDoors' || $delivery->settings['service_type'] == 'WarehouseDoors'}
    {if $novaposhta_delivery_data->city_name}
        <tr>
            <td>
                <span data-language="np_order_city">{$lang->np_order_city|escape}</span>
            </td>
            <td>{$novaposhta_delivery_data->city_name|escape}</td>
        </tr>
    {/if}
    {if $novaposhta_delivery_data->area_name}
        <tr>
            <td>
                <span data-language="np_order_area">{$lang->np_order_area|escape}</span>
            </td>
            <td>{$novaposhta_delivery_data->area_name|escape}</td>
        </tr>
    {/if}
    {if $novaposhta_delivery_data->street}
        <tr>
            <td>
                <span data-language="np_order_street">{$lang->np_order_street|escape}</span>
            </td>
            <td>{$novaposhta_delivery_data->street|escape}</td>
        </tr>
    {/if}
    {if $novaposhta_delivery_data->house}
        <tr>
            <td>
                <span data-language="np_order_house">{$lang->np_order_house|escape}</span>
            </td>
            <td>{$novaposhta_delivery_data->house|escape}</td>
        </tr>
    {/if}
    {if $novaposhta_delivery_data->apartment}
        <tr>
            <td>
                <span data-language="np_order_apartment">{$lang->np_order_apartment|escape}</span>
            </td>
            <td>{$novaposhta_delivery_data->apartment|escape}</td>
        </tr>
    {/if}
{else}
    {if $novaposhta_delivery_data->city->name}
        <tr>
            <td>
                <span data-language="np_order_city">{$lang->np_order_city}</span>
            </td>
            <td>{$novaposhta_delivery_data->city->name|escape}</td>
        </tr>
    {/if}
    {if $novaposhta_delivery_data->warehouse->name}
        <tr>
            <td>
                <span data-language="np_order_warehouse">{$lang->np_order_warehouse|escape}</span>
            </td>
            <td>{$novaposhta_delivery_data->warehouse->name}</td>
        </tr>
    {/if}
{/if}


Название раздела: Обсуждение прочих вопросов
Правила раздела: faq.php?mode=okay

Быстрый ответ


Введите код в точности так, как вы его видите. Регистр символов не имеет значения.
Код подтверждения

   

Вернуться в «Обсуждение прочих вопросов»

Кто сейчас на форуме (по активности за 5 минут)

Сейчас этот раздел просматривают: 13 гостей