Changes to AgileBill

This commit is contained in:
Deon George
2009-08-03 14:10:16 +10:00
parent 0a22cfe22c
commit 27aee719b0
1051 changed files with 219109 additions and 117219 deletions

View File

@@ -1,160 +1,75 @@
<form name="adhoc" method="post" action="">
<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 width="65%" class="table_heading">
<center>
{translate module=cart}
ad_hoc_heading
{/translate}
</center>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="35%">
{translate module=cart}
ad_hoc_sku
{/translate}
</td>
<td width="65%">
<input type="text" id="ad_hoc_sku" name="ad_hoc_sku">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=cart}
ad_hoc_name
{/translate}
</td>
<td width="65%">
<input type="text" name="ad_hoc_name">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=cart}
ad_hoc_amount
{/translate}
</td>
<td width="65%">
<input type="text" name="ad_hoc_amount" size="5">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=cart}
quantity
{/translate}
</td>
<td width="65%">
<input type="text" name="quantity" size="3" value="1">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=cart}
ad_hoc_taxable
{/translate}
</td>
<td width="65%">
<input type="checkbox" name="ad_hoc_taxable" value="1" checked>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=cart}
ad_hoc_attr
{/translate}
</td>
<td width="65%">
<div id="attr1" style="display:block">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr2').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr2" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr3').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr3" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr4').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr4" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr5').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr5" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr6').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr6" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr7').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr7" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr8').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr8" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr9').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr9" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22" onChange="javascript:document.getElementById('attr10').style.display='block'">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
<div id="attr10" style="display:none">
<input type="text" name="ad_hoc_attr_var[]" size="22">
=
<input type="text" name="ad_hoc_attr_val[]" size="40">
</div>
</td>
</tr>
<tr valign="top">
<td width="35%"></td>
<td width="65%">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
<input type="hidden" name="do[]" value="cart:ad_hoc">
<input type="hidden" name="_page" value="cart:admin_view">
<input type="hidden" name="_page_current" value="cart:ad_hoc">
<input type="hidden" name="account_id" value="{$VAR.account_id}">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
<!-- Display the form to collect the input values -->
<form id="add" method="post" action="" enctype="multipart/form-data">
<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 class="table_heading">{osb f=tt}</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td style="width: 35%;">{osb f=tf module=product field=sku}</td>
<td style="width: 65%;"><input type="text" id="focus" name="ad_hoc_sku"/></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf module=product field=name}</td>
<td style="width: 65%;"><input type="text" name="ad_hoc_name"/></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf module=product field=amount}</td>
<td style="width: 65%;"><input type="text" name="ad_hoc_amount" size="5"/></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf module=product field=quantity}</td>
<td style="width: 65%;"><input type="text" name="quantity" size="3" value="1"/></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf module=product field=taxable}</td>
<td style="width: 65%;"><input type="checkbox" name="ad_hoc_taxable" value="1" checked="checked"/></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf module=product field=attr}</td>
<td style="width: 65%;">
{assign var=last value=11}
{section name=count start=1 loop=$last step=1}
<div id="attr{$smarty.section.count.index}" {if $smarty.section.count.index == 1}style="display:block"{else}style="display:none"{/if}>
<input type="text" name="ad_hoc_attr_var[]" size="22" {if $smarty.section.count.index != $last-1} onchange="javascript:document.getElementById('attr{$smarty.section.count.index+1}').style.display='block'"{/if}/>
=
<input type="text" name="ad_hoc_attr_val[]" size="40"/>
</div>
{/section}
</td>
</tr>
<tr valign="top">
<td style="width: 35%;">&nbsp;</td>
<td style="width: 65%;"><input type="submit" name="Submit" value="{t}Submit{/t}" class="form_button"/></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div>
<input type="hidden" name="do[]" value="cart:ad_hoc"/>
<input type="hidden" name="_page" value="cart:admin_view"/>
<input type="hidden" name="_page_current" value="cart:ad_hoc"/>
<input type="hidden" name="account_id" value="{$VAR.account_id}"/>
</div>
</form>
{literal}
<script language="JavaScript">
document.getElementById('ad_hoc_sku').focus();
<script type="text/javascript">
<!--
if (document.getElementById('focus'))
document.getElementById('focus').focus();
//-->
</script>
{/literal}

View File

