View Single Post
  #33  
Old 07-01-2006, 05:13 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

I have started trying to get this to work for 4.1.x and have managed to display one column of variants (colors only). Can anyone help me to: 1. Allow for 2 or 3 columns and 2. Display only available color swatches/names?
Code:
{capture name=dialog} {foreach from=$product_options item=v} {assign var="x" value="product_options[`$v.classid`]"} {/foreach} <table><tr> {foreach from=$v.options item=o} <td background="{$xcart_web_dir}images/S/{$product.manufacturer}_{$o.option_name|replace:" ":""|replace:"/":""}.gif">[img]{$ImagesDir}/spacer.gif[/img]</td> <td>{$o.option_name}</td></tr> {/foreach} </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_color_chart content=$smarty.capture.dialog extra='width="100%"'}
With the current 4.1.x variant images, it's strange to not see an X-Cart coded swatch image display. I have used the manufacturers and the option name to get a static image to be used as a background, but there must be a more professional method to do this. Ideas?

My mod has a directory in the images dir. called "S" and the images are named "Brand_ColorTitle.gif".

Thank for helping me to develop this intermediary solution.

- Mike
__________________
4.1.9
Reply With Quote