Отображение бонусных баллов на других страницах
Хотел отобразить бонусные баллы в сайдбар меню. Скопировал часть кода из
my.affiliate.html
{$balance = round($customer.affiliate_bonus, 2)|wa_format_number:false} {if $customer.affiliate_bonus >= 0}{$balance = '+'|cat:$balance}{/if} <p class="large">{sprintf('[`Your current affiliate bonus: <strong class="bonus">%s</strong>`]', $balance)}</strong></p>
из
<h1>[`Affiliate program`]</h1> {$balance = round($customer.affiliate_bonus, 2)|wa_format_number:false} {if $customer.affiliate_bonus >= 0}{$balance = '+'|cat:$balance}{/if} <p class="large">{sprintf('[`Your current affiliate bonus: <strong class="bonus">%s</strong>`]', $balance)}</strong></p> {$_aff_plugins_active = 0} <!-- plugin hook: 'frontend_my_affiliate' --> {* @event frontend_my_affiliate.%plugin_id% *} {foreach $frontend_my_affiliate as $_}{$_}{$_aff_plugins_active = 1}{/foreach} {if $_aff_plugins_active}<br><br><h2>[`Bonus activity log`]</h2>{/if} <table class="table"> {if !empty($affiliate_history)} <tr class="white"> <th></th> <th></th> <th>[`Credit`]</th> <th>[`Debit`]</th> <th>[`Balance`]</th> </tr> {foreach $affiliate_history as $h} <tr> <td class="gray">{$h.create_datetime|wa_date:'humandatetime'}</td> <td> {if $h.order_id && !empty($h.order_url)} <a href="{$h.order_url}">[`Order`] {$wa->shop->orderId($h.order_id)}</a> {if $h.comment}<br>{/if} {/if} {if $h.comment} {$h.comment|escape} {/if} </td> <td class="align-right"> {if $h.amount > 0} {round($h.amount,2)|wa_format_number:false} {/if} </td> <td class="align-right"> {if $h.amount < 0} {round(abs($h.amount),2)|wa_format_number:false} {/if} </td> <td class="align-right">{round($h.balance,2)|wa_format_number:false}</td> </tr> {/foreach} {else} <tr> <td>[`You have no affiliate history yet.`]</td> </tr> {/if} </table> {$wa->globals('isMyAccount', true)}
находясь на странице бонусной системы в сайдбаре показывает корректное число баллов.
Но перейдя на другие страницы, в сайдбар-меню бонусные баллы показывает 0.
Подскажите, какие догадки, как решить, чтобы на всех страницах отображалось количество баллов пользователя.
2 ответа
покопался - не нашел в коде
судя по всему - надо свой хэлпер писать
на форуме давно есть тема https://support.webasyst.ru/fo...
вам нужен код