Changes to AgileBill

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

View File

@@ -1,178 +1,52 @@
<!-- Image Preview -->{literal}
<script language="JavaScript" type="text/JavaScript">
function previewImage(fileInfo) {
var filename = "";
//create the path to your local file
if (fileInfo == null) {
if (document.form1.file != "") {
filename = "file:///" + document.form1.file.value;
}
} else {
filename = fileInfo;
}
//check if there is a value
if (filename == "") {
alert ("Please select a image.");
document.form1.file.focus();
} else {
//create the popup
popup = window.open('', 'imagePreview', 'width=640,height=100,left=100,top=75, screenX=100,screenY=75,scrollbars,location,menubar,status=0,toolbar=0,resizable=1');
//start writing in the html code
popup.document.writeln("<html><body bgcolor='#FFFFFF'>");
//get the extension of the file to see if it has one of the image extensions
var fileExtension = filename.substring(filename.lastIndexOf(".")+1);
if (fileExtension == "jpg" || fileExtension == "jpeg" || fileExtension == "gif"
|| fileExtension == "png")
popup.document.writeln("<img src='" + filename + "'>");
else
//if not extension fron list above write URL to file
popup.document.writeln("<a href='" + filename + "'>" + filename + "</a>");
popup.document.writeln("</body></html>");
popup.document.close();
popup.focus();
}
}
</script>{/literal}
<!-- Display the form validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{$block->display('core:alert_fields')}
{/if}
<!-- Display the form to collect the input values -->
<form id="product_cat_add" name="product_cat_add" method="post" action="" enctype="multipart/form-data">
<form id="add" method="post" action="" enctype="multipart/form-data">
<table width=100% border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td width="65%" class="table_heading">
<center>
{translate module=product_cat}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="35%">
{translate module=product_cat}
field_name
{/translate}</td>
<td width="65%">
<input type="text" name="product_cat_name" value="{$VAR.product_cat_name}" {if $product_cat_name == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_notes
{/translate}</td>
<td width="65%">
<textarea name="product_cat_notes" class="{if $product_cat_notes == true}form_field_error{else}form_field{/if}" cols="40" rows="2">{$VAR.product_cat_notes}</textarea>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_parent_id
{/translate}
</td>
<td width="65%">&nbsp; </td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_group_avail
{/translate}
</td>
<td width="65%">
{ $list->menu_multi($VAR.product_cat_group_avail, 'product_cat_group_avail', 'group', 'name', '', '10', 'form_menu') }
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_status
{/translate}</td>
<td width="65%">
{ if $VAR.product_cat_status != ""}
{ $list->bool("product_cat_status", $VAR.product_cat_status, "form_menu") }
{else}
{ $list->bool("product_cat_status", "1", "form_menu") }
{/if}
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_template
{/translate}</td>
<td width="65%">
{ $list->menu_files("", "product_cat_template", $VAR.product_cat_template, "product_cat", "t_", ".tpl", "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_thumbnail
{/translate}</td>
<td width="65%">
<input type="file" name="upload_file1" size="38" {if $campaign_file1 == true}class="form_field_error"{/if}>
<img src="themes/{$THEME_NAME}/images/icons/picts_16.gif" onClick="previewImage(document.product_cat_add.upload_file1.value);">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_image
{/translate}</td>
<td width="65%">
<input type="file" name="upload_file2" size="38" {if $campaign_file2 == true}class="form_field_error"{/if}>
<img src="themes/{$THEME_NAME}/images/icons/picts_16.gif" onClick="previewImage(document.product_cat_add.upload_file2.value);">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_position
{/translate}</td>
<td width="65%">
<input type="text" name="product_cat_position" value="{$VAR.product_cat_position}" {if $product_cat_position == true}class="form_field_error"{/if} size="3">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_max
{/translate}
</td>
<td width="65%">
<input type="text" name="product_cat_max" value="{$VAR.product_cat_max}" {if $product_cat_max == true}class="form_field_error"{/if} size="3">
</td>
</tr>
<tr valign="top">
<td width="35%"></td>
<td width="65%">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
<input type="hidden" name="_page" value="product_cat_translate:add">
<input type="hidden" name="_page_current" value="product_cat:add">
<input type="hidden" name="do[]" value="product_cat:add">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<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>{osb f=tt module=product_cat method=add}</center></td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="35%">{osb f=tf module=product_cat field=name}</td>
<td width="65%"><input type="text" name="product_cat_name" value="{$VAR.product_cat_name}" {if $product_cat_name == true}class="form_field_error"{/if} /></td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf module=product_cat field=group_avail}</td>
<td width="65%">{$list->menu_multi($VAR.product_cat_group_avail,'product_cat_group_avail','group','name','','10','form_menu')}</td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf module=product_cat field=template}</td>
<td width="65%">{$list->menu_files('','product_cat_template',$VAR.product_cat_template,'product_cat','t_','.tpl','form_menu')}</td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf module=product_cat field=max}</td>
<td width="65%"><input type="text" name="product_cat_max" value="{$VAR.product_cat_max}" {if $product_cat_max == true}class="form_field_error"{/if} size="3"/></td>
</tr>
<tr valign="top">
<td width="35%"></td>
<td width="65%">
<input type="submit" name="Submit" value="{t}Submit{/t}" class="form_button"/>
<input type="hidden" name="_page" value="product_cat_translate:add"/>
<input type="hidden" name="_page_current" value="product_cat:add"/>
<input type="hidden" name="do[]" value="product_cat:add"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,37 @@
function previewImage(fileInfo) {
var filename = '';
//create the path to your local file
if (fileInfo == null) {
if (document.form1.file != "") {
filename = "file:///" + document.form1.file.value;
}
} else {
filename = fileInfo;
}
//check if there is a value
if (filename == '') {
alert ("Please select a image.");
document.form1.file.focus();
} else {
//create the popup
popup = window.open('','imagePreview','width=640,height=100,left=100,top=75,screenX=100,screenY=75,scrollbars,location,menubar,status=0,toolbar=0,resizable=1');
//start writing in the html code
popup.document.writeln("<html><body bgcolor='#FFFFFF'>");
//get the extension of the file to see if it has one of the image extensions
var fileExtension = filename.substring(filename.lastIndexOf(".")+1);
if (fileExtension == "jpg" || fileExtension == "jpeg" || fileExtension == "gif" || fileExtension == "png")
popup.document.writeln("<img src='" + filename + "'/>");
else
//if not extension fron list above write URL to file
popup.document.writeln("<a href='" + filename + "'>" + filename + "</a>");
popup.document.writeln("</body></html>");
popup.document.close();
popup.focus();
}
}

