This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/themes/default/blocks/product/details_wizard.tpl
2011-05-03 09:49:04 +10:00

188 lines
7.5 KiB
Smarty

{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{$method->exe($meth.0,'details')}
{if ($method->result == false) || ! $record}
{$block->display('core:method_error')}
{else}
<form id="view" method="post" action="" enctype="multipart/form-data">
{if $list->translate('product_translate','name,description_full','product_id',$record.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>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_heading_cart">
<tr valign="top">
<td style="width: 75%;">
{if $translate_product.name}
{$translate_product.name}
{else}
{$record.sku}
{/if}
</td>
<td style="width: 25%;" valign="middle" align="right">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td class="body">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body">
<tr valign="top">
<td>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td>
{if $record.thumbnail != ''}<img src="{$URL}{$smarty.const.URL_IMAGES}{$record.thumbnail}" alt="" hspace="5" style="border: 0px"/>{/if}
{$translate_product.description_full}
</td>
</tr>
</table>
</td>
</tr>
{if $record.prod_plugin}
<tr valign="top">
<td>{osb f=plugin type=product name=$record.prod_plugin_file name_prefix=order_ data=$record.prod_plugin_data}</td>
</tr>
{/if}
<tr valign="top">
<td>
{if $record.price_type == '1'}
{include file='file:ti_product-price_type-1.tpl'}
{elseif $record.price_type == '2'}
{include file='file:ti_product-price_type-2.tpl'}
{else}
{include file='file:ti_product-price_type-x.tpl'}
{/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'}
{include file='file:ti_product_attr-collect_type-0.tpl'}
{elseif $attr_arr.type == '1'}
{include file='file:ti_product_attr-collect_type-1.tpl'}
{elseif $attr_arr.type == '2'}
{include file='file:ti_product_attr-collect_type-2.tpl'}
{elseif $attr_arr.type == '3'}
{include file='file:ti_product_attr-collect_type-3.tpl'}
{/if}
{/foreach}
{/if}
{if $record.host}
<br/>
{include file='file:ti_product-host.tpl'}
{/if}
<script type="text/javascript" src="themes/default/blocks/product/product.js"></script>
<script type="text/javascript">
<!--
{literal}
function attrValidate(addtype) {
var val_arr = new Array(2);
var i=0;
switch (addtype) {
case 'login':
document.getElementById('login').style.display='block';
document.getElementById('input_login').name = '_login';
break;
case 'register':
default:
document.getElementById('login').style.display='none';
document.getElementById('input_login').name = 'xxx';
}
{/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);
}
//-->
</script>
{/literal}
{/if}
</td>
</tr>
<tr valign="top">
<td>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td><b>{t}Finalise Purchase{/t}</b></td>
</tr>
<tr valign="top" class="body">
<td>
{if $smarty.const.SESS_LOGGED != 1}
<input type="radio" id="checkout1" name="checkout" value="login" onclick="addCart('login','{$record.host}'); document.getElementById('checkout1').checked = false;"/> <a href="javascript:addCart('login','{$record.host}');">{t}Login to existing client account{/t}</a><br/>
<input type="radio" id="checkout2" name="checkout" value="register" onclick="addCart('register','{$record.host}'); document.getElementById('checkout2').checked = false;"/> <a href="javascript:addCart('register','{$record.host}');">{t}Register for new client account{/t}</a><br/>
{else}
<input type="radio" id="checkout" name="checkout" value="register" onclick="addCart('checkout','{$record.host}'); document.getElementById('checkout').checked = false;"> <a href="javascript:addCart('checkout','{$record.host}');">{t}Proceed to checkout{/t}</a>
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td>
<div id="login" style="display:none">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
<tr valign="top" class="body">
<td style="width: 15%;">{t}Username{/t}</td>
<td style="width: 85%;"><input type="text" id="wiz_username" name="_username"/></td>
</tr>
<tr valign="top" class="body">
<td style="width: 15%;">{t}Password{/t}</td>
<td style="width: 85%;"><input type="password" id="wiz_password" name="_password"/></td>
</tr>
<tr valign="top" class="body">
<td style="width: 15%;"><input type="hidden" id="input_login" name="_login" value="1"/></td>
<td style="width: 85%;"><a href="javascript:addCart('login','{$record.host}');" style="text-decoration: underline;"><b>{t}Login and review purchase{/t}</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>
<div>
<input type="hidden" id="page" name="_page" value=""/>
<input type="hidden" name="do[]" value="cart:add"/>
<input type="hidden" name="product_id" value="{$record.id}"/>
<input type="hidden" name="s" value="{$SESS}"/>
</div>
</form>