Initial Commit of AgileBill Open Source

This commit is contained in:
unknown
2008-11-26 14:50:40 -08:00
parent ae5a0fc25e
commit 02306ccc47
2954 changed files with 410976 additions and 0 deletions

View File

@@ -0,0 +1,201 @@
{literal}<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="includes/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "specific_textareas",
theme : "advanced",
plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "iespell,flash,advhr",
theme_advanced_toolbar_location : "bottom",
theme_advanced_toolbar_align : "center",
content_css : "themes/default/style.css",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
external_link_list_url : "example_link_list.js",
external_image_list_url : "example_image_list.js",
flash_external_list_url : "example_flash_list.js",
file_browser_callback : "fileBrowserCallBack",
relative_urls: 'false',
width : "100%"
});
</script>
<!-- /tinyMCE -->{/literal}
<!-- Display the form validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display the form to collect the input values -->
<form id="product_add" name="product_add" 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=product}title_add{/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="50%"> <b>
{translate module=product}
field_sku
{/translate}
</b> </td>
<td width="50%"> <b>
{translate module=product_translate}
field_name
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
<input type="text" name="product_sku" value="{$VAR.product_sku}" {if $product_sku == true}class="form_field_error"{/if}>
</td>
<td width="50%">
<input type="text" name="translate_name" value="{$VAR.translate_name}" >
</td>
</tr>
<tr valign="top">
<td width="50%"> <b>
{translate module=product}
field_price_type
{/translate}
</b> </td>
<td width="50%"> <b>
{translate module=product}
field_avail_category_id
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
<input type="radio" name="product_price_type" value="0" {if $VAR.product_price_type == "0" || $VAR.product_price_type == "" }checked{/if}>
{translate module=product}
price_type_one
{/translate}
<br>
<input type="radio" name="product_price_type" value="1" {if $VAR.product_price_type == "1"}checked{/if}>
{translate module=product}
price_type_recurr
{/translate}
<br>
<input type="radio" name="product_price_type" value="2" {if $VAR.product_price_type == "2"}checked{/if}>
{translate module=product}
price_type_trial
{/translate}
</td>
<td width="50%">
{ $list->menu_multi($VAR.product_avail_category_id, "product_avail_category_id", "product_cat", "name", "5", "", "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="50%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row1">
<tr>
<td width="50%"><b>
{translate module=product}
field_price_base
{/translate}
</b></td>
<td width="50%"><b>
{translate module=product}
field_price_setup
{/translate}
</b> </td>
</tr>
</table>
</td>
<td width="50%"> <b>
{translate module=product}
field_taxable
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row1">
<tr>
<td width="50%">
<input type="text" name="product_price_base" value="{$VAR.product_price_base}" {if $product_price_base == true}class="form_field_error"{/if} size="5">
{$list->currency_iso("")}
</td>
<td width="50%">
<input type="text" name="product_price_setup" value="{$VAR.product_price_setup}" {if $product_price_setup == true}class="form_field_error"{/if} size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
<b> </b></td>
<td width="50%">
{if $VAR.product_taxable != ""}
{ $list->bool("product_taxable", $VAR.product_taxable, "form_menu") }
{else}
{ $list->bool("product_taxable", "1", "form_menu") }
{/if}
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body">
<tr>
<td> <b>
{translate module=product_translate}
field_description_short
{/translate}
</b> </td>
</tr>
<tr>
<td>
<textarea name="translate_description_short" cols="80" rows="10" mce_editable="true">{$VAR.translate_description_short}</textarea>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td> <b>
{translate module=product_translate}
field_description_full
{/translate}
</b> </td>
</tr>
<tr>
<td>
<textarea name="translate_description_full" cols="80" rows="13" mce_editable="true">{$VAR.translate_description_full}</textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
<input type="hidden" name="_page" value="product:view">
<input type="hidden" name="_page_current" value="product:add">
<input type="hidden" name="do[]" value="product:add">
<input type="hidden" name="product_active" value="1">
<input type="hidden" name="product_plugin" value="0">
<input type="hidden" name="product_discount" value="0">
<input type="hidden" name="product_date_orig" value="{$list->date($smarty.now)}">
<input type="hidden" name="product_date_last" value="{$smarty.now}">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,495 @@
{ $block->display("core:top_clean") }
{ $method->exe("product","admin_details") } { if ($method->result == FALSE || !$product) } { $block->display("core:method_error") } {else}
<div align="center">
<input type="submit" onclick="addCart('cart')" name="cart" value="{translate module=product}cart{/translate}" class="form_button">
<br>
<br>
</div>
<form id="product_view" name="product_view" method="post" action="">
<input type="hidden" id="page" name="_page" value="">
<input type="hidden" name="do[]" value="cart:admin_add">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="_escape" value="1">
<input type="hidden" name="account_id" value="{$VAR.account_id}">
{if $list->translate("product_translate","name,description_full", "product_id", $product.id, "translate_product")}
{/if}
<a href="javascript:addCart('checkout');"></a>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{$translate_product.name}
</b> </td>
</tr>
<tr valign="top" class="row1">
<td width="50%">{$translate_product.description_full} </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{translate module=product}
field_sku
{/translate}
</b> </td>
<td width="50%"><b> </b></td>
</tr>
<tr valign="top" class="row1">
<td width="50%">
{$product.sku}
</td>
<td width="50%" valign="middle">
{if $product.cart_multiple} Quantity: <input name="quantity" type="text" id="quantity" value="1" size="3" maxlength="3">{/if}
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{translate module=product}
field_price_type
{/translate}
</b><br>
</td>
<td width="50%"> <b>
{translate module=product}
field_taxable
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
{if $product.price_type == "0"}
{translate module=product}
price_type_one
{/translate}
{/if}
{if $product.price_type == "1"}
{translate module=product}
price_type_recurr
{/translate}
{/if}
{if $product.price_type == "2"}
{translate module=product}
price_type_trial
{/translate}
{/if}
</td>
<td width="50%">
{if $product.taxable}
{translate}
true
{/translate}
{else}
{translate}
false
{/translate}
{/if}
</td>
</tr>
</table>
{if $product.price_type == "1" }
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"><b>
{translate module=product}
field_price_recurr_type
{/translate}
</b></td>
</tr>
<tr valign="top" class="row1">
<td width="50%">
<select name="recurr_schedule" >
{foreach from=$price item=price_recurr key=key}
<option value="{$key}" {if $product.price_recurr_default == $key} selected{/if}>
{$list->format_currency($price_recurr.base,$smarty.const.SESS_CURRENCY)}
&nbsp;&nbsp;
{if $key == "0" }
{translate module=product}
recurr_week
{/translate}
{/if}
{if $key == "1" }
{translate module=product}
recurr_month
{/translate}
{/if}
{if $key == "2" }
{translate module=product}
recurr_quarter
{/translate}
{/if}
{if $key == "3" }
{translate module=product}
recurr_semianual
{/translate}
{/if}
{if $key == "4" }
{translate module=product}
recurr_anual
{/translate}
{/if}
{if $key == "5" }
{translate module=product}
recurr_twoyear
{/translate}
{/if}
{if $key == "6" }
{translate module=product}
recurr_threeyear
{/translate}
{/if}
&nbsp;&nbsp; + &nbsp;
{$list->format_currency($price_recurr.setup,$smarty.const.SESS_CURRENCY)}
{translate module=product}setup{/translate}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
{else}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{translate module=product}
field_price_base
{/translate}
</b> </td>
<td width="50%"> <b>
{translate module=product}
field_price_setup
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
{$list->format_currency($price.base, $smarty.const.SESS_CURRENCY)}
</td>
<td width="50%">
{$list->format_currency($price.setup, $smarty.const.SESS_CURRENCY)}
</td>
</tr>
</table>
{/if}
{if $product.price_type == "2"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="76%">
{translate module=product sku=$trial.sku}
trial_desc
{/translate} <br>
{if $product.price_trial_length_type == "0"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_days
{/translate}
{/if}
{if $product.price_trial_length_type == "1"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_weeks
{/translate}
{/if}
{if $product.price_trial_length_type == "2"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_months
{/translate}
{/if}
<br>
{translate module=product sku2=$trial.sku}
trial_bill_desc
{/translate}
</td>
</tr>
</table>
{/if}
{if $attr}<br>
{foreach from=$attr item=attr_arr key=key}
{assign var=attr_id value=$attr_arr.id}
{if $attr_arr.type == "0"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="middle" class="row2">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
{if $attr_arr.description}
<tr valign="top">
<td width="96%">
&nbsp;&nbsp;
<input type="checkbox" name="attr[{$attr_id}]" value="Yes" {if $VAR.attr[$attr_id] || $attr_arr.default}checked{/if} >
&nbsp; {$attr_arr.description}
</td>
</tr>
{/if}
</table>
{elseif $attr_arr.type == "1"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="middle" class="row2">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
{if $attr_arr.description}
<tr valign="top">
<td width="96%">
&nbsp;&nbsp;
<input type="text" id="attr_{$attr_id}" name="attr[{$attr_id}]" size="20" >
&nbsp;{$attr_arr.description}
</td>
</tr>
{/if}
</table>
{elseif $attr_arr.type == "2"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="middle" class="row2">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<select id="attr_{$attr_id}" name="attr[{$attr_id}]" >
{foreach from=$attr_arr.default item=attr_menu key=attr_key}
<option value="{$attr_menu.name}">
{$attr_menu.name}
{if $attr_menu.base > 0}: {$list->format_currency_num($attr_menu.base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_menu.base > 0 && $attr_menu.setup > 0}
+
{elseif $attr_menu.base <= 0 && $attr_menu.setup > 0}:
{/if}
{if $attr_menu.setup > 0}
{$list->format_currency_num($attr_menu.setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</option>
{/foreach}
</select>
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{/if}
{/foreach}
{/if}
{if $product.host}
<br>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="middle" class="row2">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td width="70%" valign="middle"><b>
{translate module=product}
domain_options
{/translate}
</b></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
{if $product.host_allow_domain}
<input type="radio" id="register" name="domain_type" value="register" onclick="domainUpdate('0','0','register'); showIFrame('iframeDomain',500,100,'?_page=host_tld:iframe_register&_escape=1');">
{translate module=product}
domain_register
{/translate}
<br>
<input type="radio" id="transfer" name="domain_type" value="transfer" onclick="domainUpdate('0','0','transfer'); showIFrame('iframeDomain',500,100,'?_page=host_tld:iframe_transfer&_escape=1');">
{translate module=product}
domain_transfer
{/translate}
{/if}
<br>
<input type="radio" id="ns_transfer" name="domain_type" value="ns_transfer" onclick="domainUpdate('0','0','ns_transfer'); showIFrame('iframeDomain',500,70,'?_page=host_tld:iframe_ns_transfer&_escape=1');">
{translate module=product}
domain_ns_transfer
{/translate}
{if $product.host_allow_host_only}
<br>
<input type="radio" id="ip" name="domain_type" value="ip" onclick="domainUpdate('0','0','ip'); hideIFrame('iframeDomain');">
{translate module=product}
domain_ip
{/translate}
<br>
{/if}
<input type="hidden" id="domain_name" name="domain_name" value="0">
<input type="hidden" id="domain_tld" name="domain_tld" value="0">
<input type="hidden" id="domain_option" name="domain_option" value="0">
<iframe name="iframeDomain" id="iframeDomain" style="border:0px; width:100%; height:0px;" scrolling="no" width="100%" ALLOWTRANSPARENCY="false" frameborder="0" class="row1"><br></iframe>
</td>
</tr>
</table>
{/if}
{if $product.prod_plugin}
<tr valign="top">
<td align="left">
{plugin type=product name=$product.prod_plugin_file name_prefix=order_ data=$product.prod_plugin_data admin=true }
</td>
</tr>
{/if}
</form>
{literal}
<!-- Define the update delete function -->
<script language="JavaScript">
<!-- START
function domainUpdate(domain,tld,type)
{
document.getElementById("domain_name").value = domain;
document.getElementById("domain_tld").value = tld;
document.getElementById("domain_option").value = type;
}
function addCart(addtype)
{
var hosting = '{/literal}{$product.host}{literal}';
if (hosting == "1")
{
var domain_option =document.getElementById("domain_option").value;
var domain_name =document.getElementById("domain_name").value;
var domain_tld =document.getElementById("domain_tld").value;
if(domain_option == "0")
{
alert("{/literal}{translate module=product}host_domain_opt{/translate}{literal}");
return;
}
if(domain_name == "0" || domain_tld == "0")
{
if(domain_option != "ip")
{
alert("{/literal}{translate module=product}host_domain_inv{/translate}{literal}");
return;
}
}
}
attrValidate(addtype);
}
function attrValidate(addtype)
{
var val_arr = new Array(2);
var i=0;
{/literal} {foreach from=$attr item=attr_arr key=key} {assign var=attr_id value=$attr_arr.id}{if $attr_arr.required == "1"}
val_arr[i] = new Array ('attr_{$attr_id}','{$attr_arr.name}','{$attr_arr.type}');
i++;
{/if}{/foreach} {literal}
for(ii=0; ii < i; ii++)
{
if(!document.getElementById(val_arr[ii][0]).value)
{
document.getElementById(val_arr[ii][0]).focus();
if(val_arr[ii][2] == "1") {
alert("You must select an option for \""+val_arr[ii][1]+"\"");
} else {
alert("You must enter a value for the product option \""+val_arr[ii][1]+"\"")
}
return false;
}
}
// product plugin validation:
var val_plugin=false;
try{ val_plugin = product_plugin_validate(); } catch(e) { val_plugin = true; }
if(val_plugin) doCart(addtype);
}
function doCart(addtype)
{
if(addtype == 'cart')
{
document.getElementById('page').value = 'cart:admin_view';
document.getElementById('product_view').action = '';
}
else if(addtype == 'checkout')
{
document.getElementById('page').value = 'checkout:checkout';
document.getElementById('product_view').action = '';
}
document.product_view.submit();
}
// END -->
</script>
{/literal}
{/if}

View File

@@ -0,0 +1,51 @@
{$method->exe_noauth("product_cat","user_menu")}
{if $product_cat != "" || $smarty.const.SHOW_DOMAIN_LINK }
{foreach from=$product_cat item=record}
<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%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td class="table_heading_cart"> <a href="{$URL}?_page=product_cat:t_{$record.template}&id={$record.id}">
<b>
{if $list->translate("product_cat_translate","name,description","product_cat_id", $record.id, "cat_translate") }
{$cat_translate.name}
{else}
{$record.name}
{/if}
</b> </a> </td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body">
<tr valign="top">
<td>
<p>
{if $record.thumbnail != "" }
<a href="{$URL}?_page=product_cat:t_{$record.template}&id={$record.id}"><img align="left" src="{$URL}{$smarty.const.URL_IMAGES}{$record.thumbnail}" hspace="5" border="0"></a>
{/if}
{if $cat_translate.description!= "" }
{$cat_translate.description}
{else}
No Description
{/if}
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
{/foreach}
{/if}

View File

@@ -0,0 +1,577 @@
{ $method->exe("product","details") } { if ($method->result == FALSE || !$product) } { $block->display("core:method_error") } {else}
{if $product}
<form id="product_view" name="product_view" method="post" action="">
<input type="hidden" id="page" name="_page" value="">
<input type="hidden" name="do[]" value="cart:add">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="s" value="{$SESS}">
{if $list->translate("product_translate","name,description_full", "product_id", $product.id, "translate_product")}
{/if}
<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%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart">
<tr valign="top">
<td width="78%" >
<p>
{if $list->translate("product_translate","name,description_short,description_full","product_id", $product.id, "prod_translate") }
{$prod_translate.name}
{else}
{$product.sku}
{/if}
</p>
</td>
<td width="22%" valign="middle" align="right"> <b> </b> </td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="body" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body">
<tr valign="top">
<td width="92%" align="left" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%">
{if $product.thumbnail != ""}
<img src="{$URL}{$smarty.const.URL_IMAGES}{$product.thumbnail}" hspace="5" border="0">
{/if}
{$translate_product.description_full}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="92%" align="left">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%"> <b>
{translate module=product}
field_sku
{/translate}
</b> </td>
<td width="50%"><b>
{translate}
currency
{/translate}
</b></td>
</tr>
<tr valign="top" class="body">
<td width="50%">
{$product.sku}
</td>
<td width="50%" valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="26%">
{literal}
<script language="JavaScript"> function CurrencyChange(obj) { document.location='?_page=product:details&id={/literal}{$VAR.id}{literal}&cyid='+obj.value; } </script>
{/literal}
{$list->currency_list("cyid_arr")}
<select name="cyid" 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="74%"> <img src="themes/{$THEME_NAME}/images/currency/{$currency_thumbnail}.gif" border="0">
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%"> <b>
{translate module=product}
field_price_type
{/translate}
</b><br>
</td>
<td width="50%"> <b>
{translate module=product}
field_taxable
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
{if $product.price_type == "0"}
{translate module=product}
price_type_one
{/translate}
{/if}
{if $product.price_type == "1"}
{translate module=product}
price_type_recurr
{/translate}
{/if}
{if $product.price_type == "2"}
{translate module=product}
price_type_trial
{/translate}
{/if}
</td>
<td width="50%">
{if $product.taxable}
{translate}
true
{/translate}
{else}
{translate}
false
{/translate}
{/if}
</td>
</tr>
</table>
{if $product.price_type == "1" }
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%"><b>
{translate module=product}
field_price_recurr_type
{/translate}
</b></td>
</tr>
<tr valign="top" class="body">
<td width="50%">
<select name="recurr_schedule" >
{foreach from=$price item=price_recurr key=key}
<option value="{$key}" {if $product.price_recurr_default == $key} selected{/if}>
{$list->format_currency_num($price_recurr.base,$smarty.const.SESS_CURRENCY)}
&nbsp;
{if $key == "0" }
{translate module=product}
recurr_week
{/translate}
{/if}
{if $key == "1" }
{translate module=product}
recurr_month
{/translate}
{/if}
{if $key == "2" }
{translate module=product}
recurr_quarter
{/translate}
{/if}
{if $key == "3" }
{translate module=product}
recurr_semianual
{/translate}
{/if}
{if $key == "4" }
{translate module=product}
recurr_anual
{/translate}
{/if}
{if $key == "5" }
{translate module=product}
recurr_twoyear
{/translate}
{/if}
{if $key == "6" }
{translate module=product}
recurr_threeyear
{/translate}
{/if}
{if $price_recurr.setup > 0}
&nbsp; + &nbsp;
{$list->format_currency_num($price_recurr.setup,$smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
{else}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%"> <b>
{translate module=product}
field_price_base
{/translate}
</b> </td>
<td width="50%"> <b>
{translate module=product}
field_price_setup
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
{$list->format_currency($price.base, $smarty.const.SESS_CURRENCY)}
</td>
<td width="50%">
{$list->format_currency($price.setup, $smarty.const.SESS_CURRENCY)}
</td>
</tr>
</table>
{/if}
{if $product.price_type == "2"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top">
<td width="76%">
{translate module=product sku=$trial.sku}
trial_desc
{/translate}
<a href="?_page=product:details&id={$product.price_trial_prod}">
{translate}
view
{/translate}
</a><br>
{if $product.price_trial_length_type == "0"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_days
{/translate}
{/if}
{if $product.price_trial_length_type == "1"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_weeks
{/translate}
{/if}
{if $product.price_trial_length_type == "2"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_months
{/translate}
{/if}
<br>
{translate module=product sku2=$trial.sku}
trial_bill_desc
{/translate}
</td>
</tr>
</table>
{/if}
{if $attr}
<br>
{foreach from=$attr item=attr_arr key=key}
{assign var=attr_id value=$attr_arr.id}
{if $attr_arr.type == "0"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency_num($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency_num($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<input type="checkbox" name="attr[{$attr_id}]" value="Yes" {if $VAR.attr[$attr_id] || $attr_arr.default}checked{/if} >
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{elseif $attr_arr.type == "1"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency_num($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency_num($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<input type="text" id="attr_{$attr_id}" name="attr[{$attr_id}]" size="20" >
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{elseif $attr_arr.type == "3"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency_num($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency_num($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<textarea id="attr_{$attr_id}" name="attr[{$attr_id}]2" cols="50" rows="3"></textarea>
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{elseif $attr_arr.type == "2"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<select id="attr_{$attr_id}" name="attr[{$attr_id}]" >
{foreach from=$attr_arr.default item=attr_menu key=attr_key}
<option value="{$attr_menu.name}">
{$attr_menu.name}
{if $attr_menu.base > 0}: {$list->format_currency_num($attr_menu.base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_menu.base > 0 && $attr_menu.setup > 0}
+
{elseif $attr_menu.base <= 0 && $attr_menu.setup > 0}:
{/if}
{if $attr_menu.setup > 0}
{$list->format_currency_num($attr_menu.setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</option>
{/foreach}
</select>
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{/if}
{/foreach}
{/if}
{if $product.host}
<br>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{translate module=product}
domain_options
{/translate}
</b></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
{if $product.host_allow_domain}
<input type="radio" id="register" name="domain_type" value="register" onClick="domainUpdate('0','0','register'); showIFrame('iframeDomainDetails',480,95,'?_page=host_tld:iframe_register&_escape=1');">
{translate module=product}
domain_register
{/translate}
<br>
<input type="radio" id="transfer" name="domain_type" value="transfer" onClick="domainUpdate('0','0','transfer'); showIFrame('iframeDomainDetails',480,110,'?_page=host_tld:iframe_transfer&_escape=1');">
{translate module=product}
domain_transfer
{/translate}
{/if}
<br>
<input type="radio" id="ns_transfer" name="domain_type" value="ns_transfer" onClick="domainUpdate('0','0','ns_transfer'); showIFrame('iframeDomainDetails',480,70,'?_page=host_tld:iframe_ns_transfer&_escape=1');">
{translate module=product}
domain_ns_transfer
{/translate}
{if $product.host_allow_host_only}
<br>
<input type="radio" id="ip" name="domain_type" value="ip" onClick="domainUpdate('0','0','ip'); hideIFrame('iframeDomainDetails');">
{translate module=product}
domain_ip
{/translate}
<br>
{/if}
<input type="hidden" id="domain_name" name="domain_name" value="0">
<input type="hidden" id="domain_tld" name="domain_tld" value="0">
<input type="hidden" id="domain_option" name="domain_option" value="0">
<iframe name="iframeDomainDetails" id="iframeDomainDetails" style="border:0px; width:100%; height:0px;" scrolling="no" width="100%" allowtransparency="false" frameborder="0" class="body" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"><br></iframe>
</td>
</tr>
</table>
{/if}
{literal}
<!-- Define the update delete function -->
<script language="JavaScript">
<!-- START
function domainUpdate(domain,tld,type)
{
document.getElementById("domain_name").value = domain;
document.getElementById("domain_tld").value = tld;
document.getElementById("domain_option").value = type;
}
function addCart(addtype)
{
var hosting = '{/literal}{$product.host}{literal}';
if (hosting == "1")
{
var domain_option=document.getElementById("domain_option").value;
var domain_name =document.getElementById("domain_name").value;
var domain_tld =document.getElementById("domain_tld").value;
if(domain_option == "0")
{
alert("{/literal}{translate module=product}host_domain_opt{/translate}{literal}");
return;
}
if(domain_name == "0" || domain_tld == "0")
{
if(domain_option != "ip")
{
alert("{/literal}{translate module=product}host_domain_inv{/translate}{literal}");
return;
}
}
}
attrValidate(addtype);
}
function attrValidate(addtype)
{
var val_arr = new Array(2);
var i=0;
{/literal} {foreach from=$attr item=attr_arr key=key} {assign var=attr_id value=$attr_arr.id}{if $attr_arr.required == "1"}
val_arr[i] = new Array ('attr_{$attr_id}','{$attr_arr.name}','{$attr_arr.type}');
i++;
{/if}{/foreach} {literal}
for(ii=0; ii < i; ii++)
{
if(!document.getElementById(val_arr[ii][0]).value)
{
document.getElementById(val_arr[ii][0]).focus();
if(val_arr[ii][2] == "1") {
alert("You must select an option for \""+val_arr[ii][1]+"\"");
} else {
alert("You must enter a value for the product option \""+val_arr[ii][1]+"\"")
}
return false;
}
}
// product plugin validation:
var val_plugin=false;
try{ val_plugin = product_plugin_validate(); } catch(e) { val_plugin = true; }
if(val_plugin) doCart(addtype);
}
function doCart(addtype)
{
if(addtype == 'cart')
{
document.getElementById('page').value = 'cart:cart';
document.getElementById('product_view').action = '{/literal}{$URL}{literal}';
}
else if(addtype == 'checkout')
{
document.getElementById('page').value = 'checkout:checkout';
document.getElementById('product_view').action = '{/literal}{$SSL_URL}{literal}';
}
document.product_view.submit();
}
// END -->
</script>
{/literal}
{/if}
</td>
</tr>
{if $product.cart_multiple}
<tr valign="top">
<td align="left"><strong>Quantity:</strong> <input name="quantity" type="text" id="quantity" value="1" size="3" maxlength="3"></td>
</tr>
{/if}
{if $product.prod_plugin}
<tr valign="top">
<td align="left">
{plugin type=product name=$product.prod_plugin_file name_prefix=order_ data=$product.prod_plugin_data }
</td>
</tr>
{/if}
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</form>
<p align="center">
<input type="submit" onClick="addCart('cart')" name="cart2" value="{translate module=product}cart{/translate}" class="form_button">
<input type="submit" onClick="addCart('checkout')" name="checkout2" value="{translate module=product}checkout{/translate}" class="form_button">
</p>
{/if}

View File

@@ -0,0 +1,549 @@
{ $method->exe("product","details") } { if ($method->result == FALSE || !$product) } { $block->display("core:method_error") } {else}
{if $product}
<form id="product_view" name="product_view" method="post" action="">
<input type="hidden" id="page" name="_page" value="">
<input type="hidden" name="do[]" value="cart:add">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="s" value="{$SESS}">
{if $list->translate("product_translate","name,description_full", "product_id", $product.id, "translate_product")}
{/if}
<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%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart">
<tr valign="top">
<td width="78%" >
<p>
{if $list->translate("product_translate","name,description_short,description_full","product_id", $product.id, "prod_translate") }
{$prod_translate.name},
{translate module=product} field_sku {/translate} "<u>{$product.sku}</u>"
{else}
{$product.sku}
{/if}
</p>
</td>
<td width="22%" valign="middle" align="right"> <b> </b> </td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="body">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body" bgcolor="#FFFFFF">
<tr valign="top">
<td width="92%" align="left">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%">
{if $product.thumbnail != ""}
<img src="{$URL}{$smarty.const.URL_IMAGES}{$product.thumbnail}" hspace="5" border="0">
{/if}
{$translate_product.description_full}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="92%" align="left">
{if $product.price_type == "1" }
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%"><b>
{translate module=product}
field_price_recurr_type
{/translate}
</b></td>
</tr>
<tr valign="top" class="body">
<td width="50%">
<select name="recurr_schedule" >
{foreach from=$price item=price_recurr key=key}
<option value="{$key}" {if $product.price_recurr_default == $key} selected{/if}>
{$list->format_currency_num($price_recurr.base,$smarty.const.SESS_CURRENCY)}
&nbsp;
{if $key == "0" }
{translate module=product}
recurr_week
{/translate}
{/if}
{if $key == "1" }
{translate module=product}
recurr_month
{/translate}
{/if}
{if $key == "2" }
{translate module=product}
recurr_quarter
{/translate}
{/if}
{if $key == "3" }
{translate module=product}
recurr_semianual
{/translate}
{/if}
{if $key == "4" }
{translate module=product}
recurr_anual
{/translate}
{/if}
{if $key == "5" }
{translate module=product}
recurr_twoyear
{/translate}
{/if}
{if $key == "6" }
{translate module=product}
recurr_threeyear
{/translate}
{/if}
{if $price_recurr.setup > 0}
&nbsp; + &nbsp;
{$list->format_currency_num($price_recurr.setup,$smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
{else}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%"> <b>
{translate module=product}
field_price_base
{/translate}
</b> </td>
<td width="50%"> <b>
{translate module=product}
field_price_setup
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
{$list->format_currency($price.base, $smarty.const.SESS_CURRENCY)}
</td>
<td width="50%">
{$list->format_currency($price.setup, $smarty.const.SESS_CURRENCY)}
</td>
</tr>
</table>
{/if}
{if $product.price_type == "2"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top">
<td width="76%">
{translate module=product sku=$trial.sku}
trial_desc
{/translate}
<a href="?_page=product:details&id={$product.price_trial_prod}">
{translate}
view
{/translate}
</a><br>
{if $product.price_trial_length_type == "0"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_days
{/translate}
{/if}
{if $product.price_trial_length_type == "1"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_weeks
{/translate}
{/if}
{if $product.price_trial_length_type == "2"}
{translate module=product sku1=$trial.sku length=$product.price_trial_length}
trial_length_months
{/translate}
{/if}
<br>
{translate module=product sku2=$trial.sku}
trial_bill_desc
{/translate}
</td>
</tr>
</table>
{/if}
{if $attr}
<br>
{foreach from=$attr item=attr_arr key=key}
{assign var=attr_id value=$attr_arr.id}
{if $attr_arr.type == "0"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency_num($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency_num($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<input type="checkbox" name="attr[{$attr_id}]" value="Yes" {if $VAR.attr[$attr_id] || $attr_arr.default}checked{/if} >
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{elseif $attr_arr.type == "1"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency_num($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency_num($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<input type="text" id="attr_{$attr_id}" name="attr[{$attr_id}]" size="20" >
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{elseif $attr_arr.type == "3"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right">
{if $attr_arr.price_base != 0}
{$list->format_currency_num($attr_arr.price_base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_arr.price_setup != 0}
{if $attr_arr.price_base != 0}
+
{/if}
{$list->format_currency_num($attr_arr.price_setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<textarea id="attr_{$attr_id}" name="attr[{$attr_id}]2" cols="50" rows="3"></textarea>
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{elseif $attr_arr.type == "2"}
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{$attr_arr.name}
</b></td>
<td width="30%" valign="middle" align="right"> </td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
<select id="attr_{$attr_id}" name="attr[{$attr_id}]" >
{foreach from=$attr_arr.default item=attr_menu key=attr_key}
<option value="{$attr_menu.name}">
{$attr_menu.name}
{if $attr_menu.base > 0}
:
{$list->format_currency_num($attr_menu.base, $smarty.const.SESS_CURRENCY)}
{/if}
{if $attr_menu.base > 0 && $attr_menu.setup > 0}
+
{elseif $attr_menu.base <= 0 && $attr_menu.setup > 0}
:
{/if}
{if $attr_menu.setup > 0}
{$list->format_currency_num($attr_menu.setup, $smarty.const.SESS_CURRENCY)}
{translate module=product}
setup
{/translate}
{/if}
</option>
{/foreach}
</select>
&nbsp;
{$attr_arr.description}
</td>
</tr>
</table>
{/if}
{/foreach}
{/if}
{if $product.host}
<br>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="middle" class="body">
<td width="96%"> <b> </b>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="70%" valign="middle"><b>
{translate module=product}
domain_options
{/translate}
</b></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="96%">
{if $product.host_allow_domain}
<input type="radio" id="register" name="domain_type" value="register" onClick="domainUpdate('0','0','register'); showIFrame('iframeDomainDetails',480,95,'?_page=host_tld:iframe_register&_escape=1');">
{translate module=product}
domain_register
{/translate}
<br>
<input type="radio" id="transfer" name="domain_type" value="transfer" onClick="domainUpdate('0','0','transfer'); showIFrame('iframeDomainDetails',480,110,'?_page=host_tld:iframe_transfer&_escape=1');">
{translate module=product}
domain_transfer
{/translate}
{/if}
<br>
<input type="radio" id="ns_transfer" name="domain_type" value="ns_transfer" onClick="domainUpdate('0','0','ns_transfer'); showIFrame('iframeDomainDetails',480,70,'?_page=host_tld:iframe_ns_transfer&_escape=1');">
{translate module=product}
domain_ns_transfer
{/translate}
{if $product.host_allow_host_only}
<br>
<input type="radio" id="ip" name="domain_type" value="ip" onClick="domainUpdate('0','0','ip'); hideIFrame('iframeDomainDetails');">
{translate module=product}
domain_ip
{/translate}
<br>
{/if}
<input type="hidden" id="domain_name" name="domain_name" value="0">
<input type="hidden" id="domain_tld" name="domain_tld" value="0">
<input type="hidden" id="domain_option" name="domain_option" value="0">
<iframe name="iframeDomainDetails" id="iframeDomainDetails" style="border:0px; width:100%; height:0px;" scrolling="no" width="100%" allowtransparency="true" frameborder="0" class="body" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"><br>
</iframe> </td>
</tr>
</table>
{/if}
{literal}
<!-- Define the update delete function -->
<script language="JavaScript">
<!-- START
function domainUpdate(domain,tld,type)
{
document.getElementById("domain_name").value = domain;
document.getElementById("domain_tld").value = tld;
document.getElementById("domain_option").value = type;
}
function addCart(addtype)
{
var hosting = '{/literal}{$product.host}{literal}';
if(addtype == 'register') {
document.getElementById('login').style.display='none';
document.getElementById('input_login').name = 'xxx';
} else if (addtype == 'login') {
document.getElementById('login').style.display='block';
document.getElementById('input_login').name = '_login';
} else {
document.getElementById('login').style.display='none';
document.getElementById('input_login').name = 'xxx';
}
if (hosting == "1")
{
var domain_option =document.getElementById("domain_option").value;
var domain_name =document.getElementById("domain_name").value;
var domain_tld =document.getElementById("domain_tld").value;
if(domain_option == "0")
{
alert("{/literal}{translate module=product}host_domain_opt{/translate}{literal}");
return;
}
if(domain_name == "0" || domain_tld == "0")
{
if(domain_option != "ip")
{
alert("{/literal}{translate module=product}host_domain_inv{/translate}{literal}");
return;
}
}
}
attrValidate(addtype);
}
function attrValidate(addtype)
{
var val_arr = new Array(2);
var i=0;
{/literal} {foreach from=$attr item=attr_arr key=key} {assign var=attr_id value=$attr_arr.id}{if $attr_arr.required == "1"}
val_arr[i] = new Array ('attr_{$attr_id}','{$attr_arr.name}','{$attr_arr.type}');
i++;
{/if}{/foreach} {literal}
for(ii=0; ii < i; ii++)
{
if(!document.getElementById(val_arr[ii][0]).value)
{
document.getElementById(val_arr[ii][0]).focus();
if(val_arr[ii][2] == "1") {
alert("You must select an option for \""+val_arr[ii][1]+"\"");
} else {
alert("You must enter a value for the product option \""+val_arr[ii][1]+"\"")
}
return false;
}
}
doCart(addtype);
}
function doCart(addtype)
{
if(addtype == 'checkout')
{
document.getElementById('page').value = 'checkout:checkout';
document.getElementById('product_view').action = '{/literal}{$SSL_URL}{literal}';
}
else if(addtype == 'login')
{
document.getElementById('page').value = 'checkout:checkout';
document.getElementById('product_view').action = '{/literal}{$SSL_URL}{literal}';
if(document.getElementById('wiz_username').value == '') return;
if(document.getElementById('wiz_password').value == '') return;
}
else if(addtype == 'register')
{
document.getElementById('page').value = 'checkout:checkout';
document.getElementById('product_view').action = '{/literal}{$SSL_URL}{literal}';
}
document.product_view.submit();
}
// END -->
</script>
{/literal}
{/if}
</td>
</tr>
<tr valign="top">
<td width="92%" align="left">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="50%"><b> {translate module=product}wizard_finalize_purchase{/translate}</b></td>
</tr>
<tr valign="top" class="body">
<td width="50%">
{if $smarty.const.SESS_LOGGED != 1}
<input type="radio" id="checkout1" name="checkout" value="login" onclick="addCart('login'); document.getElementById('checkout1').checked = false;">
<a href="javascript:addCart('login');;">
{translate module=product}
wizard_checkout_login
{/translate}
</a><br>
<input type="radio" id="checkout2" name="checkout" value="register" onclick="addCart('register'); document.getElementById('checkout2').checked = false;">
<a href="javascript:addCart('register');">
{translate module=product}
wizard_checkout_register
{/translate}
</a> <br>
{else}
<input type="radio" id="checkout" name="checkout" value="register" onclick="addCart('checkout'); document.getElementById('checkout').checked = false;">
<a href="javascript:addCart('checkout');">{translate
module=product}wizard_checkout{/translate}</a>
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="92%" align="left">
<div id="login" style="display:none">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td width="15%">
{translate}
username
{/translate}
</td>
<td width="85%">
<input type="text" id="wiz_username" name="_username" />
</td>
</tr>
<tr valign="top" class="body">
<td width="15%">
{translate}
password
{/translate}
</td>
<td width="85%">
<input type="password" id="wiz_password" name="_password" />
</td>
</tr>
<tr valign="top" class="body">
<td width="15%">
<input type="hidden" id="input_login" name="_login" value="1">
</td>
<td width="85%"><a href="javascript:addCart('login');"><b><u>{translate module=product}wizard_login{/translate}</u></b></a></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<iframe name="iframeCart" id="iframeCart" style="border:0px; width:100%; height:0px;" scrolling="no" width="100%" allowtransparency="true" frameborder="0" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
</form>
{/if}

View File

@@ -0,0 +1,197 @@
{ $block->display("core:top_clean") }
{ $method->exe("product","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
<!-- Loop through each record -->
{foreach from=$product item=product}
<form name="product_view" 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="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td>
<table width="100%" border="0" cellspacing="2" cellpadding="3" class="row1">
<tr>
<td width="98%" valign="top"> <b> </b>
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr>
<td>
{translate module=product}
field_assoc_req_prod
{/translate}
</td>
</tr>
<tr>
<td><b> </b></td>
</tr>
<tr>
<td>
<input type="radio" name="product_assoc_req_prod_type" value="0" {if $product.assoc_req_prod_type == "0"}checked{/if}>
{translate module=product}
assoc_req_all
{/translate}
<br>
<input type="radio" name="product_assoc_req_prod_type" value="1" {if $product.assoc_req_prod_type == "1"}checked{/if}>
{translate module=product}
assoc_req_one
{/translate}
</td>
</tr>
</table>
<b> </b> </td>
<td width="2%" align="right" valign="top">
{ $list->menu_multi($product.assoc_req_prod, "product_assoc_req_prod", "product", "sku", "10", "", "form_menu") }
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="3" class="row1">
<tr class="row2">
<td width="99%" valign="top">
{translate module=product}
field_assoc_grant_prod
{/translate}
</td>
<td width="1%" align="right">
{ $list->menu_multi($product.assoc_grant_prod, "product_assoc_grant_prod", "product", "sku", "10", "", "form_menu") }
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="3" class="row1">
<tr>
<td width="98%" valign="top"> <b> </b>
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr>
<td>
{translate module=product}
field_assoc_grant_group
{/translate}
</td>
</tr>
<tr>
<td><b> </b></td>
</tr>
<tr>
<td>
<p>
<input type="radio" name="product_assoc_grant_group_type" value="0" {if $product.assoc_grant_group_type == "0"}checked{/if}>
{translate module=product}
assoc_group_limited
{/translate}
<input type="text" name="product_assoc_grant_group_days" value="{$product.assoc_grant_group_days}" size="3">
<br>
<input type="radio" name="product_assoc_grant_group_type" value="1" {if $product.assoc_grant_group_type == "1"}checked{/if}>
{translate module=product}
assoc_group_subscription
{/translate}
<br>
<input type="radio" name="product_assoc_grant_group_type" value="2" {if $product.assoc_grant_group_type == "2"}checked{/if}>
{translate module=product}
assoc_group_forever
{/translate}
</p>
</td>
</tr>
</table>
</td>
<td width="2%" align="left" valign="top">
{ $list->menu_multi($product.assoc_grant_group, "product_assoc_grant_group", "group", "name", "10", "", "form_menu") }
</td>
</tr>
</table>
</td>
</tr>
{if $product.price_type == "1"}
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="3" class="row1">
<tr>
<td width="96%" valign="top"> <b> </b>
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr>
<td>
{translate module=product}
field_price_recurr_modify
{/translate}
{ $list->bool("product_price_recurr_modify", $product.price_recurr_modify, "\" onChange=\"document.forms.product_view.submit()\"") }
</td>
</tr>
<tr>
<td><b>
</b></td>
</tr>
<tr>
<td>
<!--
{translate module=product}
field_modify_waive_setup
{/translate}
{ $list->bool("product_modify_waive_setup", $product.modify_waive_setup, "form_menu") }
-->
</td>
</tr>
</table>
</td>
<td width="4%" align="left" valign="top">
{if $product.host == 1}
{html_menu_product_host name="product_modify_product_arr" default=$product.modify_product_arr exclude=$product.id}
{else}
{html_menu_product_subscription name="product_modify_product_arr" default=$product.modify_product_arr exclude=$product.id}
{/if}
</td>
</tr>
</table>
</td>
</tr>
{/if}
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td valign="middle" align="right">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="do[]" value="product:update">
<input type="hidden" name="_page" value="product:iframe_associations">
<input type="hidden" name="_page_current" value="product:iframe_associations">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="id" value="{$product.id}">
<input type="hidden" name="product_price_base" value="{$product.price_base}">
<input type="hidden" name="product_sku" value="{$product.sku}">
<input type="hidden" name="product_avail_category_id" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_price_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_discount_tld" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_provision_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_prod_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_group_avail" value="IGNORE-ARRAY-VALUE">
</form>
{/foreach}{/if}

View File

@@ -0,0 +1,42 @@
{ $block->display("core:top_clean") }
{ $method->exe("product","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
<!-- Loop through each record -->
{foreach from=$product item=product}
<form name="product_view" 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="4">
<tr valign="top">
<td width="65%" class="row1"><b>
{translate module=product}
field_sku
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<input type="text" name="product_sku" value="{$VAR.product_sku}" {if $product_sku == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="do[]" value="product:cloner">
<input type="hidden" name="_page" value="product:iframe_clone">
<input type="hidden" name="_page_current" value="product:iframe_clone">
<input type="hidden" name="id" value="{$product.id}">
</form>
{/foreach}{/if}

View File

@@ -0,0 +1,80 @@
{ $block->display("core:top_clean") }
{ $method->exe("product","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
<!-- Loop through each record -->
{foreach from=$product item=product}
<form name="product_view" 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="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr>
<td>
{translate module=product}
field_discount
{/translate}
</td>
</tr>
<tr>
<td>
{ $list->bool("product_discount", $product.discount, "form_menu") }
</td>
</tr>
<tr>
<td>
{translate module=product}
field_discount_amount
{/translate}
</td>
</tr>
<tr>
<td>
<input type="text" name="product_discount_amount" value="{$product.discount_amount}" size="9">
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td valign="middle" align="right">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="do[]" value="product:update">
<input type="hidden" name="_page" value="product:iframe_discounts">
<input type="hidden" name="_page_current" value="product:iframe_discounts">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="id" value="{$product.id}">
<input type="hidden" name="product_price_base" value="{$product.price_base}">
<input type="hidden" name="product_sku" value="{$product.sku}">
<input type="hidden" name="product_avail_category_id" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_req_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_price_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_discount_tld" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_provision_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_prod_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_group_avail" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_modify_product_arr" value="IGNORE-ARRAY-VALUE">
</form>
{/foreach}
{/if}

View File

@@ -0,0 +1,148 @@
{ $block->display("core:top_clean") }
{ $method->exe("product","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
<!-- Loop through each record -->
{foreach from=$product item=product}
{if $product.prod_plugin == "1"}
Both hosting and product plugins cannot be configured for the same product.
{else}
<form name="product_view" 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="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr>
<td width="55%">
{translate module=product}
field_host
{/translate}
</td>
<td width="45%">
{ $list->bool("product_host", $product.host, "onchange=\"submit();\"") }
</td>
</tr>
<tr>
<td width="55%">
{translate module=product}
field_host_server_id
{/translate}
</td>
<td width="45%">
{ $list->menu("no", "product_host_server_id", "host_server", "name", $product.host_server_id, "\" onchange=\"document.product_view.submit();") }
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<b><table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr>
<td width="55%">
{translate module=product}
field_host_allow_domain
{/translate}
</td>
<td width="45%">
{if $product.host_allow_domain == ""}
{ $list->bool("product_host_allow_domain", "1", "form_menu") }
{else}
{ $list->bool("product_host_allow_domain", $product.host_allow_domain, "form_menu") }
{/if}
</td>
</tr>
<tr>
<td width="55%">
{translate module=product}
field_host_allow_host_only
{/translate}
</td>
<td width="45%">
{if $product.host_allow_host_only != ""}
{ $list->bool("product_host_allow_host_only", $product.host_allow_host_only, "form_menu") }
{else}
{ $list->bool("product_host_allow_host_only", "0", "form_menu") }
{/if}
</td>
</tr>
</table>
</b></td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr>
<td width="55%">
{translate module=product}
field_host_discount_tld
{/translate}
</td>
<td width="45%">
{translate module=product}
field_host_discount_tld_amount
{/translate}
</td>
</tr>
<tr>
<td width="55%"><b>
{ $list->menu_multi($product.host_discount_tld, "product_host_discount_tld", "host_tld", "name", "5", "5", "form_menu") }
</b></td>
<td width="45%">
<input type="text" name="product_host_discount_tld_amt" value="{$product.host_discount_tld_amt}" size="4">
(example: 0.10 = 10%)</td>
</tr>
</table>
</td>
</tr>
{ if ($list->smarty_array("host_server","provision_plugin", "", "plugin")) } {foreach from=$plugin item=arr} {if $product.host_server_id == $arr.id}
<tr valign="top">
<td width="65%" class="row1">
{assign var="afile" value=$arr.provision_plugin}
{assign var="ablock" value="host_provision_plugin:plugin_prod_"}
{assign var="blockfile" value="$ablock$afile"}
{ $block->display($blockfile) }
</td>
</tr>
{/if} {/foreach} {/if}
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td valign="middle" align="right">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="do[]" value="product:update">
<input type="hidden" name="_page" value="product:iframe_hosting">
<input type="hidden" name="_page_current" value="product:iframe_hosting">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="id" value="{$product.id}">
<input type="hidden" name="product_price_base" value="{$product.price_base}">
<input type="hidden" name="product_sku" value="{$product.sku}">
<input type="hidden" name="product_avail_category_id" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_req_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_price_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_prod_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_group_avail" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_modify_product_arr" value="IGNORE-ARRAY-VALUE">
</form>
{/if}
{/foreach}
{/if}

View File

@@ -0,0 +1,83 @@
{ $block->display("core:top_clean") }
{ $method->exe("product","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
<!-- Loop through each record -->
{foreach from=$product item=product}
{if $product.host == "1"}
Both hosting and product plugins cannot be configured for the same product.
{else}
<form name="product_view" 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="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr>
<td width="55%"> Enable Product Plugins?</td>
<td width="45%">
{ $list->bool("product_prod_plugin", $product.prod_plugin, "onchange=\"submit();\"") }
</td>
</tr>
<tr>
<td width="55%"> Plugin to Enable</td>
<td width="45%">
{ $list->menu_files("", "product_prod_plugin_file", $product.prod_plugin_file, "product", "", ".php", "\" onchange=\"document.product_view.submit();") }
</td>
</tr>
</table>
</td>
</tr>
{ if $product.prod_plugin_file != ""}
<tr valign="top">
<td width="65%" class="row1">
{assign var="afile" value=$product.prod_plugin_file}
{assign var="ablock" value="product_plugin:plugin_prod_"}
{assign var="blockfile" value="$ablock$afile"}
{ $block->display($blockfile) }
</td>
</tr>
{/if}
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td valign="middle" align="right">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="do[]" value="product:update">
<input type="hidden" name="_page" value="product:iframe_plugins">
<input type="hidden" name="_page_current" value="product:iframe_plugins">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="id" value="{$product.id}">
<input type="hidden" name="product_price_base" value="{$product.price_base}">
<input type="hidden" name="product_sku" value="{$product.sku}">
<input type="hidden" name="product_avail_category_id" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_req_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_price_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_price_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_discount_tld" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_provision_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_group_avail" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_modify_product_arr" value="IGNORE-ARRAY-VALUE">
</form>
{/if}
{/foreach}
{/if}

View File

@@ -0,0 +1,101 @@
{ $block->display("core:top_clean") }
{ $method->exe("product","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
<!-- Loop through each record -->
{foreach from=$product item=product}
<form name="product_view" 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="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td>
<div align="center">
{translate module=product_attr}
field_price_group
{/translate}
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td>
{$list->unserial($product.price_group, "attr_group_array")}
{$attr_group_array[$arr.id].price_base}
{ if ($list->smarty_array("group","name"," AND pricing='1' ", "group_array")) }
{foreach from=$group_array item=arr}
{assign var="idx" value=$arr.id}
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row1">
<tr>
<td width="150"> <b>
{$arr.name}
</b> </td>
<td width="187">
{translate module=product_attr}
field_price_base
{/translate}
<input type="text" name="product_price_group[{$arr.id}][price_base]" value="{$attr_group_array[$idx].price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="153">
{translate module=product_attr}
field_price_setup
{/translate}
<input type="text" name="product_price_group[{$arr.id}][price_setup]" value="{$attr_group_array[$idx].price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td valign="middle" align="right">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="do[]" value="product:update">
<input type="hidden" name="_page" value="product:iframe_price_onetime">
<input type="hidden" name="_page_current" value="product:iframe_price_onetime">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="id" value="{$product.id}">
<input type="hidden" name="product_price_base" value="{$product.price_base}">
<input type="hidden" name="product_sku" value="{$product.sku}">
<input type="hidden" name="product_avail_category_id" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_req_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_discount_tld" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_provision_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_prod_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_group_avail" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_modify_product_arr" value="IGNORE-ARRAY-VALUE">
</form>
{/foreach}{/if}

View File

@@ -0,0 +1,345 @@
{ $block->display("core:top_clean") }
{ $method->exe("product","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
<!-- Loop through each record -->
{foreach from=$product item=product}
{$list->unserial($product.price_group, "attr_group_array")}
<form name="product_view" 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="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td>
<div align="center">
{translate module=product}
field_price_group
{/translate}
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td>
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="row2">
<tr>
<td width="150">
{translate module=product}
weekly
{/translate}
&nbsp;&nbsp;
{ $list->bool("product_price_group[0][show]", $attr_group_array[0].show, "form_menu") }
</td>
</tr>
</table>
{ if ($list->smarty_array("group","name"," AND pricing='1' ", "group_array")) }
{foreach from=$group_array item=arr}
{assign var="idx" value=$arr.id}
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="row1">
<tr>
<td width="40%">
{$arr.name}
</td>
<td width="30%">
{translate module=product}
field_price_base
{/translate}
<input type="text" name="product_price_group[0][{$arr.id}][price_base]" value="{$attr_group_array[0][$idx].price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="30%">
{translate module=product}
field_price_setup
{/translate}
<input type="text" name="product_price_group[0][{$arr.id}][price_setup]" value="{$attr_group_array[0][$idx].price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="row2">
<tr>
<td width="150">
{translate module=product}
monthly
{/translate}
&nbsp;&nbsp;
{ $list->bool("product_price_group[1][show]", $attr_group_array[1].show, "form_menu") }
</td>
</tr>
</table>
{foreach from=$group_array item=arr}
{assign var="idx" value=$arr.id}
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="row1">
<tr>
<td width="40%">
{$arr.name}
</td>
<td width="30%">
{translate module=product}
field_price_base
{/translate}
<input type="text" name="product_price_group[1][{$arr.id}][price_base]" value="{$attr_group_array[1][$idx].price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="30%">
{translate module=product}
field_price_setup
{/translate}
<input type="text" name="product_price_group[1][{$arr.id}][price_setup]" value="{$attr_group_array[1][$idx].price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
{/foreach}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="row2">
<tr>
<td width="150">
{translate module=product}
quarterly
{/translate}
&nbsp;&nbsp;
{ $list->bool("product_price_group[2][show]", $attr_group_array[2].show, "form_menu") }
</td>
</tr>
</table>
{foreach from=$group_array item=arr}
{assign var="idx" value=$arr.id}
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="row1">
<tr>
<td width="40%">
{$arr.name}
</td>
<td width="30%">
{translate module=product}
field_price_base
{/translate}
<input type="text" name="product_price_group[2][{$arr.id}][price_base]" value="{$attr_group_array[2][$idx].price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="30%">
{translate module=product}
field_price_setup
{/translate}
<input type="text" name="product_price_group[2][{$arr.id}][price_setup]" value="{$attr_group_array[2][$idx].price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
{/foreach}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="row2">
<tr>
<td width="150">
{translate module=product}
semianually
{/translate}
&nbsp;&nbsp;
{ $list->bool("product_price_group[3][show]", $attr_group_array[3].show, "form_menu") }
</td>
</tr>
</table>
{foreach from=$group_array item=arr}
{assign var="idx" value=$arr.id}
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="row1">
<tr>
<td width="40%">
{$arr.name}
</td>
<td width="30%">
{translate module=product}
field_price_base
{/translate}
<input type="text" name="product_price_group[3][{$arr.id}][price_base]" value="{$attr_group_array[3][$idx].price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="30%">
{translate module=product}
field_price_setup
{/translate}
<input type="text" name="product_price_group[3][{$arr.id}][price_setup]" value="{$attr_group_array[3][$idx].price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
{/foreach}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="row2">
<tr>
<td width="150">
{translate module=product}
anually
{/translate}
&nbsp;&nbsp;
{ $list->bool("product_price_group[4][show]", $attr_group_array[4].show, "form_menu") }
</td>
</tr>
</table>
{foreach from=$group_array item=arr}
{assign var="idx" value=$arr.id}
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="row1">
<tr>
<td width="40%">
{$arr.name}
</td>
<td width="30%">
{translate module=product}
field_price_base
{/translate}
<input type="text" name="product_price_group[4][{$arr.id}][price_base]" value="{$attr_group_array[4][$idx].price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="30%">
{translate module=product}
field_price_setup
{/translate}
<input type="text" name="product_price_group[4][{$arr.id}][price_setup]" value="{$attr_group_array[4][$idx].price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
{/foreach}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="row2">
<tr>
<td width="150">
{translate module=product}
twoyear
{/translate}
&nbsp;&nbsp;
{ $list->bool("product_price_group[5][show]", $attr_group_array[5].show, "form_menu") }
</td>
</tr>
</table>
{foreach from=$group_array item=arr}
{assign var="idx" value=$arr.id}
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="row1">
<tr>
<td width="40%">
{$arr.name}
</td>
<td width="30%">
{translate module=product}
field_price_base
{/translate}
<input type="text" name="product_price_group[5][{$arr.id}][price_base]" value="{$attr_group_array[5][$idx].price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="30%">
{translate module=product}
field_price_setup
{/translate}
<input type="text" name="product_price_group[5][{$arr.id}][price_setup]" value="{$attr_group_array[5][$idx].price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
{/foreach}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="row2">
<tr>
<td width="150">
{translate module=product}
threeyear
{/translate}
&nbsp;&nbsp;
{ $list->bool("product_price_group[6][show]", $attr_group_array[6].show, "form_menu") }
</td>
</tr>
</table>
{foreach from=$group_array item=arr}
{assign var="idx" value=$arr.id}
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="row1">
<tr>
<td width="40%">
{$arr.name}
</td>
<td width="30%">
{translate module=product}
field_price_base
{/translate}
<input type="text" name="product_price_group[6][{$arr.id}][price_base]" value="{$attr_group_array[6][$idx].price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="30%">
{translate module=product}
field_price_setup
{/translate}
<input type="text" name="product_price_group[6][{$arr.id}][price_setup]" value="{$attr_group_array[6][$idx].price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
{/foreach}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row2">
<tr>
<td valign="middle" align="right">
<input type="submit" name="Submit2" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="do[]" value="product:update">
<input type="hidden" name="_page" value="product:iframe_price_recurring">
<input type="hidden" name="_page_current" value="product:iframe_price_recurring">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="id" value="{$product.id}">
<input type="hidden" name="product_price_base" value="{$product.price_base}">
<input type="hidden" name="product_sku" value="{$product.sku}">
<input type="hidden" name="product_avail_category_id" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_req_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_discount_tld" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_provision_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_prod_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_group_avail" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_modify_product_arr" value="IGNORE-ARRAY-VALUE">
</form>
{/foreach}{/if}

View File

@@ -0,0 +1,137 @@
{ $method->exe("product","search_form") }
{ if ($method->result == FALSE) }
{ $block->display("core:method_error") }
{else}
<form name="product_search" 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=product}title_search{/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="49%">
{translate module=product}
field_date_orig
{/translate}
</td>
<td width="51%">
{ $list->calender_search("product_date_orig", $VAR.product_date_orig, "form_field", "") }
</td>
</tr>
<tr valign="top">
<td width="49%">
{translate module=product}
field_sku
{/translate}
</td>
<td width="51%">
<input type="text" name="product_sku" value="{$VAR.product_sku}" {if $product_sku == true}class="form_field_error"{/if}>
&nbsp;&nbsp;
{translate}
search_partial
{/translate}
</td>
</tr>
<tr valign="top">
<td width="49%">
{translate module=product}
field_taxable
{/translate}
</td>
<td width="51%">
{ $list->bool("product_taxable", "all", "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="49%">
{translate module=product}
field_active
{/translate}
</td>
<td width="51%">
{ $list->bool("product_active", "all", "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="49%">
{translate module=product}
field_price_type
{/translate}
</td>
<td width="51%">
<input type="radio" name="product_price_type" value="0" {if $VAR.product_price_type == "0" }checked{/if}>
{translate module=product}
price_type_one
{/translate}
<br>
<input type="radio" name="product_price_type" value="1" {if $VAR.product_price_type == "1"}checked{/if}>
{translate module=product}
price_type_recurr
{/translate}
<br>
<input type="radio" name="product_price_type" value="2" {if $VAR.product_price_type == "2"}checked{/if}>
{translate module=product}
price_type_trial
{/translate}
</td>
</tr>
<!-- Define the results per page -->
<tr class="row1" valign="top">
<td width="49%">
{translate}
search_results_per
{/translate}
</td>
<td width="51%">
<input type="text" name="limit" size="5" value="{$product_limit}">
</td>
</tr>
<!-- Define the order by field per page -->
<tr class="row1" valign="top">
<td width="49%">
{translate}
search_order_by
{/translate}
</td>
<td width="51%">
<select name="order_by">
{foreach from=$product item=record}
<option value="{$record.field}">
{$record.translate}
</option>
{/foreach}
</select>
</td>
</tr>
<tr class="row1" valign="top">
<td width="49%"></td>
<td width="51%">
<input type="submit" name="Submit" value="{translate}search{/translate}" class="form_button">
<input type="hidden" name="_page" value="core:search">
<input type="hidden" name="_escape" value="Y">
<input type="hidden" name="module" value="product">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
{ $block->display("core:saved_searches") }
{ $block->display("core:recent_searches") }
{/if}

View File

@@ -0,0 +1,148 @@
{$method->exe("product","search_show")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{else}
{if $results == 1}
{translate results=$results}search_result_count{/translate}
{else}
{translate results=$results}search_results_count{/translate}
{/if}
<BR>
{popup_init src="$URL/includes/overlib/overlib.js"}
{literal}
<script language="JavaScript">
<!-- START
var module = 'product';
{/literal}
{if $VAR._print == TRUE}
var p = '&_escape=y&_print=y';
{else}
var p = '';
{/if}{literal}
var IMAGE = '{/literal}{$NONSSL_IMAGE}{literal}';
var order = '{/literal}{$order}{literal}';
var sort1 = '{/literal}{$sort}{literal}';
var search_id = '{/literal}{$search_id}{literal}';
var page = {/literal}{$page}{literal};
var pages = '{/literal}{$pages}{literal}';
var results = '{/literal}{$results}{literal}';
var limit = '{/literal}{$limit}{literal}';
record_arr = new Array ({/literal}{$limit}{literal});
var i = 0;
// END -->
</script>
<SCRIPT SRC="themes/{/literal}{$THEME_NAME}{literal}/search.js"></SCRIPT>
{/literal}
<!-- SHOW THE SEARCH NAVIGATION MENU -->
<center><script language="JavaScript">document.write(search_nav_top());</script></center>
<!-- BEGIN THE RESULTS CONTENT AREA -->
<div id="search_results" onKeyPress="key_handler(event);">
<table id="main1" width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<form id="form1" name="form1" method="post" action="">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<!-- DISPLAY THE SEARCH HEADING -->
<tr valign="middle" class="table_heading">
<td width="5%" class="table_heading" align="center">&nbsp;</td>
<td width="25%" class="table_heading" align="center">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=product}field_sku{/translate}{literal}','sku'));
</script>
{/literal}
</td>
<td width="15%" class="table_heading" align="center">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=product}field_price_base{/translate}{literal}','price_base'));
</script>
{/literal}
</td>
<td width="5%" class="table_heading" align="center">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=product}field_active{/translate}{literal}','active'));
</script>
{/literal}
</td>
<td width="50%" class="table_heading" align="center">
{translate
module=product_translate}
field_description_short
{/translate}
</td>
<td width="2%" class="table_heading" align="center">&nbsp;</td>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$product item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=product:view&id={$record.id},';" onMouseOver="row_mouseover('{$record.id}', 'row_mouse_over_select', 'row_mouse_over');" onMouseOut="row_mouseout('{$record.id}', '{$record._C}', 'row_select');" class="{$record._C}">
<td align="center" width="5%">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
<td width="25%">
<p>&nbsp;
{$record.sku}
</td>
<td width="15%"> &nbsp;
{$list->format_currency($record.price_base,"")}
</td>
<td width="5%" align="center">
{if $record.active == "1"}
<img src="themes/{$THEME_NAME}/images/icons/go_16.gif" border="0" width="16" height="16">
{else}
<img src="themes/{$THEME_NAME}/images/icons/stop_16.gif" border="0" width="16" height="16">
{/if}
</td>
<td width="50%"> &nbsp;
{if $list->translate("product_translate","name,description_short","id",$record.id, "name")}
{$name.name|truncate:50}
{else}
---
{/if}
</td>
<td width="2%">
{if {$name.short_description != ""}
{assign var="descshort" value=$name.description_short|strip_tags}
<a href="javascript:showTranslations({$record.id},'{$smarty.const.DEFAULT_LANGUAGE}')" {if $descshort != ""}{popup capcolor="ffffff" textcolor="333333" bgcolor="506DC7" fgcolor="FFFFFF" sticky=false width="250" caption="Short Description" text="$descshort" snapx=1 snapy=1 sticky=1}{/if}>
<img src="themes/{$THEME_NAME}/images/icons/edit_16.gif" border="0" width="16" height="16">
</a>
{/if}
</td>
</tr>
{literal}
<script language="JavaScript">row_sel('{/literal}{$record.id}{literal}', 0, '{/literal}{$record._C}{literal}'); record_arr[i] = '{/literal}{$record.id}{literal}'; i++; </script>
{/literal}
{/foreach}
<!-- END OF RESULT LOOP -->
</table>
</td>
</tr>
</form>
</table>
{if $VAR._print != TRUE}<br>
<center>
<input type="submit" name="Submit" value="{translate}view_edit{/translate}" onClick="mass_do('', module+':view', limit, module);" class="form_button">
<input type="submit" name="Submit" value="{translate}delete{/translate}" onClick="mass_do('delete', module+':search_show&search_id={$search_id}&page={$page}&order_by={$order}&{$sort}', limit, module);" class="form_button">
<input type="submit" name="Submit" value="{translate}select_all{/translate}" onClick="all_select(record_arr);" class="form_button">
<input type="submit" name="Submit" value="{translate}deselect_all{/translate}" onClick="all_deselect(record_arr);" class="form_button">
<input type="submit" name="Submit" value="{translate}range_select{/translate}" onClick="all_range_select(record_arr,limit);" class="form_button">
<br>
</center>
{/if}
{/if}
</div>
{literal}
<script language=javascript>
function showTranslations(product_id,language_id)
{
var url = '?_page=core:search_iframe&module=product_translate&product_translate_language_id='+
language_id+'&product_translate_product_id='+
product_id+'&_escape=1&_escape_next=1&_next_page_one=view&_next_page_none=add&name_id1=product_translate_product_id&val_id1='
+product_id+'&name_id2=product_translate_language_id&val_id2='+language_id;
window.open(url,'ProductLanguage','scrollbars=yes,toolbar=no,status=no,width=700,height=600');
}
</script>{/literal}

View File

@@ -0,0 +1,538 @@
{ $method->exe("product","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
{literal}
<script src="themes/{/literal}{$THEME_NAME}{literal}/view.js"></script>
<script language="JavaScript">
var module = 'product';
var locations = '{/literal}{$VAR.module_id}{literal}';
var id = '{/literal}{$VAR.id}{literal}';
var ids = '{/literal}{$VAR.ids}{literal}';
var array_id = id.split(",");
var array_ids = ids.split(",");
var num=0;
if(array_id.length > 2) {
document.location = '?_page='+module+':view&id='+array_id[0]+'&ids='+id;
}else if (array_ids.length > 2) {
document.write(view_nav_top(array_ids,id,ids));
}
function delete_record(id,ids)
{
temp = window.confirm("{/literal}{translate}alert_delete{/translate}{literal}");
if(temp == false) return;
var replace_id = id + ",";
ids = ids.replace(replace_id, '');
if(ids == '') {
var url = '?_page=core:search&module=' + module + '&do[]=' + module + ':delete&delete_id=' + id + COOKIE_URL;
window.location = url;
return;
} else {
var page = 'view&id=' +ids;
}
var doit = 'delete';
var url = '?_page='+ module +':'+ page +'&do[]=' + module + ':' + doit + '&delete_id=' + id + COOKIE_URL;
window.location = url;
}
// END -->
</script>
{/literal}
<!-- Loop through each record -->
{foreach from=$product item=product} <a name="{$product.id}"></a>
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display each record -->
<form id="product_view" name="product_view" 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 width="65%" class="table_heading">
<center>
{translate module=product}
title_view
{/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" class="row2">
<td width="50%"> <b>
{translate module=product}
field_date_orig
{/translate}
</b></td>
<td width="50%"> <b>
{translate module=product}
field_date_last
{/translate}
</b></td>
</tr>
<tr valign="top">
<td width="50%">
{$list->date($product.date_orig)}
</td>
<td width="50%">
{$list->date($product.date_last)}
<input type="hidden" name="product_date_last" value="{$smarty.now}">
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{translate module=product}
field_sku
{/translate}
</b> </td>
<td width="50%"><b>
{translate module=product}
field_position
{/translate}
</b></td>
</tr>
<tr valign="top" class="row1">
<td width="50%">
<input type="text" name="product_sku" value="{$product.sku}" size="32">
</td>
<td width="50%">
<input type="text" name="product_position" value="{$product.position}" size="3">
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{translate module=product}
field_active
{/translate}
</b> </td>
<td width="50%"> <b>
{translate module=product}
field_taxable
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
{ $list->bool("product_active", $product.active, "form_menu") }
</td>
<td width="50%">
{ $list->bool("product_taxable", $product.taxable, "form_menu") }
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{translate module=product}
field_price_base
{/translate}
</b> </td>
<td width="50%"> <b>
{translate module=product}
field_price_setup
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
<input type="text" name="product_price_base" value="{$product.price_base}" size="5">
{$list->currency_iso("")}
</td>
<td width="50%">
<input type="text" name="product_price_setup" value="{$product.price_setup}" size="5">
{$list->currency_iso("")}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{translate module=product}
field_avail_category_id
{/translate}
</b><br>
</td>
<td width="50%"> <b>
{translate module=product}
field_group_avail
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">{$method->exe_noauth("product_cat","admin_menu_product")}</td>
<td width="50%">
{ $list->menu_multi($product.group_avail, 'product_group_avail', 'group', 'name', '', '5', 'form_menu') }
</td>
</tr>
</table>
{if $product.price_type == "1"}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"><b>
{translate module=product}
field_price_recurr_default
{/translate}
</b></td>
<td width="50%">
<select name="product_price_recurr_default" >
<option value="0" {if $product.price_recurr_default == "0"} selected{/if}>
{translate module=product}
recurr_week
{/translate}
</option>
<option value="1" {if $product.price_recurr_default == "1"} selected{/if}>
{translate module=product}
recurr_month
{/translate}
</option>
<option value="2" {if $product.price_recurr_default == "2"} selected{/if}>
{translate module=product}
recurr_quarter
{/translate}
</option>
<option value="3" {if $product.price_recurr_default == "3"} selected{/if}>
{translate module=product}
recurr_semianual
{/translate}
</option>
<option value="4" {if $product.price_recurr_default == "4"} selected{/if}>
{translate module=product}
recurr_anual
{/translate}
</option>
<option value="5" {if $product.price_recurr_default == "5"} selected{/if}>
{translate module=product}
recurr_twoyear
{/translate}
</option>
<option value="6" {if $product.price_recurr_default == "6"} selected{/if}>
{translate module=product}
recurr_threeyear
{/translate}
</option>
</select>
</td>
</tr>
<tr valign="top" class="row2">
<td width="50%"><b>
{translate module=product}
field_price_recurr_type
{/translate}
</b></td>
<td width="50%"><b>
{translate module=product}
user_options
{/translate}
</b></td>
</tr>
<tr valign="top" class="row2">
<td width="50%">
<input type="radio" name="product_price_recurr_type" value="0" {if $product.price_recurr_type == "0"}checked{/if}>
{translate module=product}
recurr_type_aniv
{/translate}
<br>
<input type="radio" name="product_price_recurr_type" value="1" {if $product.price_recurr_type == "1"}checked{/if}>
{translate module=product}
recurr_type_fixed
{/translate}
<br>
{translate module=product}
field_price_recurr_weekday
{/translate}
<input type="text" name="product_price_recurr_weekday" value="{$product.price_recurr_weekday}" size="2" maxlength="2">
(1-28) </td>
<td width="50%">
{ $list->bool("product_price_recurr_schedule", $product.price_recurr_schedule, "form_menu") }
{translate module=product}
field_price_recurr_schedule
{/translate}
<br>
{ $list->bool("product_price_recurr_cancel", $product.price_recurr_cancel, "form_menu") }
{translate module=product}
field_price_recurr_cancel
{/translate}
<br>
{ $list->bool("product_cart_multiple", $product.cart_multiple, "form_menu") }
{translate module=product}
field_cart_multiple
{/translate}
</td>
</tr>
</table>
{/if}
{if $product.price_type == "2"}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td width="50%"> <b>
{translate module=product}
field_price_trial_prod
{/translate}
</b><br>
</td>
<td width="50%"> <b>
{translate module=product}
field_price_trial_length
{/translate}
</b> </td>
</tr>
<tr valign="top">
<td width="50%">
{ $list->menu("", "product_price_trial_prod", "product", "sku", $product.price_trial_prod, "form_menu") }
</td>
<td width="50%">
<input type="text" name="product_price_trial_length" value="{$product.price_trial_length}" size="4">
<select name="product_price_trial_length_type" >
<option value="0" {if $product.price_trial_length_type == "0"} selected{/if}>{translate}day{/translate}</option>
<option value="1" {if $product.price_trial_length_type == "1"} selected{/if}>{translate}week{/translate}</option>
<option value="2" {if $product.price_trial_length_type == "2"} selected{/if}>{translate}month{/translate}</option>
</select>
</td>
</tr>
</table>
{/if}
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr class="row1" valign="middle" align="left">
<td width="50%" valign="top"><b>
{if $product.thumbnail != ""}
<img src="{$URL}{$smarty.const.URL_IMAGES}{$product.thumbnail}">
&nbsp;&nbsp;&nbsp;
{/if}
{translate module=product}
field_thumbnail
{/translate}
&nbsp;&nbsp;&nbsp; </b> </td>
<td width="50%" align="left"><b>
<input type="file" name="upload_file1" size="38" >
{if $product.thumbnail != ""}
<img title="Delete Thumbnail Image" src="themes/{$THEME_NAME}/images/icons/del_16.gif" onClick="document.getElementById('delimg').value = '1'; document.getElementById('product_view').submit();">
{/if}
</b></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1">
<tr class="row2">
<td width="50%">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
<td align="right" width="50%">
<input type="button" name="delete" value="{translate}delete{/translate}" class="form_button" onClick="delete_record('{$product.id}','{$VAR.id}');">
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr class="row1" valign="middle" align="left">
<td width="35%" align="center">
<!-- feature inactive
<a href="javascript:showImages();">
{translate module=product}manage_images{/translate}</a> |
-->
<a href="javascript:viewTranslations()">Name &amp; Description</a>
| <a href="javascript:showAttributes();">
{translate module=product}
attributes
{/translate}
</a> | <a href="javascript:showBilling();">
{translate module=product}
advanced_billing
{/translate}
</a> | <a href="javascript:showAssociations();">
{translate module=product}
associations
{/translate}
</a> | <a href="javascript:showDiscounts();">
{translate module=product}
discounts
{/translate}
</a>
{if $list->is_installed("host_server")}
| <a href="javascript:showHosting();">
{translate module=product}
hosting
{/translate}
</a>
{/if}
| <a href="javascript:showPlugins();">
{translate module=product}
product_plugins
{/translate}
</a> | <a href="javascript:showLink('{$product.id}', '{$product.price_recurr_default}')">
{translate module=product}
link
{/translate}
</a>| <a href="javascript:clone('{$product.id}')">
{translate module=product}
clone
{/translate}
</a> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="product:view">
<input type="hidden" name="product_id" value="{$product.id}">
<input type="hidden" name="do[]" value="product:update">
<input type="hidden" name="id" value="{$VAR.id}">
<input type="hidden" id="delimg" name="delimg" value="0">
<input type="hidden" name="product_assoc_req_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_prod" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_assoc_grant_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_price_group" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_discount_tld" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_host_provision_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_prod_plugin_data" value="IGNORE-ARRAY-VALUE">
<input type="hidden" name="product_modify_product_arr" value="IGNORE-ARRAY-VALUE">
</form>
<CENTER><iframe name="iframeProduct" id="iframeProduct" style="border:0px; width:0px; height:0px;" scrolling="auto" ALLOWTRANSPARENCY="true" frameborder="0" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe> </CENTER>
<div id="code"></div>
{literal}
<SCRIPT LANGUAGE="JavaScript">
<!-- START
var product_id = {/literal}{$product.id}{literal};
function viewTranslations(product_id,language_id)
{
document.getElementById("code").innerHTML = "";
var product_id = {/literal}{$product.id}{literal};
var language_id = {/literal}'{$smarty.const.DEFAULT_LANGUAGE}'{literal};
var url = '?_page=core:search_iframe&module=product_translate&product_translate_language_id='+
language_id+'&product_translate_product_id='+
product_id+'&_escape=1&_escape_next=1&_next_page_one=view&_next_page_none=add&name_id1=product_translate_product_id&val_id1='
+product_id+'&name_id2=product_translate_language_id&val_id2='+language_id;
showIFrame('iframeProduct',getPageWidth(600),300,url);
}
viewTranslations();
function showLink(product_id, recurr_schedule)
{
showIFrame('iframeProduct',0,0,'?_page=core:blank');
var code;
code = "<br>Add to cart and checkout:<br><textarea cols=120 rows=2 class=form_field>"+
"{/literal}{$URL}{literal}?_page=checkout:checkout&_next_page=checkout:checkout&do[]=cart:add&product_id="+product_id+"&recurr_schedule="+recurr_schedule+
"</textarea>";
code += "<br><br>Add to cart and view cart:<br><textarea cols=120 rows=2 class=form_field>"+
"{/literal}{$URL}{literal}?_page=cart:cart&do[]=cart:add&product_id="+product_id+"&recurr_schedule="+recurr_schedule+
"</textarea>";
document.getElementById("code").innerHTML = code;
}
function showImages()
{
document.getElementById("code").innerHTML = "";
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=core:search_iframe&module=product_img&product_img_product_id='+
product_id+'&_escape=1&_escape_next=1&_next_page_one=view&_next_page_none=add&name_id1=product_img_product_id&val_id1='
+product_id);
}
function showAttributes()
{
document.getElementById("code").innerHTML = "";
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=core:search_iframe&module=product_attr&product_attr_product_id='+
product_id+'&_escape=1&_escape_next=1&_next_page_one=view&_next_page_none=add&name_id1=product_attr_product_id&val_id1='
+product_id+'&name_id2=product_attribute_product_price_type&val_id2={/literal}{$product.price_type}{literal}');
}
function showBilling()
{
document.getElementById("code").innerHTML = "";
var billingtype = {/literal}{$product.price_type}{literal};
if(billingtype == "0" || billingtype == "2")
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=product:iframe_price_onetime&_escape=1&id='+product_id);
else if(billingtype == "1")
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=product:iframe_price_recurring&_escape=1&id='+product_id);
}
function showAssociations()
{
document.getElementById("code").innerHTML = "";
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=product:iframe_associations&_escape=1&id='+product_id);
}
function showDiscounts()
{
document.getElementById("code").innerHTML = "";
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=product:iframe_discounts&_escape=1&id='+product_id);
}
function showHosting()
{
document.getElementById("code").innerHTML = "";
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=product:iframe_hosting&_escape=1&id='+product_id);
}
function showPlugins()
{
document.getElementById("code").innerHTML = "";
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=product:iframe_plugins&_escape=1&id='+product_id);
}
function clone()
{
document.getElementById("code").innerHTML = "";
showIFrame('iframeProduct',getPageWidth(600),300,'?_page=product:iframe_clone&_escape=1&id='+product_id);
}
// END -->
</SCRIPT>{/literal}
{/foreach}
{/if}