Опубликовано: 7 августа 20196 г Сделал платные файлы на форуме и после оплаты появляется возможность скачать файл, но также все равно остается кнопка ниже "оплатить". В чем проблема? Код: <ul class="ipsToolList ipsToolList_vertical ipsClearfix"> {{if $file->canBuy()}} {{if $file->canDownload()}} {template="downloadButton" group="view" app="downloads" params="$file"} {{endif}} <li class='ipsToolList_primaryAction'> {{if !$file->isPurchasable( FALSE )}} <span class="ipsType_light ipsType_blendLinks ipsResponsive_hidePhone ipsResponsive_inline"><i class="fa fa-info-circle"></i> {lang="purchasing_disabled"}</span> {{else}} <a href='{$file->url('buy')->csrf()}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important'><i class='fa fa-shopping-cart'></i> {lang="buy_now"}{{if $price = $file->price()}} - {$price|raw}{{endif}}</a> {{endif}} </li> {{else}} {{if $file->canDownload() or !$file->downloadTeaser()}} {template="downloadButton" group="view" app="downloads" params="$file"} {{else}} {$file->downloadTeaser()|raw} {{endif}} {{endif}} {{if ( isset( $purchasesToRenew ) or $purchasesToRenew = $file->purchasesToRenew() ) and \count( $purchasesToRenew )}} <li class='ipsToolList_primaryAction'> {{if \count( $purchasesToRenew ) === 1}} {{foreach $purchasesToRenew as $purchase}} <a href='{$purchase->url()->setQueryString('do', 'renew')->csrf()}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important'><i class='fa fa-refresh'></i> {lang="purchase_renew_now"} - {$purchase->renewals->cost}</a> {{endforeach}} {{else}} <a href='#elFileRenew_menu' id='elFileRenew' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important' data-ipsMenu><i class='fa fa-refresh'></i> {lang="purchase_renew_now"} <i class="fa fa-caret-down"></i></a> <ul id='elFileRenew_menu' class='ipsMenu ipsMenu_auto ipsHide'> {{foreach $purchasesToRenew as $purchase}} <li class='ipsMenu_item'><a href="{$purchase->url()->setQueryString('do', 'renew')->csrf()}">{$purchase->name}<br><span class='ipsType_light'>{$purchase->renewals}</span></a></li> {{endforeach}} </ul> {{endif}} </li> {{endif}} </ul>
Опубликовано: 8 августа 20196 г {{else}} <a href='{$file->url('buy')->csrf()}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important'><i class='fa fa-shopping-cart'></i> {lang="buy_now"}{{if $price = $file->price()}} - {$price|raw}{{endif}}</a> замените на {{elseif !$file->canDownload()}} <a href='{$file->url('buy')->csrf()}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important'><i class='fa fa-shopping-cart'></i> {lang="buy_now"}{{if $price = $file->price()}} - {$price|raw}{{endif}}</a> Но это только уберет кнопку
Сделал платные файлы на форуме и после оплаты появляется возможность скачать файл, но также все равно остается кнопка ниже "оплатить".
В чем проблема?
Код:
<ul class="ipsToolList ipsToolList_vertical ipsClearfix"> {{if $file->canBuy()}} {{if $file->canDownload()}} {template="downloadButton" group="view" app="downloads" params="$file"} {{endif}} <li class='ipsToolList_primaryAction'> {{if !$file->isPurchasable( FALSE )}} <span class="ipsType_light ipsType_blendLinks ipsResponsive_hidePhone ipsResponsive_inline"><i class="fa fa-info-circle"></i> {lang="purchasing_disabled"}</span> {{else}} <a href='{$file->url('buy')->csrf()}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important'><i class='fa fa-shopping-cart'></i> {lang="buy_now"}{{if $price = $file->price()}} - {$price|raw}{{endif}}</a> {{endif}} </li> {{else}} {{if $file->canDownload() or !$file->downloadTeaser()}} {template="downloadButton" group="view" app="downloads" params="$file"} {{else}} {$file->downloadTeaser()|raw} {{endif}} {{endif}} {{if ( isset( $purchasesToRenew ) or $purchasesToRenew = $file->purchasesToRenew() ) and \count( $purchasesToRenew )}} <li class='ipsToolList_primaryAction'> {{if \count( $purchasesToRenew ) === 1}} {{foreach $purchasesToRenew as $purchase}} <a href='{$purchase->url()->setQueryString('do', 'renew')->csrf()}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important'><i class='fa fa-refresh'></i> {lang="purchase_renew_now"} - {$purchase->renewals->cost}</a> {{endforeach}} {{else}} <a href='#elFileRenew_menu' id='elFileRenew' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important' data-ipsMenu><i class='fa fa-refresh'></i> {lang="purchase_renew_now"} <i class="fa fa-caret-down"></i></a> <ul id='elFileRenew_menu' class='ipsMenu ipsMenu_auto ipsHide'> {{foreach $purchasesToRenew as $purchase}} <li class='ipsMenu_item'><a href="{$purchase->url()->setQueryString('do', 'renew')->csrf()}">{$purchase->name}<br><span class='ipsType_light'>{$purchase->renewals}</span></a></li> {{endforeach}} </ul> {{endif}} </li> {{endif}} </ul>