This is relatively simple, but a bit tricky until you get your head around what's going on. I would rate this solution as a difficulty level "4" on a scale of 1-10
The idea is to use Extra Fields to tell xcart that there is a size chart -- but only if the product has a size chart. The size chart will be the same for all products, yes?
1. Enable extra fields
2. In extra fields module options, make sure "Display default values in all extra fields for which non-default values have not been defined:" is UNCHECKED
3. Go to Extra Fields. Define an extra field. Call it, "size_chart"
4. Open file: skin1/modules/Extra_Fields/product.tpl
FIND:
Code:
{section name=field loop=$extra_fields}
{if $extra_fields[field].active eq "Y" && $extra_fields[field].field_value}
<tr>
<td width="30%">{$extra_fields[field].field}</td>
<td>{$extra_fields[field].field_value}</td>
</tr>
{/if}
{/section}
REPLACE WITH:
Code:
{section name=field loop=$extra_fields}
{* mod to only show the size chart if the product has one *}
{if $extra_fields[field].field eq "size_chart"}
{if $extra_fields[field].field_value ne ""}
<tr>
{* if you want to be tricky -- use a javascript popup here *}
<td><a href="/path-to/size_chart.html" >Size Chart? Click Here!</a></td>
</tr>
{/if}
{else}
{* END mod to only show the size chart if the product has one *}
{if $extra_fields[field].active eq "Y" && $extra_fields[field].field_value}
<tr>
<td width="30%">{$extra_fields[field].field}</td>
<td>{$extra_fields[field].field_value}</td>
</tr>
{/if}
{/if} {* added for the size chart mod *}
{/section}
Now, do a bulk edit of your products -- if it wants to display a size chart, put a Y in the size chart field. Otherwise, leave empty.
Adjust the path to the html link in the code you just replaced...
That's all there is to it.
Not for a true beginner, but if you have any smarty experience, this is a good and relatively easy way to accomplish your goal...
For extra credit, instead of using a html link, use Thickbox or any cool image or iFrame popup, and integrate your size chart using a cool js popup of some kind.
BUT -- the code to tell xcart if the product has a size chart or not is still the same...
I hope this helps.
Jeremy