View File

@@ -1,73 +1,57 @@
<table width=100% border="0" cellspacing="1" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="25">
<tr valign="top">
<td><h2>
{translate}
products
{/translate}
</h2>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td align="right" valign="top">
{if $smarty.const.SHOW_CHECKOUT_LINK}<a href="{$SSL_URL}?_page=checkout:checkout&s={$SESS}">{translate}checkout{/translate}</a>{/if}
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="25">
<tr valign="top">
<td><h2>{t}Products{/t}</h2></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td align="right" valign="top">{if ! $smarty.const.SHOW_CHECKOUT_LINK}<a href="{$SSL_URL}?_page=checkout:checkout&s={$SESS}">{t}Checkout{/t}</a>{/if}</td>
</tr>
</table>
<br>
{$method->exe_noauth("product_cat","user_menu")}
<br/>
{if $product_cat != "" || $smarty.const.SHOW_DOMAIN_LINK }
{$method->exe_noauth('product_cat','user_menu')}
{if $product_cat != '' || $smarty.const.SHOW_DOMAIN_LINK}
<table width="100%" border="0" class="table_background" align="left">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="left">
<tr>
<td class="menu_1">
<h2>
{translate module=product_cat}menu{/translate}
</h2>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="left">
<tr>
<td class="menu_1"><h2>{osb f=tt module=product_cat method=view}</h2></td>
</tr>
{foreach from=$product_cat item=record key=key}
{assign var=cat_translate value=''}
<tr>
<td class="menu_2">&nbsp;&nbsp;
<a href="{$URL}?_page=product_cat:t_{$record.template}&id={$record.id}">
{if $list->translate('product_cat_translate','name,description','product_cat_id',$record.id,'cat_translate')}
{$cat_translate.name}
{else}
{$record.name}
{/if}
</a>
</td>
</tr>
{/foreach}
{foreach from=$product_cat item=record key=key}
<tr>
<td class="menu_2"> &nbsp;&nbsp;
<a href="{$URL}?_page=product_cat:t_{$record.template}&id={$record.id}">
{if $list->translate("product_cat_translate","name,description","product_cat_id", $record.id, "cat_translate") }
{$cat_translate.name}
{else}
{$record.name}
{/if}
</a>
</td>
</tr>
{/foreach}
{ if $smarty.const.SHOW_DOMAIN_LINK }
<tr>
<td class="menu_2"> &nbsp;&nbsp;
<a href="{$URL}?_page=host_tld:search">
{translate}
domain_search
{/translate}
</a>
</td>
</tr>
{/if}
</table>
</td>
</tr>
{if $smarty.const.SHOW_DOMAIN_LINK}
<tr>
<td class="menu_2">&nbsp;&nbsp;<a href="{$URL}?_page=host_tld:search">{t}Domain Search{/t}</a></td>
</tr>
{/if}
</table>
</td>
</tr>
</table>
<br><br><br>
<br/><br/><br/>
{/if}