@@ -1,17 +1,18 @@
{$method->exe("cart","admin_changeqty")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{else}
{$method->exe('cart','admin_changeqty')}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{if $js}
<script language="javascript">
var base = '{$list->format_currency_num($base, $smarty.const.SESS_CURRENCY)}';
var setup = '{$list->format_currency_num($setup, $smarty.const.SESS_CURRENCY)}';
var qty = '{$qty}';
window.parent.updatePrice('{$VAR.id}',base,setup,qty);
</script>
javascript
<script type="text/javascript">
<!--
var base = '{$list->format_currency_num($base, $smarty.const.SESS_CURRENCY)}';
var setup = '{$list->format_currency_num($setup, $smarty.const.SESS_CURRENCY)}';
var qty = '{$qty}';
window.parent.updatePrice('{$VAR.id}',base,setup,qty);
//-->
</script>
javascript
{else}
no javascript
no javascript
{/if}
{/if}
{/if}

View File

@@ -1,543 +1,82 @@
{ $block->display("core:top_clean") }
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{$method->exe("cart","admin_view")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{if $results <= 0}
{translate module=cart}
empty
{/translate}
{else}
{literal}
<script language="JavaScript">
<!-- START
var http = getHTTPObject();
var acct = '{/literal}{$VAR.account_id}{literal}';
function changeDomainTerm(id,term)
{
showIFrame('iframeCart',0,0,'?_page=cart:changeqty&type=3&_escape=1&id='+id+'&term='+term);
}
function changeRecurring(id,schedule)
{
showIFrame('iframeCart',0,0,'?_page=cart:admin_changeqty&account_id='+acct+'&type=2&_escape=1&id='+id+'&schedule='+schedule);
}
function changeQuantity(id,qty)
{
if(qty == "0") qty = 1;
showIFrame('iframeCart',0,0,'?_page=cart:admin_changeqty&account_id='+acct+'&type=1&_escape=1&id='+id+'&qty='+qty);
}
function deleteCart(id)
{
document.getElementById(id).style.display = 'none';
showIFrame('iframeCart',0,0,'?_page=cart:admin_changeqty&account_id='+acct+'&_escape=1&id='+id+'&qty=0');
}
function updatePrice(id,base,setup,qty)
{
document.getElementById("quantity_"+id).value = qty;
document.getElementById("def_base_price_"+id).style.display='none';
document.getElementById("base_price_"+id).innerHTML = base;
if(document.getElementById("def_setup_price_"+id))
document.getElementById("def_setup_price_"+id).style.display='none';
if(document.getElementById("setup_price_"+id))
document.getElementById("setup_price_"+id).innerHTML = setup;
}
function ad_hoc_discount(id) {
var amount = document.getElementById('ad_hoc_discount_'+id).value;
var url = "ajax.php?do[]=checkout:admin_adddiscount&id="+id+"&amount="+amount;
http.open("GET", url, true);
http.onreadystatechange = function() {
if (http.readyState == 4) {
try { eval(http.responseText) } catch(e) {}
{t}Your cart is empty, please select one or more products to continue{/t}
{else}
<script type="text/javascript">
<!--
{literal}
function changeDomainTerm(id,term) {
showIFrame('iframe',0,0,'?_page=cart:changeqty&type=3&_escape=1&id='+id+'&term='+term);
}
}
http.send(null);
}
// END -->
</script>
{/literal}
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$cart item=cart}
<DIV id="{$cart.id}">
{if $cart.cart_type == "2"}
<!-- Show domain -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td width="67%" class="row2"><b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="51%"><b> <u>
{$cart.domain_name|upper}
.
{$cart.domain_tld|upper}
</u> </b></td>
<td width="37%">&nbsp;</td>
<td width="12%" align="right"><a href="?_page=product:details&id={$cart_assoc.product_id}">
</a><a href="javascript:deleteCart('{$cart.id}');">
</a><a href="javascript:deleteCart('{$cart.id}');">
</a><a href="?_page=product:details&id={$cart.product_id}">
</a><a href="javascript:deleteCart('{$cart.id}');"><img src="themes/{$THEME_NAME}/images/icons/trash_16.gif" border="0" alt="Remove from Cart"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="67%"> &nbsp;&nbsp;<b>
{if $cart.host_type == "register"}
{translate module=cart}
register
{/translate}
{elseif $cart.host_type == "transfer"}
{translate module=cart}
transfer
{/translate}
{elseif $cart.host_type == "park"}
{translate module=cart}
park
{/translate}
{/if}
</b></td>
</tr>
{if $cart.cart_type == "1"}
{if $cart.host_type == "ns_transfer"}
{/if}
{if $cart.host_type == "ip"}
{/if}
{/if}
</table>
</td>
<td width="30%" class="row1" valign="top" align="right">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="70%">
{translate module=cart}
base_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<div id="def_base_price_{$cart_assoc.id}">
<div id="def_base_price_{$cart.id}">
{$list->format_currency_num($cart.price, $smarty.const.SESS_CURRENCY)}
</div>
<div id="base_price_{$cart.id}"></div>
</div>
<div id="base_price_{$cart_assoc.id}"></div>
</td>
</tr>
<tr>
<td width="70%">Ad Hoc Discount</td>
<td width="30%" valign="middle" align="right"><input onChange="ad_hoc_discount('{$cart.id}');" type="text" size="5" id="ad_hoc_discount_{$cart.id}" value="{$cart.ad_hoc_discount}"></td>
</tr>
</table>
{if $cart.host_type == 'register'}
<select id="quantity_{$cart.id}" onChange="changeDomainTerm('{$cart.id}',this.value);" name="select">
{foreach from=$cart.tld_arr item=tld_price key=tld_term}
<option value="{$tld_term}" {if $tld_term == $cart.domain_term}selected{/if}>
{$tld_term}
Year
{$list->format_currency($tld_price, $smarty.const.SESS_CURRENCY)}
</option>
{/foreach}
</select>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
{elseif $cart.cart_type == "3"}
<!-- Show ad-hoc item -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td width="67%" class="row2"><b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="51%"> <b>
{$cart.ad_hoc_name}
</b></td>
<td width="35%"><b> </b></td>
<td width="14%" align="right"> <a href="?_page=product:admin_details&id={$cart.product_id}&_escape=1">
</a> <a href="javascript:deleteCart('{$cart.id}');">
<img title=Delete src="themes/{$THEME_NAME}/images/icons/trash_16.gif" border="0"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="67%"> &nbsp;&nbsp;<b>
{translate module=cart}
price_type
{/translate}
: </b>
{translate module=cart}
price_type_one
{/translate}
</td>
</tr>
{if $cart.cart_type == "1"}
{if $cart.host_type == "ns_transfer"}
{/if}
{if $cart.host_type == "ip"}
{/if}
{/if}
</table>
</td>
<td width="30%" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="70%">
{translate module=cart}
base_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<div id="def_base_price_{$cart.id}">
{$list->format_currency_num($cart.price_base, $smarty.const.SESS_CURRENCY)}
</div>
<div id="base_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td width="70%">
{translate module=cart}
quantity
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="76%" align="right">
<input type="text" id="quantity_{$cart.id}" name="quantity_{$cart.id}2" size="2" value="{$cart.quantity}" onChange="changeQuantity('{$cart.id}',this.value);">
</td>
<td width="24%" valign="middle" align="right"><img src="themes/{$THEME_NAME}/images/icons/calc_16.gif" border="0"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="70%">Ad Hoc Discount</td>
<td width="30%" valign="middle" align="right"><input onChange="ad_hoc_discount('{$cart.id}');" type="text" size="5" id="ad_hoc_discount_{$cart.id}" value="{$cart.ad_hoc_discount}"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{else}
<!-- Show product -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td width="67%" class="row2"><b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="51%"><b>
{if $list->translate("product_translate","name", "product_id", $cart.product_id, "translate_product")}
{/if}
<u>
{$translate_product.name}
</u></b></td>
<td width="35%"><b> </b></td>
<td width="14%" align="right"><a href="?_page=product:details&id={$cart.product_id}">
</a><a href="javascript:deleteCart('{$cart.id}');"><img src="themes/{$THEME_NAME}/images/icons/trash_16.gif" border="0" alt="Remove from Cart"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="67%"> &nbsp;&nbsp;<b>
{translate module=cart}
price_type
{/translate}
: </b>
{if $cart.product.price_type == "0"}
{translate module=cart}
price_type_one
{/translate}
{/if}
{if $cart.product.price_type == "1"}
{translate module=cart}
price_type_recurr
{/translate}
{/if}
{if $cart.product.price_type == "2"}
{translate module=cart}
price_type_trial
{/translate}
{/if}
</td>
</tr>
<tr>
<td width="67%">
{if $cart.product.price_type == "1"}
&nbsp;&nbsp;
<select id="recurr_schedule_{$cart.id}" name="recurr_schedule_{$cart.id}" onChange="changeRecurring('{$cart.id}',this.value);" >
{foreach from=$cart.price item=price_recurr key=key}
<option value="{$key}" {if $cart.recurr_schedule == $key} selected{/if}>
{$list->format_currency_num($price_recurr.base,$smarty.const.SESS_CURRENCY)}
&nbsp;
{if $key == "0" }
{translate module=cart}
recurr_week
{/translate}
{/if}
{if $key == "1" }
{translate module=cart}
recurr_month
{/translate}
{/if}
{if $key == "2" }
{translate module=cart}
recurr_quarter
{/translate}
{/if}
{if $key == "3" }
{translate module=cart}
recurr_semianual
{/translate}
{/if}
{if $key == "4" }
{translate module=cart}
recurr_anual
{/translate}
{/if}
{if $key == "5" }
{translate module=cart}
recurr_twoyear
{/translate}
{/if}
{if $key == "6" }
{translate module=cart}
recurr_threeyear
{/translate}
{/if}
{if $price_recurr.setup > 0}
&nbsp; + &nbsp;
{$list->format_currency_num($price_recurr.setup,$smarty.const.SESS_CURRENCY)}
{translate module=cart}
setup
{/translate}
{/if}
</option>
{/foreach}
</select>
{/if}
</td>
</tr>
{if $cart.service_id > 0}
<tr>
<td width="67%">&nbsp;&nbsp;
{translate module=cart service=$cart.service_id}
service_upgrade
{/translate}
</td>
</tr>
{/if}
{if $cart.cart_type == "1"}
{if $cart.host_type == "ns_transfer"}
<tr>
<td width="67%">&nbsp;&nbsp;
{translate module=cart}
host_type_domain
{/translate}
- <u>
{$cart.domain_name}
.
{$cart.domain_tld}
</u></td>
</tr>
{/if}
{if $cart.host_type == "ip"}
<tr>
<td width="67%">&nbsp;&nbsp;
{translate module=cart}
host_type_ip
{/translate}
</td>
</tr>
{/if}
{/if}
{if $cart.attr}
<tr>
<td width="67%"> {$cart.attr} </td>
</tr>
{/if}
</table>
</td>
<td width="30%" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="70%">
{translate module=cart}
base_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<div id="def_base_price_{$cart.id}">
{$list->format_currency_num($cart.price_base, $smarty.const.SESS_CURRENCY)}
</div>
<div id="base_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td width="70%">
{translate module=cart}
setup_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<div id="def_setup_price_{$cart.id}">
{$list->format_currency_num($cart.price_setup, $smarty.const.SESS_CURRENCY)}
</div>
<div id="setup_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td width="70%">
{translate module=cart}
quantity
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="76%" align="right">&nbsp;
<input type="text" id="quantity_{$cart.id}" name="quantity_{$cart.id}" size="2" value="{$cart.quantity}" onChange="changeQuantity('{$cart.id}',this.value);" {if ($cart.host_type != "ip" && $cart.host_type != "") || $cart.service_id > 0 }disabled{/if} />
</td>
<td width="24%" valign="middle" align="right"><img src="themes/{$THEME_NAME}/images/icons/calc_16.gif" border="0"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="70%">Ad Hoc Discount</td>
<td width="30%" valign="middle" align="right"><input onChange="ad_hoc_discount('{$cart.id}');" type="text" size="5" id="ad_hoc_discount_{$cart.id}" value="{$cart.ad_hoc_discount}"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{/if}
<br>
{foreach from=$cart.assoc item=cart_assoc}
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td width="67%" class="row2"><b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="51%"><b> <u>
{$cart_assoc.domain_name|upper}
.
{$cart_assoc.domain_tld|upper}
</u> </b></td>
<td width="37%">&nbsp;</td>
<td width="12%" align="right"><a href="?_page=product:details&id={$cart_assoc.product_id}">
</a><a href="javascript:deleteCart('{$cart.id}');">
</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="67%"> &nbsp;&nbsp;<b> </b>
{if $cart_assoc.host_type == "register"}
{translate module=cart}
host_type_register
{/translate}
{elseif $cart_assoc.host_type == "transfer"}
{translate module=cart}
host_type_transfer
{/translate}
{elseif $cart_assoc.host_type == "park"}
{translate module=cart}
host_type_park
{/translate}
{/if}
{$cart.product.sku}
</td>
</tr>
</table>
</td>
<td width="30%" class="row1" valign="top" align="right">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="70%">
{translate module=cart}
base_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<div id="def_base_price_{$cart_assoc.id}">
{$list->format_currency_num($cart_assoc.price, $smarty.const.SESS_CURRENCY)}
</div>
<div id="base_price_{$cart_assoc.id}"></div>
</td>
</tr>
</table>
{if $cart_assoc.host_type == 'register'}
<select id="quantity_{$cart_assoc.id}" onChange="changeDomainTerm('{$cart_assoc.id}',this.value);" name="select2">
{foreach from=$cart_assoc.tld_arr item=tld_price key=tld_term}
<option value="{$tld_term}" {if $tld_term == $cart_assoc.domain_term}selected{/if}>
{$tld_term}
Year
{$list->format_currency($tld_price, $smarty.const.SESS_CURRENCY)}
</option>
{/foreach}
</select>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
{/foreach}
</DIV>
{/foreach}
<iframe name="iframeCart" id="iframeCart" style="border:0px; width:0px; height:0px;" scrolling="no" ALLOWTRANSPARENCY="true" frameborder="0" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
{/if}
function changeRecurring(id,schedule) {
showIFrame('iframe',0,0,'?_page=cart:admin_changeqty&account_id='+acct+'&type=2&_escape=1&id='+id+'&schedule='+schedule);
}
function changeQuantity(id,qty) {
if(qty == "0") qty = 1;
showIFrame('iframe',0,0,'?_page=cart:admin_changeqty&account_id='+acct+'&type=1&_escape=1&id='+id+'&qty='+qty);
}
function deleteCart(id) {
document.getElementById('c'+id).style.display = 'none';
showIFrame('iframe',0,0,'?_page=cart:admin_changeqty&account_id='+acct+'&_escape=1&id='+id+'&qty=0');
}
function updatePrice(id,base,setup,qty) {
document.getElementById("quantity_"+id).value = qty;
document.getElementById("def_base_price_"+id).style.display='none';
document.getElementById("base_price_"+id).innerHTML = base;
if(document.getElementById("def_setup_price_"+id))
document.getElementById("def_setup_price_"+id).style.display='none';
if(document.getElementById("setup_price_"+id))
document.getElementById("setup_price_"+id).innerHTML = setup;
}
function ad_hoc_discount(id) {
var amount = document.getElementById('ad_hoc_discount_'+id).value;
var url = "ajax.php?do[]=checkout:admin_adddiscount&id="+id+"&amount="+amount;
http.open("GET", url, true);
http.onreadystatechange = function() {
if (http.readyState == 4) {
try { eval(http.responseText) } catch(e) {}
}
}
http.send(null);
}
var http = getHTTPObject();
var acct = '{$VAR.account_id}';
{/literal}
//-->
</script>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$cart item=cart}
<div id="c{$cart.id}">
{if $cart.cart_type == '2'}
{include file='file:cart_table_type_2.tpl' showadmin=true}
{elseif $cart.cart_type == '3'}
{include file='file:cart_table_type_3.tpl' showadmin=true}
{else}
{include file='file:cart_table_type_x.tpl' showadmin=true}
{/if}
<br/>
{include file='file:cart_table_assoc.tpl'}
</div>
{/foreach}
<!-- END OF RESULT LOOP -->
<iframe name="iframe" id="iframe" style="border:0px; width:0px; height:0px;" scrolling="no" ALLOWTRANSPARENCY="true" frameborder="0" src="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
{/if}
{/if}

View File

@@ -1,466 +1,110 @@
{$method->exe("cart","view")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{$method->exe_noauth($meth.0,'user_view')}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{if $results <= 0}
{translate module=cart}
empty
{/translate}
<br><br>
{$block->display("product:cat")}
{t}Your cart is empty, please select one or more products to continue{/t}
{$block->display('product_cat:user_menu')}
{else}
<script type="text/javascript">
<!--
{literal}
function changeDomainTerm(id,term) {
showIFrame('iframe',0,0,'?_page=cart:changeqty&type=3&_escape=1&id='+id+'&term='+term);
}
{else}
{literal}
<script language="JavaScript">
<!-- START
function changeRecurring(id,schedule) {
showIFrame('iframe',0,0,'?_page=cart:changeqty&type=2&_escape=1&id='+id+'&schedule='+schedule);
}
function changeDomainTerm(id,term)
{
showIFrame('iframeCart',0,0,'?_page=cart:changeqty&type=3&_escape=1&id='+id+'&term='+term);
}
function changeRecurring(id,schedule)
{
showIFrame('iframeCart',0,0,'?_page=cart:changeqty&type=2&_escape=1&id='+id+'&schedule='+schedule);
}
function changeQuantity(id,qty)
{
if(qty == "0") qty = 1;
showIFrame('iframeCart',0,0,'?_page=cart:changeqty&type=1&_escape=1&id='+id+'&qty='+qty);
}
function deleteCart(id)
{
document.getElementById(id).style.display = 'none';
showIFrame('iframeCart',0,0,'?_page=cart:changeqty&_escape=1&id='+id+'&qty=0');
}
function updatePrice(id,base,setup,qty)
{
document.getElementById("quantity_"+id).value = qty;
document.getElementById("def_base_price_"+id).style.display='none';
document.getElementById("base_price_"+id).innerHTML = base;
if(document.getElementById("def_setup_price_"+id))
document.getElementById("def_setup_price_"+id).style.display='none';
if(document.getElementById("setup_price_"+id))
document.getElementById("setup_price_"+id).innerHTML = setup;
}
// END -->
function changeQuantity(id,qty) {
if(qty == "0") qty = 1;
showIFrame('iframe',0,0,'?_page=cart:changeqty&type=1&_escape=1&id='+id+'&qty='+qty);
}
function deleteCart(id) {
document.getElementById('c'+id).style.display = 'none';
showIFrame('iframe',0,0,'?_page=cart:changeqty&_escape=1&id='+id+'&qty=0');
}
function updatePrice(id,base,setup,qty) {
document.getElementById("quantity_"+id).value = qty;
document.getElementById("def_base_price_"+id).style.display='none';
document.getElementById("base_price_"+id).innerHTML = base;
if(document.getElementById("def_setup_price_"+id))
document.getElementById("def_setup_price_"+id).style.display='none';
if(document.getElementById("setup_price_"+id))
document.getElementById("setup_price_"+id).innerHTML = setup;
}
function CurrencyChange(obj) {
document.location='?_page=cart:cart&cyid='+obj.value;
}
{/literal}
//-->
</script>
{/literal}
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$cart item=cart}
<DIV id="{$cart.id}">
{if $cart.cart_type == "2"}
<!-- Show domain -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td width="67%" class="row2"><b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="51%"><b> <u>
{$cart.domain_name|upper}.{$cart.domain_tld|upper}
</u> </b></td>
<td width="37%">&nbsp;</td>
<td width="12%" align="right"><a href="?_page=product:details&id={$cart_assoc.product_id}">
</a><a href="javascript:deleteCart('{$cart.id}');">
</a><a href="javascript:deleteCart('{$cart.id}');">
</a><a href="?_page=product:details&id={$cart.product_id}">
</a><a href="javascript:deleteCart('{$cart.id}');"><img src="themes/{$THEME_NAME}/images/icons/trash_16.gif" border="0" alt="Remove from Cart"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="67%"> &nbsp;&nbsp;<b>
{if $cart.host_type == "register"}
{translate module=cart}
register
{/translate}
{elseif $cart.host_type == "transfer"}
{translate module=cart}
transfer
{/translate}
{elseif $cart.host_type == "park"}
{translate module=cart}
park
{/translate}
{/if}
</b></td>
</tr>
{if $cart.cart_type == "1"}
{if $cart.host_type == "ns_transfer"}
{/if}
{if $cart.host_type == "ip"}
{/if}
{/if}
</table>
</td>
<td width="30%" class="row1" valign="top" align="right">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="70%">
{translate module=cart}
base_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<div id="def_base_price_{$cart_assoc.id}">
<DIV id="def_base_price_{$cart.id}">
{$list->format_currency_num($cart.price, $smarty.const.SESS_CURRENCY)}
</DIV>
<DIV id="base_price_{$cart.id}"></DIV>
</div>
<div id="base_price_{$cart_assoc.id}"></div>
</td>
</tr>
</table>
{if $cart.host_type == 'register'}
<select id="quantity_{$cart.id}" onChange="changeDomainTerm('{$cart.id}',this.value);">
{foreach from=$cart.tld_arr item=tld_price key=tld_term}
<option value="{$tld_term}" {if $tld_term == $cart.domain_term}selected{/if}>
{$tld_term}
Year
{$list->format_currency($tld_price, $smarty.const.SESS_CURRENCY)}
</option>
{/foreach}
</select>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
{elseif $cart.cart_type == "3"}
<!-- Show ad-hoc item -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td width="67%" class="row2"><b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="51%"><b> <u> <a href="?_page=product:details&id={$cart.product_id}">
{$cart.ad_hoc_name}</a></u> </b></td>
<td width="35%"><b> </b></td>
<td width="14%" align="right"> <a href="?_page=product:admin_details&id={$cart.product_id}&_escape=1">
</a> <a href="javascript:deleteCart('{$cart.id}');">
<img title=Delete src="themes/{$THEME_NAME}/images/icons/trash_16.gif" border="0"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="67%"> &nbsp;&nbsp;<b>
{translate module=cart}
price_type
{/translate}
: </b>
{translate module=cart}
price_type_one
{/translate}
</td>
</tr>
{if $cart.cart_type == "1"}
{if $cart.host_type == "ns_transfer"}
{/if}
{if $cart.host_type == "ip"}
{/if}
{/if}
</table>
</td>
<td width="30%" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="70%">
{translate module=cart}
base_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<div id="def_base_price_{$cart.id}">
{$list->format_currency_num($cart.price_base, $smarty.const.SESS_CURRENCY)}
</div>
<div id="base_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td width="70%">
{translate module=cart}
quantity
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="76%" align="right">
<input type="text" id="quantity_{$cart.id}" name="quantity_{$cart.id}2" size="2" value="{$cart.quantity}" onChange="changeQuantity('{$cart.id}',this.value);">
</td>
<td width="24%" valign="middle" align="right"><img src="themes/{$THEME_NAME}/images/icons/calc_16.gif" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{else}
<!-- Show product -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top"> <table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td width="67%" class="row2"><b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="51%"><b> {if $list->translate("product_translate","name", "product_id", $cart.product_id, "translate_product")} {/if} <u> <a href="?_page=product:details&id={$cart.product_id}"> {$translate_product.name} </a></u></b></td>
<td width="35%"><b> </b></td>
<td width="14%" align="right"><a href="?_page=product:details&id={$cart.product_id}"> </a><a href="javascript:deleteCart('{$cart.id}');"><img src="themes/{$THEME_NAME}/images/icons/trash_16.gif" border="0" alt="Remove from Cart"></a> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="67%">&nbsp;&nbsp;<b> {translate module=cart} price_type {/translate} : </b> {if $cart.product.price_type == "0"} {translate module=cart} price_type_one {/translate} {/if} {if $cart.product.price_type == "1"} {translate module=cart} price_type_recurr {/translate} {/if} {if $cart.product.price_type == "2"} {translate module=cart} price_type_trial {/translate} {/if} </td>
</tr>
<tr>
<td width="67%"> {if $cart.product.price_type == "1"} &nbsp;&nbsp;
<select id="recurr_schedule_{$cart.id}" name="recurr_schedule_{$cart.id}" onChange="changeRecurring('{$cart.id}',this.value);" >
{foreach from=$cart.price item=price_recurr key=key}
<option value="{$key}" {if $cart.recurr_schedule == $key} selected{/if}> {$list->format_currency_num($price_recurr.base,$smarty.const.SESS_CURRENCY)} &nbsp; {if $key == "0" } {translate module=cart} recurr_week {/translate} {/if} {if $key == "1" } {translate module=cart} recurr_month {/translate} {/if} {if $key == "2" } {translate module=cart} recurr_quarter {/translate} {/if} {if $key == "3" } {translate module=cart} recurr_semianual {/translate} {/if} {if $key == "4" } {translate module=cart} recurr_anual {/translate} {/if} {if $key == "5" } {translate module=cart} recurr_twoyear {/translate} {/if} {if $key == "6" } {translate module=cart} recurr_threeyear {/translate} {/if} {if $price_recurr.setup > 0} &nbsp; + &nbsp; {$list->format_currency_num($price_recurr.setup,$smarty.const.SESS_CURRENCY)} {translate module=cart} setup {/translate} {/if} </option>
{/foreach}
</select>
{/if} </td>
</tr>
{if $cart.service_id > 0}
<tr>
<td width="67%">&nbsp;&nbsp; {translate module=cart service=$cart.service_id} service_upgrade {/translate} </td>
</tr>
{/if} {if $cart.cart_type == "1"} {if $cart.host_type == "ns_transfer"}
<tr>
<td width="67%">&nbsp;&nbsp; {translate module=cart} host_type_domain {/translate} - <u> {$cart.domain_name}.{$cart.domain_tld} </u></td>
</tr>
{/if} {if $cart.host_type == "ip"}
<tr>
<td width="67%">&nbsp;&nbsp; {translate module=cart} host_type_ip {/translate} </td>
</tr>
{/if} {/if}
{if $cart.attr}
<tr>
<td width="67%"> {$cart.attr} </td>
</tr>
{/if}
</table></td>
<td width="30%" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="70%">
{translate module=cart}
base_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<DIV id="def_base_price_{$cart.id}">
{$list->format_currency_num($cart.price_base, $smarty.const.SESS_CURRENCY)}
</DIV>
<DIV id="base_price_{$cart.id}"></DIV>
</td>
</tr>
<tr>
<td width="70%">
{translate module=cart}
setup_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<DIV id="def_setup_price_{$cart.id}">
{$list->format_currency_num($cart.price_setup, $smarty.const.SESS_CURRENCY)}
</DIV>
<DIV id="setup_price_{$cart.id}"></DIV>
</td>
</tr>
<tr>
<td width="70%">
{translate module=cart}
quantity
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="76%" align="right">
<input type="text" id="quantity_{$cart.id}" name="quantity_{$cart.id}" size="2" value="{$cart.quantity}" onChange="changeQuantity('{$cart.id}',this.value);" {if ($cart.host_type != "ip" && $cart.host_type != "") || $cart.service_id > 0 }disabled{/if} />
</td>
<td width="24%" valign="middle" align="right"><img src="themes/{$THEME_NAME}/images/icons/calc_16.gif" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$cart item=cart}
<div id="c{$cart.id}">
{if $cart.cart_type == '2'}
{include file='file:cart_table_type_2.tpl'}
{elseif $cart.cart_type == '3'}
{include file='file:cart_table_type_3.tpl'}
{else}
{include file='file:cart_table_type_x.tpl'}
{/if}
<br/>
{include file='file:cart_table_assoc.tpl'}
</div>
{/foreach}
<!-- END OF RESULT LOOP -->
<iframe name="iframe" id="iframe" style="border:0px; width:0px; height:0px;" scrolling="no" ALLOWTRANSPARENCY="true" frameborder="0" src="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td style="width: 75%;">
<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>
{$list->currency_list('cyid_arr')}
<select name="select2" 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: 20px;"><img src="themes/{$THEME_NAME}/images/currency/{$currency_thumbnail}.gif" alt="Currency" style="border: 0px;"/></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="width: 25%;" valign="bottom" align="right">
<form id="cart" method="post" action="" enctype="multipart/form-data">
<div>
<input type="hidden" name="s" value="{$SESS}"/>
<input type="hidden" name="_page" value="checkout:checkout"/>
<input type="submit" name="Submit" value="{t}Checkout{/t}" class="form_button"/>
</div>
</form>
</td>
</tr>
</table>
{/if}
{/if}
<br>
{foreach from=$cart.assoc item=cart_assoc}
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td width="67%" class="row2"><b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="51%"><b> <u>
{$cart_assoc.domain_name|upper}
.
{$cart_assoc.domain_tld|upper}
</u> </b></td>
<td width="37%">&nbsp;</td>
<td width="12%" align="right"><a href="?_page=product:details&id={$cart_assoc.product_id}">
</a><a href="javascript:deleteCart('{$cart.id}');">
</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="67%"> &nbsp;&nbsp;<b> </b>
{if $cart_assoc.host_type == "register"}
{translate module=cart} host_type_register {/translate}
{elseif $cart_assoc.host_type == "transfer"}
{translate module=cart} host_type_transfer {/translate}
{elseif $cart_assoc.host_type == "park"}
{translate module=cart} host_type_park {/translate}
{/if}
{$cart.product.sku}
</td>
</tr>
</table>
</td>
<td width="30%" class="row1" valign="top" align="right">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="70%">
{translate module=cart}
base_price
{/translate}
</td>
<td width="30%" valign="middle" align="right">
<div id="def_base_price_{$cart_assoc.id}">
{$list->format_currency_num($cart_assoc.price, $smarty.const.SESS_CURRENCY)}
</div>
<div id="base_price_{$cart_assoc.id}"></div>
</td>
</tr>
</table>
{if $cart_assoc.host_type == 'register'}
<select id="quantity_{$cart_assoc.id}" onChange="changeDomainTerm('{$cart_assoc.id}',this.value);">
{foreach from=$cart_assoc.tld_arr item=tld_price key=tld_term}
<option value="{$tld_term}" {if $tld_term == $cart_assoc.domain_term}selected{/if}>
{$tld_term}
Year
{$list->format_currency($tld_price, $smarty.const.SESS_CURRENCY)}
</option>
{/foreach}
</select>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
{/foreach}
</DIV>
{/foreach}
<!-- END OF RESULT LOOP -->
<iframe name="iframeCart" id="iframeCart" style="border:0px; width:0px; height:0px;" scrolling="no" ALLOWTRANSPARENCY="true" frameborder="0" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td width="78%">
<table width="150" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"><b>
{translate}
currency
{/translate}
</b></td>
</tr>
<tr valign="top" class="row1">
<td width="50%" valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="78%">
{literal}
<script language="JavaScript"> function CurrencyChange(obj) { document.location='?_page=cart:cart&cyid='+obj.value; } </script>
{/literal}
{$list->currency_list("cyid_arr")}
<select name="select2" 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{/if}>
{$item.iso}
</option>
{/foreach}
</select>
</td>
<td width="22%"> <img src="themes/{$THEME_NAME}/images/currency/{$currency_thumbnail}.gif" border="0">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="22%" valign="bottom" align="right">
<form name="form1" method="post" action="{$SSL_URL}">
<input type="hidden" name="s" value="{$SESS}">
<input type="hidden" name="_page" value="checkout:checkout">
<input type="submit" name="Submit" value="{translate}checkout{/translate}" class="form_button">
</form>
</td>
</tr>
</table>
</center>
{/if}
{/if}

