Hi there all,
I'm trying to get my store working in the 4.4 version (haven't updated my signature - this is still a work in progress). I saw a thread that worked in a previous version to show the variants as a static table above the product details. I'm using the following code and getting basically a blank table - is it a simple syntax issue? This is editing the product_details.tpl and came from this thread:
http://forum.x-cart.com/showthread.php?t=14705&highlight=show+all+variants +at+once
Thanks!
Code:
{* Determine if product has variants *}
{if $variants}
<table cellspacing="1" cellpadding="0" border="0" class="chart" width="100%">
{* Build table header *}
<tr class="chart_head">
<td>SKU</td>
{* Loop to handle multiple variant names *}
{foreach from=$product_options item=v}
{if $v.is_modifier eq ''}<TD>{if $usertype eq "A"}{$v.class}{else}{$v.classtext|default:$v.class}{/if}</TD>{/if}
{/foreach}
<td>Qty.</td>
<td>Price</td>
</tr>
{* Build table rows *}
{section name=test loop=$variants}
<tr class="{cycle values="chart_dark,chart_light"}">
<td>{$variants[test].productcode}</td>
{* Loop to handle multiple variants *}
{foreach name=foo item=item key=key from=$variants[test].options}
<td>{$item.option_name}</td>
{/foreach}
<td>{if $JIT eq "yes"}Unlimited{else}{if $variants[test].avail < 1}0{else}{$variants[test].avail}{/if}{/if}</td>
<td>${$variants[test].price}</td>
</tr>
{/section}
</table>
{/if}