View File

@@ -0,0 +1,14 @@
<!-- Show product paging -->
{t count=$page_pages 1=$page_pages plural="View items on page: %1"}{/t}
{if $page_pages > 1}
{foreach from=$page_arr item=page}
<a href="?_page={$VAR._page}&id={$VAR.id}&page={$page}">
{if $page == $page_page}
<b>{$page}</b>
{else}
{$page}
{/if}
</a>
{if $page != $page_pages} | {/if}
{/foreach}
{/if}

View File

@@ -0,0 +1,26 @@
<!-- Show the category drill-down -->
{if $product_cat_arr}
{foreach from=$product_cat_arr item=record}
<table width=100% border="0" cellspacing="1" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart" height="25">
<tr valign="top">
<td><a href="{$URL}?_page=product_cat:user_menu">{osb f=tt module=product_cat method=view}</a>
{foreach from=$parent_cat item=cat}
&gt; <a href="?_page=product_cat:t_{$cat.template}&id={$cat.id}">{$cat.name}</a>
{/foreach}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{/foreach}
{/if}

View File

@@ -0,0 +1,50 @@
<!-- Show subcategories -->
{foreach from=$product_sub_cat item=record}
{assign var=cat_translate value=''}
<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>
{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}
{t}No Description{/t}
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
{/foreach}

View File

