Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
alcatras

После покупки файла все равно остается кнопка "Оплатить"

Recommended Posts

Сделал платные файлы на форуме и после оплаты появляется возможность скачать файл, но также все равно остается кнопка ниже "оплатить".

 

В чем проблема?

Код:

 

	<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>

Share this post


Link to post

Это так и задумано.

Юзер может купить сколь угодно файлов.

Share this post


Link to post

                                {{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>

Но это только уберет кнопку

  • Upvote 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...