⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coupons.tpl

📁 NetGou商城购物系统是一款功能强大完善、操作界面友好、可扩展性好、专门针对个人和企业进行网上销售而开发的一套商城购物系统。 它具有完善的商品管理、订单管理、销售统计、新闻管理、结算系统、税率系统、
💻 TPL
字号:
{include file="page_title.tpl" title=$lng.lbl_coupons}

{include file="main/popup_product_js.tpl"}

{$lng.txt_discountcoupons_desc}

<BR><BR>

{capture name=dialog}

{if $coupons ne ""}

<SCRIPT type="text/javascript" language="JavaScript 1.2">
<!--
checkboxes_form = 'couponsform';
checkboxes = new Array({foreach from=$coupons item=v key=k}{if $k > 0},{/if}'posted_data[{$v.coupon}][to_delete]'{/foreach});
 
{include file="change_all_checkboxes.tpl"}
-->
</SCRIPT>

<DIV style="line-height:170%"><A href="javascript:change_all(true);">{$lng.lbl_check_all}</A> / <A href="javascript:change_all(false);">{$lng.lbl_uncheck_all}</A></DIV>

{/if}

<TABLE border="0" cellpadding="3" cellspacing="1" width="100%">

<TR class="TableHead">
<TD width="10">&nbsp;</TD>
<TD width="15%">{$lng.lbl_coupon}</TD>
<TD width="15%">{$lng.lbl_status}</TD>
<TD width="15%" align="center">{$lng.lbl_coupon_disc}</TD>
<TD width="15%" align="center">{$lng.lbl_coupon_min}</TD>
<TD width="15%" align="center">{$lng.lbl_coupon_times}</TD>
<TD width="25%" align="center">{$lng.lbl_coupon_expires}</TD>
</TR>

{if $coupons ne ""}

<FORM action="coupons.php" method="POST" name="couponsform">

<INPUT type="hidden" name="mode" value="update">

{section name=prod_num loop=$coupons}

<TR{cycle values=", class='TableSubHead'" advance=false}>
<TD><INPUT type="checkbox" name="posted_data[{$coupons[prod_num].coupon}][to_delete]"></TD>
<TD><B>{$coupons[prod_num].coupon}</B></TD>
<TD>
<SELECT name="posted_data[{$coupons[prod_num].coupon}][status]">
<OPTION value="A" {if $coupons[prod_num].status eq "A"}selected{/if}>{$lng.lbl_coupon_active}</OPTION>
<OPTION value="D" {if $coupons[prod_num].status eq "D"}selected{/if}>{$lng.lbl_coupon_disabled}</OPTION>
<OPTION value="U" {if $coupons[prod_num].status eq "U"}selected{/if}>{$lng.lbl_coupon_used}</OPTION>
</SELECT>
</TD>
<TD align="center">{if $coupons[prod_num].coupon_type eq "absolute"}{include file="currency.tpl" value=$coupons[prod_num].discount}{elseif  $coupons[prod_num].coupon_type eq "percent"}{$coupons[prod_num].discount}%{else}{$lng.lbl_coupon_freeship}{/if}</TD>
<TD align="center">{include file="currency.tpl" value=$coupons[prod_num].minimum}</TD>
<TD align="center">{$coupons[prod_num].times_used}/{$coupons[prod_num].times}</TD>
<TD align="center" nowrap>
{$coupons[prod_num].expire|date_format:$config.Appearance.datetime_format}
</TD>
</TR>

<TR{cycle values=", class='TableSubHead'"}>
<TD colspan="7">
{if $coupons[prod_num].productid ne 0}
{$lng.lbl_coupon_contains_product|substitute:"productid":$coupons[prod_num].productid}
{elseif $coupons[prod_num].categoryid ne 0}
{if $coupons[prod_num].recursive eq "Y"}
{$lng.lbl_coupon_contains_products_cat_rec|substitute:"categoryid":$coupons[prod_num].categoryid}
{else}
{$lng.lbl_coupon_contains_products_cat|substitute:"categoryid":$coupons[prod_num].categoryid}
{/if}
{else}
{capture name=minamount}{include file="currency.tpl" value=$coupons[prod_num].minimum}{/capture}
{$lng.lbl_coupon_greater_than|substitute:"amount":$smarty.capture.minamount}
{/if}
</TD>
</TR>

{/section}

<TR>
<TD colspan="7"><BR>
<INPUT type="button" value="{$lng.lbl_delete_selected}" onclick="javascript:document.couponsform.mode.value='delete';document.couponsform.submit();">
&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT type="submit" value="{$lng.lbl_update}">
</TD>
</TR>

</FORM>

{else}

<TR>
<TD colspan="7">{$lng.txt_no_discount_coupons}</TD>
</TR>

{/if}

</TABLE>

<BR><BR>

