2009-08-03 04:10:16 +00:00
|
|
|
{assign var=meth value=':'|explode:$VAR._page}
|
|
|
|
<!-- {$meth.0}:{$meth.1} -->
|
|
|
|
|
|
|
|
{$method->exe($meth.0,$meth.1)}
|
2010-11-29 22:41:08 +00:00
|
|
|
{if ($method->result == false) || ! $record}
|
2009-08-03 04:10:16 +00:00
|
|
|
{$block->display('core:method_error')}
|
|
|
|
{else}
|
|
|
|
|
|
|
|
<form id="view" method="post" action="" enctype="multipart/form-data">
|
|
|
|
|
2010-11-29 22:41:08 +00:00
|
|
|
{if $list->translate('product_translate','name,description_full','product_id',$record.id,'translate_product')}{/if}
|
2009-08-03 04:10:16 +00:00
|
|
|
<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%;">
|
2010-11-29 22:41:08 +00:00
|
|
|
{if $translate_product.name}
|
|
|
|
{$translate_product.name}
|
2009-08-03 04:10:16 +00:00
|
|
|
{else}
|
2010-11-29 22:41:08 +00:00
|
|
|
{$record.sku}
|
2009-08-03 04:10:16 +00:00
|
|
|
{/if}
|
|
|
|
</td>
|
|
|
|
<td style="width: 25%;" valign="middle" align="right"> </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 align="left">
|
|
|
|
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
|
|
|
|
<tr valign="top" class="body">
|
2010-11-29 22:41:08 +00:00
|
|
|
<td>
|
|
|
|
{if $record.thumbnail != ''}<img src="{$URL}{$smarty.const.URL_IMAGES}{$record.thumbnail}" alt="" hspace="5" style="border: 0px"/>{/if}
|
2009-08-03 04:10:16 +00:00
|
|
|
{$translate_product.description_full}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2010-11-29 22:41:08 +00:00
|
|
|
{if $record.prod_plugin}
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">{osb f=plugin type=product name=$record.prod_plugin_file name_prefix=order_ data=$record.prod_plugin_data}</td>
|
|
|
|
</tr>
|
|
|
|
{/if}
|
2009-08-03 04:10:16 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">
|
|
|
|
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
|
|
|
|
<tr valign="top" class="body">
|
|
|
|
<td style="width: 50%;"><b>{osb f=tf field=sku}</b></td>
|
|
|
|
<td style="width: 50%;"><b>{t}Currency{/t}</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top" class="body">
|
2010-11-29 22:41:08 +00:00
|
|
|
<td style="width: 50%;">{$record.sku}</td>
|
2009-08-03 04:10:16 +00:00
|
|
|
<td style="width: 50%;" valign="middle">
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
<tr>
|
|
|
|
<td style="width: 25%;">
|
|
|
|
{$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="selected"{/if}>{$item.iso}</option>
|
|
|
|
{/foreach}
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
<td style="width: 75%;"><img src="themes/{$THEME_NAME}/images/currency/{$currency_thumbnail}.gif" alt="$" style="border: 0px;"/></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="body">
|
|
|
|
<tr valign="top" class="body">
|
|
|
|
<td style="width: 50%;"><b>{osb f=tf field=price_type}</b></td>
|
|
|
|
<td style="width: 50%;"><b>{osb f=tf field=taxable}</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
2010-11-29 22:41:08 +00:00
|
|
|
<td style="width: 50%;">{$list->menu_staticlist('pricetype','','',$record.price_type,'form_menu')}</td>
|
|
|
|
<td style="width: 50%;">{$list->bool('',$record.taxable,'form_field')}</td>
|
2009-08-03 04:10:16 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2010-11-29 22:41:08 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">
|
|
|
|
{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}
|
2009-08-03 04:10:16 +00:00
|
|
|
{/if}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2010-11-29 22:41:08 +00:00
|
|
|
{if $record.cart_multiple}
|
2009-08-03 04:10:16 +00:00
|
|
|
<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}
|
|
|
|
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<input type="hidden" id="page" name="_page" value=""/>
|
|
|
|
<input type="hidden" name="do[]" value="cart:add"/>
|
2010-11-29 22:41:08 +00:00
|
|
|
<input type="hidden" name="product_id" value="{$record.id}"/>
|
2009-08-03 04:10:16 +00:00
|
|
|
<input type="hidden" name="s" value="{$SESS}"/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
<p style="text-align: center;">
|
2010-11-29 22:41:08 +00:00
|
|
|
<input type="submit" onclick="addCart('cart','{$record.host}')" name="cart2" value="{t}Add to Cart{/t}" class="form_button"/>
|
|
|
|
<input type="submit" onclick="addCart('checkout','{$record.host}')" name="checkout2" value="{t}Add to Cart & Checkout{/t}" class="form_button"/>
|
2008-11-26 22:50:40 +00:00
|
|
|
</p>
|
2010-11-29 22:41:08 +00:00
|
|
|
|
|
|
|
<script type="text/javascript" src="themes/default/blocks/product/product.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
<!-- START
|
|
|
|
{literal}
|
|
|
|
function CurrencyChange(obj) {
|
|
|
|
{/literal}
|
|
|
|
document.location='?_page=product:details&id={$VAR.id}&cyid='+obj.value;
|
|
|
|
{literal}
|
|
|
|
}
|
|
|
|
|
|
|
|
// @todo this function is mostly duplicated in admin_details.tpl & details_wizard.tpl
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
{/literal}
|
|
|
|
//-->
|
|
|
|
</script>
|