View File

@@ -0,0 +1,48 @@
{foreach from=$cart.assoc item=cart_assoc}
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td style="width: 70%;" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td class="row2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td style="text-decoration: underline;"><b>{$cart_assoc.domain_name|upper}.{$cart_assoc.domain_tld|upper}</b></td>
<td style="width: 20px; text-align: right;">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;{$list->menu_staticlist('domaintype','','',$cart_assoc.host_type,'form_menu')} {$cart.product.sku}</td>
</tr>
</table>
</td>
<td style="width: 30%;" class="row1" valign="top" align="right">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td style="width: 70%;">{translate module=cart}base_price{/translate}</td>
<td style="width: 30%;" valign="middle" align="right">
<div id="def_base_price_{$cart_assoc.id}">{$list->format_currency_num($cart_assoc.price, $smarty.const.SESS_CURRENCY)}</div>
<div id="base_price_{$cart_assoc.id}"></div>
</td>
</tr>
</table>
{if $cart_assoc.host_type == 'register'}
<select id="quantity_{$cart_assoc.id}" onchange="changeDomainTerm('{$cart_assoc.id}',this.value);">
{foreach from=$cart_assoc.tld_arr item=tld_price key=tld_term}
<option value="{$tld_term}" {if $tld_term == $cart_assoc.domain_term}selected="selected"{/if}>{$tld_term} Year {$list->format_currency($tld_price, $smarty.const.SESS_CURRENCY)}</option>
{/foreach}
</select>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
{/foreach}

