View Single Post
  #1  
Old 06-21-2005, 08:44 AM
 
sstillwell@aerostich.com sstillwell@aerostich.com is offline
 

eXpert
  
Join Date: Jun 2004
Location: Duluth, MN
Posts: 242
 

Default Variant chart in product description.

I've had several complaints from customers that they don't like to have to select the different options in the drop down box to see the different prices on products that have variants. Some also got mad that the price was different than what they originally saw (people don't pay attention).

So taking something we did with our last site, I made a chart for the variants.

So in skin1/customer/main/product.tpl add:
Code:
{if $variants} <table cellspacing="1" cellpadding="0" border="0" class="chart" width="75%"> <tr class="chart_head"> <td>{$lng.lbl_sku}</td> <td>{$lng.lbl_description}</td> <td>{$lng.lbl_our_price}</td> </tr> {section name=test loop=$variants} <tr class="{cycle values="chart_dark,chart_light"}"> <td>{$variants[test].productcode}</td> {foreach item=item key=key from=$variants[test].options} <td>{$item.option_name}</td> {/foreach} <td>${$variants[test].price}</td> </tr> {/section} </table> {/if}

Right before this section
Code:
<TABLE width="100%" cellpadding="0" cellspacing="0" border="0"> <TR><TD colspan="2"><FONT class="ProductDetailsTitle">{$lng.lbl_details}</FONT></TD></TR>

Then you just need to add this to the bottom of skin1/skin1.css and tweak the colors to your liking.
Code:
table.chart { background-color: black; color: black; } table.chart tr.chart_light td {background-color: #FFFBDC; padding: 1px 3px;} table.chart tr.chart_dark td {background-color: #CCCC99; padding: 1px 3px;}

An example can be see here
http://www.aerostich.com/product.php?productid=16376&cat=248&page=1

Use at your own risk, it works with my cart, but who knows what it will do to yours
__________________
No longer using Xcart, was good while it lasted.
Reply With Quote