244 lines
9.6 KiB
Smarty
244 lines
9.6 KiB
Smarty
{assign var=meth value=':'|explode:$VAR._page}
|
|
<!-- {$meth.0}:{$meth.1} -->
|
|
|
|
{if $SESS_LOGGED != '1'}
|
|
{$block->display('account:user_login')}
|
|
{else}
|
|
{$method->exe('checkout','preview')}
|
|
{if ($method->result == false)}
|
|
{$block->display('core:method_error')}
|
|
{else}
|
|
{if $results == 0}
|
|
{t}Your cart is empty, please select one or more products to continue{/t}<br/>
|
|
<br/>
|
|
{$block->display('product_cat:user_menu')}
|
|
{else}
|
|
|
|
<script type="text/javascript" src="themes/default/blocks/checkout/ajax.js"></script>
|
|
<script type="text/javascript">
|
|
<!--
|
|
var confirmCheckoutMsg='{t}Thank you! We will now finalize your purchase and forward you to the secure payment area.{/t}';
|
|
|
|
{literal}
|
|
function CurrencyChange(obj) {
|
|
document.location='{/literal}{$SSL_URL}{literal}?_page=checkout:checkout&cyid='+obj.value;
|
|
}
|
|
function addDiscount() {
|
|
var discount = document.getElementById("discount").value;
|
|
document.location='{/literal}{$SSL_URL}{literal}?_page=checkout:checkout&discount='+discount+'&do[]=checkout:adddiscount';
|
|
}
|
|
{/literal}
|
|
//-->
|
|
</script>
|
|
|
|
<!-- CHECKOUT CONFIRM -->
|
|
<div id="checkout_confirm_div">
|
|
{if $VAR.option != ''}
|
|
{$method->exe('checkout','checkoutoption')}
|
|
{if $plugin_template != false}
|
|
{$block->display($plugin_template)}
|
|
{/if}
|
|
{/if}
|
|
</div>
|
|
|
|
<p id="checkout_options_show" {osb f=style_hide}>
|
|
<a href="#" onclick="document.getElementById('checkout_confirm_div').style.display='none';document.getElementById('checkout_options_show').style.display='none';document.getElementById('checkout_options').style.display='block';">View More Payment Options</a>
|
|
</p>
|
|
|
|
<!-- CHECKOUT OPTIONS -->
|
|
<div id="checkout_options">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
|
|
<tr>
|
|
<td>
|
|
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
|
<tr valign="top">
|
|
<td>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr valign="top">
|
|
<td class="table_heading">{t}Please Select Your Preferred Payment Option{/t} </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td class="row1">
|
|
<table width="100%" border="0" cellspacing="4" cellpadding="3">
|
|
{if $checkout}
|
|
{foreach from=$checkout item=checkout key=key}
|
|
<tr valign="top">
|
|
<td style="width: 20%;"><a href="javascript:void(0);" onclick="changeCheckoutOption({$checkout.fields.id},'checkout',false,0)">{if $checkout.fields.graphic_url==''}{$checkout.fields.name}{else}<img src="{$checkout.fields.graphic_url}" alt="{$checkout.fields.name}" style="border: 0px;"/>{/if}</a></td>
|
|
<td style="width: 80%;">{$checkout.fields.description}</td>
|
|
</tr>
|
|
{/foreach}
|
|
{else}
|
|
<tr valign="top">
|
|
<td>{t}Sorry, no online payment option has been defined for this order type. Please contact customer service for ordering details.{/t}</td>
|
|
</tr>
|
|
{/if}
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br/>
|
|
</div>
|
|
|
|
<!-- SINGLE CHECOUT OPTIONS -->
|
|
{if $VAR.option=='' && $checkout_c == 1}
|
|
<script type="text/javascript">changeCheckoutOption('{$last_checkout_id}');</script>
|
|
{elseif $VAR.option>0}
|
|
<script type="text/javascript">
|
|
<!--
|
|
{literal}
|
|
try { document.getElementById('checkout_options_show').style.display='block'; } catch(e) {}
|
|
try { document.getElementById('checkout_options').style.display='none'; } catch(e) {}
|
|
{/literal}
|
|
//-->
|
|
</script>
|
|
{/if}
|
|
{/if}
|
|
|
|
<!-- CURRENCY OPTIONS & DISCOUNT CODE ENTRY -->
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
|
|
<tr>
|
|
<td style="width: 33%; text-align: left;" valign="top">
|
|
<table width="150" border="0" cellspacing="3" cellpadding="1" class="row1">
|
|
<tr valign="top" class="row2">
|
|
<td><b>{t}Currency{/t}</b></td>
|
|
</tr>
|
|
<tr valign="top" class="row1">
|
|
<td valign="middle">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td style="width: 75%;">
|
|
{$list->currency_list("cyid_arr")}
|
|
<select name="currency" onchange="CurrencyChange(this);">
|
|
{foreach key=key item=item from=$cyid_arr}
|
|
<option value="{$key}" {if $key == $smarty.const.SESS_CURRENCY}{assign var=currency_thumbnail value=$item.iso}selected="selected"{/if}>{$item.iso}</option>
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
<td style="width: 25%;"><img src="themes/{$THEME_NAME}/images/currency/{$currency_thumbnail}.gif" alt="" style="border: 0px"/></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td style="width: 33%; text-align: center;" valign="top">
|
|
{if $smarty.const.SHOW_DISCOUNT_CODE == 1}
|
|
<form name="form1" method="post" action="javascript:addDiscount()">
|
|
<table width="150" border="0" cellspacing="3" cellpadding="1" class="row1">
|
|
<tr valign="top" class="row2">
|
|
<td><b>{t}Discounts{/t}</b></td>
|
|
</tr>
|
|
<tr valign="top" class="row1">
|
|
<td valign="middle">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td width="92%"><input type="text" id="discount" name="discount" size="12" onblur="addDiscount()"></td>
|
|
<td width="8%"><a href="javascript:addDiscount();"><img src="themes/{$THEME_NAME}/images/icons/calc_16.gif" alt="" style="border; 0px"></a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
{/if}
|
|
</td>
|
|
<td style="width: 33%; text-align: right;" valign="top">
|
|
{if $list->is_installed('affiliate') == 1 && $smarty.const.SHOW_AFFILIATE_CODE == 1}
|
|
<form name="aid" method="post" action="{$SSL_URL}">
|
|
<input type="hidden" name="_page" value="checkout:checkout">
|
|
<table width="150" border="0" cellspacing="3" cellpadding="1" class="row1">
|
|
<tr valign="top" class="row2">
|
|
<td><b>{t}Affiliate{/t}</b></td>
|
|
</tr>
|
|
<tr valign="top" class="row1">
|
|
<td valign="middle">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td width="92%"><input type="text" id="discount" name="aid" size="12" value="{$smarty.const.SESS_AFFILIATE}" onBlur="document.aid.submit()"></td>
|
|
<td width="8%"><a href="javascript:document.aid.submit();"><img src="themes/{$THEME_NAME}/images/icons/exp_16.gif" alt="" style="border: 0px"></a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<!-- LOOP THROUGH EACH RECORD -->
|
|
<div id="cart_items" {osb f=style_hide}>
|
|
<p><a href="?_page=cart:cart">{t}To edit or remove items, click here.{/t}</a></p>
|
|
<p><a href="javascript:void(0);" onclick="javascript:getElementById('cart_items').style.display='none'; getElementById('cart_items_show').style.display='block';">{t}Click here to hide itemised list.{/t}</a></p>
|
|
{foreach from=$cart item=cart}
|
|
<div id="c{$cart.id}">
|
|
{if $cart.cart_type == '2'}
|
|
{include file='file:../cart/cart_table_type_2.tpl' disable=true}
|
|
{elseif $cart.cart_type == "3"}
|
|
{include file='file:../cart/cart_table_type_3.tpl'}
|
|
{else}
|
|
{include file='file:../cart/cart_table_type_x.tpl' disable=true}
|
|
{/if}
|
|
<br/>
|
|
|
|
{include file='file:../cart/cart_table_assoc.tpl'}
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
<!-- END OF RESULT LOOP -->
|
|
|
|
<!-- TOTALS -->
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
|
|
<tr>
|
|
<td valign="top" style="width: 65%;">
|
|
<p id="cart_items_show"><a href="javascript:void(0);" onclick="javascript:getElementById('cart_items').style.display='block'; getElementById('cart_items_show').style.display='none';">{t}Click here for an itemised list of items in this purchase.{/t}</a></p>
|
|
</td>
|
|
<td style="width: 35%;">
|
|
<table width="225" border="0" cellspacing="3" cellpadding="1" class="row1" style="margin-left: auto;">
|
|
<tr valign="top" class="row2">
|
|
<td><b>{t}Totals{/t}</b></td>
|
|
</tr>
|
|
<tr valign="top" class="row1">
|
|
<td valign="middle">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row1">
|
|
<tr>
|
|
<td style="width: 65%;">{t}Sub-Total{/t}</td>
|
|
<td style="width: 35%; text-align: right;">{$list->format_currency_num($sub_total, $smarty.const.SESS_CURRENCY)}</td>
|
|
</tr>
|
|
{foreach from=$discount item=discount}
|
|
{if $discount.total > 0}
|
|
<tr>
|
|
<td style="width: 65%;">{t}Discount{/t} ({$discount.name})</td>
|
|
<td style="width: 35%; text-align: right;"> - {$list->format_currency_num($discount.total, $smarty.const.SESS_CURRENCY)}</td>
|
|
</tr>
|
|
{/if}
|
|
{/foreach}
|
|
{if $tax != false}
|
|
{foreach from=$tax item=tax }
|
|
<tr>
|
|
<td style="width: 65%;">{$tax.name}</td>
|
|
<td style="width: 35%; text-align: right;">{$list->format_currency_num($tax.rate, $smarty.const.SESS_CURRENCY)}</td>
|
|
</tr>
|
|
{/foreach}
|
|
{/if}
|
|
<tr>
|
|
<td style="width: 65%;"><b>{t}Total{/t}</b></td>
|
|
<td style="width: 35%; text-align: right;"><b>{$list->format_currency_num($total, $smarty.const.SESS_CURRENCY)}</b></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{/if}
|
|
{/if}
|