View File

@@ -0,0 +1,52 @@
<!-- Show domain -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td style="width: 70%;" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td class="row2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td style="text-decoration: underline;"><b>{$cart.domain_name|upper}.{$cart.domain_tld|upper}</b></td>
<td style="width: 20px; text-align: right;">{if $disable}&nbsp;{else}<a href="javascript:deleteCart('{$cart.id}');"><img src="themes/{$THEME_NAME}/images/icons/trash_16.gif" alt="Remove from Cart" style="border: 0px;"/></a>{/if}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>&nbsp;<b>{$list->menu_staticlist('domaintype','','',$cart.host_type,'form_menu')}</b></td>
</tr>
</table>
</td>
<td style="width: 30%;" class="row1" valign="top" align="right">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td style="width: 70%;">{t}Base Price{/t}</td>
<td style="width: 30%;" valign="middle" align="right">
<div id="def_base_price_{$cart_assoc.id}">
<div id="def_base_price_{$cart.id}">{$list->format_currency_num($cart.price, $smarty.const.SESS_CURRENCY)}</div>
<div id="base_price_{$cart.id}"></div>
</div>
<div id="base_price_{$cart_assoc.id}"></div>
</td>
</tr>
{if $showadmin}
{include file='file:cart_tr_adhocdiscount.tpl'}
{/if}
</table>
{if $cart.host_type == 'register'}
<select id="quantity_{$cart.id}" onchange="changeDomainTerm('{$cart.id}',this.value);" {if $disable}disabled="disabled"{/if}>
{foreach from=$cart.tld_arr item=tld_price key=tld_term}
<option value="{$tld_term}" {if $tld_term == $cart.domain_term}selected="selected"{/if}>{$tld_term} Year {$list->format_currency($tld_price, $smarty.const.SESS_CURRENCY)}</option>
{/foreach}
</select>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@@ -0,0 +1,47 @@
<!-- Show ad-hoc item -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td style="width: 70%;" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td><b>{$cart.ad_hoc_name}</b></td>
<td style="width: 20px; text-align: right;">{if $disable}&nbsp;{else}<a href="javascript:deleteCart('{$cart.id}');"><img src="themes/{$THEME_NAME}/images/icons/trash_16.gif" alt="Remove from Cart" style="border: 0px;"/></a>{/if}</td>
</tr>
<tr>
<td>&nbsp;&nbsp;<b>{t}Pricing Structure{/t}:</b> {$list->menu_staticlist('pricetype','','',0,'form_menu')}</td>
</tr>
</table>
</td>
<td style="width: 30%;" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td style="width: 70%;">{t}Base Price{/t}</td>
<td style="width: 30%;" valign="middle" align="right">
<div id="def_base_price_{$cart.id}">{$list->format_currency_num($cart.price_base, $smarty.const.SESS_CURRENCY)}</div>
<div id="base_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td style="width: 70%;">{t}Quantity{/t}</td>
<td style="width: 30%;" valign="middle" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="text" id="quantity_{$cart.id}" name="quantity_{$cart.id}2" size="2" value="{$cart.quantity}" onChange="changeQuantity('{$cart.id}',this.value);" {if $disable}disabled="disabled"{/if}/></td>
<td style="width: 20px; text-align: right;"><img src="themes/{$THEME_NAME}/images/icons/calc_16.gif" alt="Calc" style="border: 0px;"/></td>
</tr>
</table>
</td>
</tr>
{if $showadmin}
{include file='file:cart_tr_adhocdiscount.tpl'}
{/if}
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@@ -0,0 +1,91 @@
<!-- Show product -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td style="width: 70%;" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td><b>{if $list->translate('product_translate','name','product_id',$cart.product_id,'translate_product')}{/if} <span style="text-decoration: underline;"><a href="?_page=product:details&amp;id={$cart.product_id}">{$translate_product.name}</a></span></b></td>
<td style="width: 20px; text-align: right;">{if $disable}&nbsp;{else}<a href="javascript:deleteCart('{$cart.id}');"><img src="themes/{$THEME_NAME}/images/icons/trash_16.gif" alt="Remove from Cart" style="border: 0px;"/></a>{/if}</td>
</tr>
<tr>
<td>&nbsp;&nbsp;<b>{t}Pricing Structure{/t}:</b> {$list->menu_staticlist('pricetype','','',$cart.product.price_type,'form_menu')}</td>
</tr>
<tr>
<td>
{if $cart.product.price_type == '1'}&nbsp;
<select id="recurr_schedule_{$cart.id}" name="recurr_schedule_{$cart.id}" onchange="changeRecurring('{$cart.id}',this.value);" {if $disable}disabled="disabled"{/if}>
{foreach from=$cart.price item=price_recurr key=key}
<option value="{$key}" {if $cart.recurr_schedule == $key} selected="selected"{/if}>
{$list->format_currency_num($price_recurr.base,$smarty.const.SESS_CURRENCY)}&nbsp;
{$list->menu_staticlist('recur_schedule','','',$key,'form_menu')}
{if $price_recurr.setup > 0}+&nbsp;{$list->format_currency_num($price_recurr.setup,$smarty.const.SESS_CURRENCY)} {t}Setup{/t}{/if}
</option>
{/foreach}
</select>
{/if}
</td>
</tr>
{if $cart.service_id > 0}
<tr>
<td>&nbsp;&nbsp;{translate module=cart service=$cart.service_id}service_upgrade{/translate}</td>
</tr>
{/if}
{if $cart.cart_type == '1'}
{if $cart.host_type == 'ns_transfer'}
<tr>
<td>&nbsp;&nbsp;{t}For your existing domain{/t} - <span style="text-decoration: underline;">{$cart.domain_name}.{$cart.domain_tld}</span></td>
</tr>
{/if}
{if $cart.host_type == 'ip'}
<tr>
<td>&nbsp;&nbsp;{t}This is an IP based hosting plan, IP address to be assigned.{/t}</td>
</tr>
{/if}
{/if}
{if $cart.attr}
<tr>
<td>{$cart.attr}</td>
</tr>
{/if}
</table>
</td>
<td style="width: 30%;" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td style="width: 70%;">{t}Base Price{/t}</td>
<td style="width: 30%;" valign="middle" align="right">
<div id="def_base_price_{$cart.id}">{$list->format_currency_num($cart.price_base, $smarty.const.SESS_CURRENCY)}</div>
<div id="base_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td style="width: 70%;">{t}Setup Price{/t}</td>
<td style="width: 30%;" valign="middle" align="right">
<div id="def_setup_price_{$cart.id}">{$list->format_currency_num($cart.price_setup, $smarty.const.SESS_CURRENCY)}</div>
<div id="setup_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td style="width: 70%;">{t}Quantity{/t}</td>
<td style="width: 30%;" valign="middle" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="text" id="quantity_{$cart.id}" name="quantity_{$cart.id}" size="2" value="{$cart.quantity}" onchange="changeQuantity('{$cart.id}',this.value);" {if ($disable || $cart.host_type != 'ip' && $cart.host_type != '') || $cart.service_id > 0}disabled="disabled"{/if}/></td>
<td style="width: 20px; text-align: right;"><img src="themes/{$THEME_NAME}/images/icons/calc_16.gif" alt="Calc" style="border: 0px;"/></td>
</tr>
</table>
</td>
</tr>
{if $showadmin}
{include file='file:cart_tr_adhocdiscount.tpl'}
{/if}
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@@ -0,0 +1,4 @@
<tr>
<td style="width: 70%;">Ad Hoc Discount</td>
<td style="width: 30%;" valign="middle" align="right"><input type="text" size="5" id="ad_hoc_discount_{$cart.id}" value="{$cart.ad_hoc_discount}" onchange="ad_hoc_discount('{$cart.id}');"></td>
</tr>

View File

@@ -1,17 +1,18 @@
{$method->exe("cart","changeqty")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{else}
{$method->exe('cart','changeqty')}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{if $js}
<script language="javascript">
var base = '{$list->format_currency_num($base, $smarty.const.SESS_CURRENCY)}';
var setup = '{$list->format_currency_num($setup, $smarty.const.SESS_CURRENCY)}';
var qty = '{$qty}';
window.parent.updatePrice('{$VAR.id}',base,setup,qty);
</script>
javascript
<script type="text/javascript">
<!--
var base = '{$list->format_currency_num($base, $smarty.const.SESS_CURRENCY)}';
var setup = '{$list->format_currency_num($setup, $smarty.const.SESS_CURRENCY)}';
var qty = '{$qty}';
window.parent.updatePrice('{$VAR.id}',base,setup,qty);
//-->
</script>
javascript
{else}
no javascript
no javascript
{/if}
{/if}
{/if}