@@ -1,101 +1,12 @@
{$method->exe("product_cat","search_show")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{$method->exe($meth.0,$meth.1)}
{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>
{literal}
<script language="JavaScript">
<!-- START
var module = 'product_cat';
{/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" align="center" class="table_heading">
<td width="5%" class="table_heading">&nbsp;</td>
<td width="47.5%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=product_cat}field_name{/translate}{literal}','name'));
</script>
{/literal}
</td>
<td width="47.5%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=product_cat}field_status{/translate}{literal}','status'));
</script>
{/literal}
</td>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$product_cat item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=product_cat: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>&nbsp;{$record.name}</td>
<td>&nbsp;{if $record.status == "1"}{translate}true{/translate}{else}{translate}false{/translate}{/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>
{include file='file:../core/search_show_pre.tpl'}
{$method->exe_noauth($meth.0,'tpl_search_show',$search_show)}
{include file='file:../core/search_show_post-1.tpl'}
{include file='file:../core/search_show_post-2.tpl'}
{/if}
{/if}
</div>

View File

@@ -1,188 +1,84 @@
{if $VAR.id == ""} {$block->display("product:cat")} {else}
{$method->exe_noauth("product_cat", "user_view")}
{if $VAR.id == ''}
{$block->display('product_cat:user_menu')}
{else}
{$method->exe_noauth('product_cat','user_view')}
<!-- Show the category drill-down -->
{ if $product_cat_arr }
{foreach from=$product_cat_arr item=record}
<table width=100% border="0" cellspacing="1" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart" height="25">
<tr valign="top">
<td> <a href="{$URL}?_page=product:cat">{translate module=product_cat}menu{/translate}</a>
{foreach from=$parent_cat item=cat}
> <a href="?_page=product_cat:t_{$cat.template}&id={$cat.id}">
{$cat.name}
</a>
{/foreach}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{/foreach}
<!-- Show the category drill-down -->
{include file='file:pre_t_CategoryDrill.tpl'}
{/if}
{/if}
<!-- Show subcategories -->
{if $product_sub_cat != ""}
<br>
{foreach from=$product_sub_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}
{translate module=product_cat}
desc_none
{/translate}
{/if}
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
{/foreach}
{if $product_sub_cat != ''}
<br/>
{include file='file:pre_t_SubCategories.tpl'}
{/if}
<br>
<!-- Show each product, 3 columns per row -->
{ if $product_arr }
{assign var=entries value=$product_arr}
{assign var=columns value=3}
{if count($entries) > 0}
<table width="100%" cellpadding="0" cellspacing="5">
{math assign="lastcol" equation="x-1" x=$columns}
{math assign="width" equation="100 / x" x=$columns}
{section name="idx" loop=$entries}
{math assign="col" equation="x % y" x=$smarty.section.idx.rownum y=$columns}
{if $col == 0} {php}
<tr>{/if}
<td width="{$width}%">
<table width=100% border="0" cellspacing="1" cellpadding="0" class="table_background">
<tr>
<td height="17">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart">
<tr valign="top">
<td width="78%" >
{math equation="x-1" x=`$smarty.section.idx.rownum` assign=i}
{assign var=product value=$product_arr.$i}
<p><a href="{$URL}?_page=product:details&id={$product.id}">
{if $list->translate("product_translate","name,description_short,description_full","product_id", $product.id, "prod_translate") }
{$prod_translate.name}
{else}
{$product.sku}
{/if}
</a></p>
</td>
<td width="22%" valign="middle" align="right"> <b>
{$list->format_currency_num($product.price_base,$smarty.const.SESS_CURRENCY)}
</b> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body" bgcolor="#FFFFFF">
<tr valign="top">
{if $product.thumbnail != ""}
<td width="8%" valign="top">
<p> <a href="{$URL}?_page=product:details&id={$product.id}"><img src="{$URL}{$smarty.const.URL_IMAGES}{$product.thumbnail}" hspace="5" border="0"></a>
</p>
</td>
{/if}
<td width="92%" align="left">
<p>
{if $product.thumbnail != "" }
<a href="{$URL}?_page=product:details&id={$product.id}"> </a>
{/if}
{if $prod_translate.description_short != "" }
{$prod_translate.description_short}
{else}
{translate module=product_cat}
desc_none
{/translate}
{/if}
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
{if $col == $lastcol || $smarty.section.idx.index_last == true }</tr>{/if} {* end of row *}
{/section}
</table>
{/if}
{if $product_arr}
{assign var=entries value=$product_arr}
{assign var=columns value=3}
{if count($entries) > 0}
<table width="100%" cellpadding="0" cellspacing="5">
{math assign="lastcol" equation="x-1" x=$columns}
{math assign="width" equation="100 / x" x=$columns}
{section name="idx" loop=$entries}
{math assign="col" equation="x % y" x=$smarty.section.idx.rownum y=$columns}
{if $col == 0}
<tr>
{/if}
<td width="{$width}%">
<table width=100% border="0" cellspacing="1" cellpadding="0" class="table_background">
<tr>
<td height="17">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart">
<tr valign="top">
<td width="78%" >
{math equation="x-1" x=`$smarty.section.idx.rownum` assign=i}
{assign var=product value=$product_arr.$i}
<a href="{$URL}?_page=product:details&id={$product.id}">
{if $list->translate("product_translate","name,description_short,description_full","product_id", $product.id, "prod_translate") }
{$prod_translate.name}
{else}
{$product.sku}
{/if}
</a>
</td>
<td width="22%" valign="middle" align="right"><b>{$list->format_currency_num($product.price_base,$smarty.const.SESS_CURRENCY)}</b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body" bgcolor="#FFFFFF">
<tr valign="top">
{if $product.thumbnail != ''}
<td width="8%" valign="top">
<a href="{$URL}?_page=product:details&id={$product.id}"><img src="{$URL}{$smarty.const.URL_IMAGES}{$product.thumbnail}" hspace="5" border="0"/></a>
</td>
{/if}
<td width="92%" align="left">
{if $prod_translate.description_short != ''}
{$prod_translate.description_short}
{else}
{t}No Description{/t}
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
{if $col == $lastcol || $smarty.section.idx.index_last == true}
</tr>
{/if} {* end of row *}
{/section}
</table>
{/if}
<!-- Show product paging -->
{if $page_pages > 1}
{translate module=product_cat}
pages
{/translate}
{foreach from=$page_arr item=page}
<a href="?_page={$VAR._page}&id={$VAR.id}&page={$page}">
{if $page == $page_page}
<b>
{$page}
</b>
<!-- Show product paging -->
{include file='file:post_t_Pages.tpl'}
{else}
{$page}
{/if}
</a>
{if $page != $page_pages}
|
{/if}
{/foreach}
{/if}
{else}
{translate module=product_cat}
products_none
{/translate}
{t}No Products in this Category{/t}
{/if}

View File

@@ -1,182 +1,72 @@
{if $VAR.id == ""} {$block->display("product:cat")} {else}
{$method->exe_noauth("product_cat", "user_view")}
{if $VAR.id == ''}
{$block->display('product_cat:user_menu')}
{else}
{$method->exe_noauth('product_cat','user_view')}
<!-- Show the category drill-down -->
{ if $product_cat_arr }
{foreach from=$product_cat_arr item=record}
<table width=100% border="0" cellspacing="1" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart" height="25">
<tr valign="top">
<td> <a href="{$URL}?_page=product:cat">{translate module=product_cat}menu{/translate}</a>
{foreach from=$parent_cat item=cat}
> <a href="?_page=product_cat:t_{$cat.template}&id={$cat.id}">
{$cat.name}
</a>
{/foreach}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{/foreach}
<!-- Show the category drill-down -->
{include file='file:pre_t_CategoryDrill.tpl'}
{/if}
{/if}
<!-- Show subcategories -->
{if $product_sub_cat != ""}
<br>
{foreach from=$product_sub_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}
{translate module=product_cat}
desc_none
{/translate}
{/if}
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
{/foreach}
{if $product_sub_cat != ''}
<br/>
{include file='file:pre_t_SubCategories.tpl'}
{/if}
<br>
<!-- Show each product -->
{ if $product_arr }
{foreach from=$product_arr item=product}
<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><a href="{$URL}?_page=product:details&id={$product.id}">
</a><a href="{$URL}?_page=product:details&id={$product.id}">
{if $list->translate("product_translate","name,description_short,description_full","product_id", $product.id, "prod_translate") }
{$prod_translate.name}
{else}
{$product.sku}
{/if}
</a> </p>
</td>
<td width="22%" valign="middle" align="right"> <b>
{$list->format_currency_num($product.price_base,$smarty.const.SESS_CURRENCY)}
</b> </td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body" bgcolor="#FFFFFF">
<tr valign="top">
{if $product.thumbnail != ""}
<td width="8%" valign="top">
<p>
<a href="{$URL}?_page=product:details&id={$product.id}"><img src="{$URL}{$smarty.const.URL_IMAGES}{$product.thumbnail}" hspace="5" border="0"></a>
</p>
</td>
{/if}
<td width="92%" align="left">
<p>
{if $product.thumbnail != "" }
<a href="{$URL}?_page=product:details&id={$product.id}"> </a>
{/if}
{if $prod_translate.description_short != "" }
{$prod_translate.description_short}
{else}
{translate module=product_cat}
desc_none
{/translate}
{/if}
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
{/foreach}
<!-- Show product paging -->
{if $page_pages > 1}
{translate module=product_cat}
pages
{/translate}
{foreach from=$page_arr item=page}
<a href="?_page={$VAR._page}&id={$VAR.id}&page={$page}">
{if $page == $page_page}
<b>
{$page}
</b>
{if $product_arr}
{foreach from=$product_arr item=product}
<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%" >
<a href="{$URL}?_page=product:details&id={$product.id}">
{if $list->translate('product_translate','name,description_short,description_full','product_id',$product.id,'prod_translate')}
{$prod_translate.name}
{else}
{$product.sku}
{/if}
</a>
</td>
<td width="22%" valign="middle" align="right"><b>{$list->format_currency_num($product.price_base,$smarty.const.SESS_CURRENCY)}</b></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body" bgcolor="#FFFFFF">
<tr valign="top">
{if $product.thumbnail != ''}
<td width="8%" valign="top">
<a href="{$URL}?_page=product:details&id={$product.id}"><img src="{$URL}{$smarty.const.URL_IMAGES}{$product.thumbnail}" hspace="5" border="0"/></a>
</td>
{/if}
<td width="92%" align="left">
{if $prod_translate.description_short != ''}
{$prod_translate.description_short}
{else}
{t}No Description{/t}
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
{/foreach}
<!-- Show product paging -->
{include file='file:post_t_Pages.tpl'}
{else}
{$page}
{/if}
</a>
{if $page != $page_pages}
|
{/if}
{/foreach}
{/if}
{else}
{translate module=product_cat}
products_none
{/translate}
{t}No Products in this Category{/t}
{/if}

View File

@@ -1,144 +1,65 @@
{if $VAR.id == ""} {$block->display("product:cat")} {else}
{$method->exe_noauth("product_cat", "user_view")}
{if $VAR.id == ''}
{$block->display('product_cat:user_menu')}
{else}
{$method->exe_noauth('product_cat','user_view')}
<!-- Show the category drill-down -->
{ if $product_cat_arr }
{foreach from=$product_cat_arr item=record}
<table width=100% border="0" cellspacing="1" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart" height="25">
<tr valign="top">
<td> <a href="{$URL}?_page=product:cat">{translate module=product_cat}menu{/translate}</a>
{foreach from=$parent_cat item=cat}
> <a href="?_page=product_cat:t_{$cat.template}&id={$cat.id}">
{$cat.name}
</a>
{/foreach}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{/foreach}
<!-- Show the category drill-down -->
{include file='file:pre_t_CategoryDrill.tpl'}
{/if}
{/if}
<!-- Show subcategories -->
{if $product_sub_cat != ""}
<br>
{foreach from=$product_sub_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}
{translate module=product_cat}
desc_none
{/translate}
{/if}
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{/foreach}
{if $product_sub_cat != ''}
<br/>
{include file='file:pre_t_SubCategories.tpl'}
{/if}
<br>
<!-- Show each product -->
{ if $product_arr }
<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%" >
{translate module=product_cat}
plans_select
{/translate}
</td>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="row2" >
<tr valign="top">
<td width="23%" valign="top">
<form name="form1" method="get" action="">
<select name="id">
{foreach from=$product_arr item=product}
<option value="{$product.id}">
{if $list->translate("product_translate","name,description_short,description_full","product_id", $product.id, "prod_translate") }
{$prod_translate.name}
{else}
{$product.sku}
{/if}
-
{$list->format_currency_num($product.price_base,$smarty.const.SESS_CURRENCY)}
</option>
{/foreach}
</select>
<input type="submit" name="Submit" value="{translate}submit{/translate}">
<input type="hidden" name="_page" value="product:details_wizard">
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
{if $product_arr}
<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%">{t}Select A Plan{/t}</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="row2">
<tr valign="top">
<td width="23%" valign="top">
<form method="get" action="">
<select name="id">
{foreach from=$product_arr item=product}
<option value="{$product.id}">
{if $list->translate('product_translate','name,description_short,description_full','product_id',$product.id,'prod_translate')}
{$prod_translate.name}
{else}
{$product.sku}
{/if}
-
{$list->format_currency_num($product.price_base,$smarty.const.SESS_CURRENCY)}
</option>
{/foreach}
</select>
<input type="submit" name="Submit" value="{t}Submit{/t}"/>
<input type="hidden" name="_page" value="product:details_wizard"/>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
{else}
{translate module=product_cat}plans_none{/translate}
{t}No Plans{/t}
{/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

@@ -1,288 +1,132 @@
<!-- Image Preview -->{literal}
<script language="JavaScript" type="text/JavaScript">
function previewImage(fileInfo) {
var filename = "";
//create the path to your local file
if (fileInfo == null) {
if (document.form1.file != "") {
filename = "file:///" + document.form1.file.value;
}
} else {
filename = fileInfo;
}
//check if there is a value
if (filename == "") {
alert ("Please select a image.");
document.form1.file.focus();
} else {
//create the popup
popup = window.open('', 'imagePreview', 'width=640,height=100,left=100,top=75, screenX=100,screenY=75,scrollbars,location,menubar,status=0,toolbar=0,resizable=1');
//start writing in the html code
popup.document.writeln("<html><body bgcolor='#FFFFFF'>");
//get the extension of the file to see if it has one of the image extensions
var fileExtension = filename.substring(filename.lastIndexOf(".")+1);
if (fileExtension == "jpg" || fileExtension == "jpeg" || fileExtension == "gif"
|| fileExtension == "png")
popup.document.writeln("<img src='" + filename + "'>");
else
//if not extension fron list above write URL to file
popup.document.writeln("<a href='" + filename + "'>" + filename + "</a>");
popup.document.writeln("</body></html>");
popup.document.close();
popup.focus();
}
}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
</script>{/literal}
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{include file='file:../core/view_pre.tpl'}
<!-- Display the field validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
{ $method->exe("product_cat","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
<!-- Display each record -->
<form id="view" method="post" action="" enctype="multipart/form-data">
{literal}
<script src="themes/{/literal}{$THEME_NAME}{literal}/view.js"></script>
<script language="JavaScript">
var module = 'product_cat';
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));
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td class="table_heading">{osb f=tt}</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="35%">{osb f=tf field=name}</td>
<td width="65%"><input type="text" name="product_cat_name" value="{$record.name}" size="32"/></td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=notes}</td>
<td width="65%"><textarea name="product_cat_notes" cols="40" rows="2">{$record.notes}</textarea></td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=parent_id}</td>
<td width="65%">{$method->exe_noauth('product_cat','tpl_admin_menu_parent')}</td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=group_avail}</td>
<td width="65%">{$list->menu_multi($record.group_avail,'product_cat_group_avail','group','name','','10','form_menu')}</td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=status}</td>
<td width="65%">{$list->bool('product_cat_status',$record.status)}</td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=template}</td>
<td width="65%">{$list->menu_files('','product_cat_template',$record.template,'product_cat','t_','.tpl','form_menu')}</td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=position}</td>
<td width="65%"><input type="text" name="product_cat_position" value="{$record.position}" size="5"/></td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=max}</td>
<td width="65%"><input type="text" name="product_cat_max" value="{$record.max}" size="5"/></td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=thumbnail}</td>
<td width="65%">
<input id="thumbnail1" type="file" name="upload_file1" size="38" {if $campaign_file1 == true}class="form_field_error"{/if}/>
<img src="themes/{$THEME_NAME}/images/icons/picts_16.gif" onClick="previewImage(document.{$meth.0}_{$meth.1}.upload_file1.value);"/>
{if $record.thumbnail != ''}
<img title="Delete" src="themes/{$THEME_NAME}/images/icons/del_16.gif" onClick="document.getElementById('delthumb').value = '1'; document.getElementById('{$meth.0}_{$meth.1}').submit();"/><br/>
<br/>
<img src="{$URL}{$smarty.const.URL_IMAGES}{$record.thumbnail}"/>
{/if}
</td>
</tr>
<tr valign="top">
<td width="35%">{osb f=tf field=image}</td>
<td width="65%">
<input id="image" type="file" name="upload_file2" size="38" {if $campaign_file2 == true}class="form_field_error"{/if}/>
<img src="themes/{$THEME_NAME}/images/icons/picts_16.gif" onClick="previewImage(document.{$meth.0}_{$meth.1}.upload_file2.value);"/>
{if $record.image != ''}
<img title="Delete" src="themes/{$THEME_NAME}/images/icons/del_16.gif" onClick="document.getElementById('delimg').value = '1'; document.getElementById('{$meth.0}_{$meth.1}').submit();"/><br/>
<br/>
<img src="{$URL}{$smarty.const.URL_IMAGES}{$record.image}"/>
{/if}
</td>
</tr>
{include file='file:../core/view_tr_submit_delete.tpl'}
</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="53%"><a href="javascript:showCatTranslations({$record.id})">{osb f=tt module=product_cat_translate method=view}</a></td>
<td width="47%" valign="middle" align="right"> <a href="javascript:addCatTranslations({$record.id})">{osb f=tt module=product_cat_translate method=add}</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{include file='file:../core/view_post.tpl'}
<div>
<input type="hidden" id="delthumb" name="delthumb" value="0"/>
<input type="hidden" id="delimg" name="delimg" value="0"/>
</div>
</form>
<iframe name="iframe" id="iframe" style="border:0px; width:0px; height:0px;" scrolling="auto" ALLOWTRANSPARENCY="true" frameborder="0" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
<script type="text/javascript">
var CatId = '{$record.id}';
</script>
<!-- Image Preview -->
<script type="text/javascript" src="themes/default/blocks/{$meth.0}/imagePreview.js"></script>
<script type="text/javascript">
<!--
{literal}
function showCatTranslations(id) {
showIFrame('iframe',getPageWidth(650),350,'?_page=core:search&_next_page_one=view&module=product_cat_translate&_escape=1&product_cat_translate_product_cat_id='+id);
}
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_cat item=product_cat} <a name="{$product_cat.id}"></a>
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display each record -->
<form id="form10" name="product_cat_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_cat}
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">
<td width="35%">
{translate module=product_cat}
field_name
{/translate}
</td>
<td width="65%">
<input id="name1" type="text" name="product_cat_name" value="{$product_cat.name}" size="32">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_notes
{/translate}
</td>
<td width="65%">
<textarea name="product_cat_notes" cols="40" rows="2">{$product_cat.notes}</textarea>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_parent_id
{/translate}
</td>
<td width="65%">{$method->exe_noauth("product_cat", "admin_menu_parent")} </td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_group_avail
{/translate}
</td>
<td width="65%">
{ $list->menu_multi($product_cat.group_avail, 'product_cat_group_avail', 'group', 'name', '', '10', 'form_menu') }
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_status
{/translate}
</td>
<td width="65%">
{ $list->bool("product_cat_status", $product_cat.status, "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_template
{/translate}
</td>
<td width="65%">
{ $list->menu_files("", "product_cat_template", $product_cat.template, "product_cat", "t_", ".tpl", "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_position
{/translate}
</td>
<td width="65%">
<input type="text" name="product_cat_position" value="{$product_cat.position}" size="5">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_max
{/translate}
</td>
<td width="65%">
<input type="text" name="product_cat_max" value="{$product_cat.max}" size="5">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_thumbnail
{/translate}
</td>
<td width="65%">
<input id="thumbnail1" type="file" name="upload_file1" size="38" {if $campaign_file1 == true}class="form_field_error"{/if}>
<img src="themes/{$THEME_NAME}/images/icons/picts_16.gif" onClick="previewImage(document.product_cat_view.upload_file1.value);">
{if $product_cat.thumbnail != ""}
<img title=Delete src="themes/{$THEME_NAME}/images/icons/del_16.gif" onClick="document.getElementById('delthumb').value = '1'; document.getElementById('form10').submit();"><br>
<br>
<img src="{$URL}{$smarty.const.URL_IMAGES}{$product_cat.thumbnail}">
{/if}
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_cat}
field_image
{/translate}
</td>
<td width="65%">
<input id="image" type="file" name="upload_file2" size="38" {if $campaign_file2 == true}class="form_field_error"{/if}>
<img src="themes/{$THEME_NAME}/images/icons/picts_16.gif" onClick="previewImage(document.product_cat_view.upload_file2.value);">
{if $product_cat.image != ""}
<img title=Delete src="themes/{$THEME_NAME}/images/icons/del_16.gif" onClick="document.getElementById('delimg').value = '1'; document.getElementById('form10').submit();"><br>
<br>
<img src="{$URL}{$smarty.const.URL_IMAGES}{$product_cat.image}">
{/if}
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
<td width="65%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp; </td>
<td align="right">
<input type="button" name="delete" value="{translate}delete{/translate}" class="form_button" onClick="delete_record('{$product_cat.id}','{$VAR.id}');">
</td>
</tr>
</table>
</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="53%"> <a href="javascript:showCatTranslations({$product_cat.id})">
{translate module=product_cat}
title_view_translations
{/translate}
</a> </td>
<td width="47%" valign="middle" align="right"> <a href="javascript:addCatTranslations({$product_cat.id})">
{translate module=product_cat}
title_add_translation
{/translate}
</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="product_cat:view">
<input type="hidden" name="product_cat_id" value="{$product_cat.id}">
<input type="hidden" name="do[]" value="product_cat:update">
<input type="hidden" name="id" value="{$VAR.id}">
<input type="hidden" id="delthumb" name="delthumb" value="0">
<input type="hidden" id="delimg" name="delimg" value="0">
</form>
<center>
<iframe name="iframeCat" id="iframeCat" style="border:0px; width:0px; height:0px;" scrolling="auto" ALLOWTRANSPARENCY="true" frameborder="0" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
</center>
<script language=javascript>
var CatId = '{$product_cat.id}';
</script>
{/foreach}
{literal}
<script language="JavaScript">
<!-- START
function showCatTranslations(id) {
showIFrame('iframeCat',getPageWidth(650),350,'?_page=core:search&_next_page_one=view&module=product_cat_translate&_escape=1&product_cat_translate_product_cat_id='+id);
}
function addCatTranslations(id) {
showIFrame('iframeCat',getPageWidth(650),350,'?_page=product_cat_translate:add&product_cat_translate_product_cat_id='+id);
}
showCatTranslations(CatId);
// END -->
</script>
{/literal}
function addCatTranslations(id) {
showIFrame('iframe',getPageWidth(650),350,'?_page=product_cat_translate:add&product_cat_translate_product_cat_id='+id);
}
showCatTranslations(CatId);
{/literal}
//-->
</script>
{/if}