{include file="main/subheader.tpl" title=$lng.lbl_coupon_add_new}

<TABLE border="0" cellpadding="3" cellspacing="1">

<FORM action="coupons.php" method="POST" name="coupon_form">

<INPUT type="hidden" name="mode" value="add">

<TR>
<TD>{$lng.lbl_coupon} # <FONT class="Star">*</FONT></TD>
<TD><INPUT type="text" size="25" maxlength="16" name="coupon_new" value="{$coupon_data.coupon_new}">{if $smarty.get.error eq "coupon_already_exists"}<FONT class="ErrorMessage"> &lt;&lt; {$lng.lbl_coupon_already_exists}</FONT>{/if}</TD>
</TR>

<TR>
<TD>{$lng.lbl_coupon_times_to_use}</TD>
<TD><INPUT type="text" size="8" name="times_new" value="{$coupon_data.times_new|default:"1"}"></TD>
</TR>

<TR>
<TD>{$lng.lbl_status}</TD>
<TD>
<SELECT name="status_new">
<OPTION value="A"{if $coupon_data.status_new eq "A"} selected{/if}>{$lng.lbl_coupon_active}</OPTION>
<OPTION value="D"{if $coupon_data.status_new eq "D"} selected{/if}>{$lng.lbl_coupon_disabled}</OPTION>
</SELECT>
</TD>
</TR>

<TR>
<TD>{$lng.lbl_discount}</TD>
<TD><INPUT type="text" size="25" name="discount_new" value="{if $coupon_data.discount_new}{$coupon_data.discount_new}{else}0.00{/if}"></TD>
</TR>

<TR>
<TD>{$lng.lbl_coupon_type}</TD>
<TD>
<SELECT name="coupon_type_new">
<OPTION value="percent"{if $coupon_data.coupon_type_new eq "percent"} selected{/if}>{$lng.lbl_coupon_type_percent}</OPTION>
<OPTION value="absolute"{if $coupon_data.coupon_type_new eq "absolute"} selected{/if}>{$config.General.currency_symbol} {$lng.lbl_coupon_type_absolute}</OPTION>
<OPTION value="free_ship"{if $coupon_data.coupon_type_new eq "free_ship"} selected{/if}>{$lng.lbl_coupon_freeshiping}</OPTION>
</SELECT>
</TD>
</TR>

<TR>
<TD>{$lng.lbl_coupon_expires}</TD>
<TD>
{math equation="x+1" x=$config.Company.end_year assign="endyear"} 
{html_select_date prefix="new_" time=$coupon_data.expire_new start_year=$config.Company.start_year end_year=$endyear month_format="%b"}
</TD>
</TR>

<TR>
<TD valign="top">{$lng.lbl_coupon_apply_to}</TD>
<TD>

<TABLE border="0" cellpadding="1" cellspacing="1">

<TR>
<TD valign="top"><INPUT type="radio" name="apply_to" value="any"{if $coupon_data.apply_to eq "" or $coupon_data.apply_to eq "any"} checked{/if}></TD>
<TD>{$lng.lbl_coupon_apply_order_subtotal}, {$config.General.currency_symbol}<BR>
<INPUT type="text" size="24" name="minimum_new" value="0.00"></TD>
</TR>

<TR>
<TD valign="top"><INPUT type="radio" name="apply_to" value="product"{if $coupon_data.apply_to eq "product"} checked{/if}></TD>
<TD>{$lng.lbl_coupon_apply_product}<BR>
<INPUT type="hidden" name="productid_new" value="{$coupon_data.productid_new}">
<INPUT type="text" readonly size="25" name="productname" value="{$coupon_data.productname}">
<INPUT type="button" onClick="javascript:popup_product('coupon_form.productid_new','coupon_form.productname');" value="{$lng.lbl_browse_}"></TD>
</TR>

<TR>
<TD valign="top"><INPUT type="radio" name="apply_to" value="category"{if $coupon_data.apply_to eq "category"} checked{/if}></TD>
<TD>{$lng.lbl_coupon_apply_category}
<BR>
<SELECT name="categoryid_new">
{section name=cats loop=$allcategories}
<OPTION value="{$allcategories[cats].categoryid}">{$allcategories[cats].category_path}</OPTION>
{/section}
</SELECT>
<BR>
{$lng.lbl_coupon_apply_category_rec}
<INPUT type="checkbox" name="recursive"{if $coupon_data.recursive} checked{/if}>
</TD>
</TR>

</TABLE>

</TD>
</TR>

<TR>
<TD colspan="2"><BR>
{$lng.txt_coupon_note}

<BR><BR>

<INPUT type="submit" value="{$lng.lbl_add_coupon}">

</TD>
</TR>

</FORM>

</TABLE>

{/capture}
{include file="dialog.tpl" title=$lng.lbl_coupons content=$smarty.capture.dialog extra="width=100%"}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -