[ic] simple --if product is varient-- on flypage question

Peter peter at pajamian.dhs.org
Fri Oct 10 22:58:50 UTC 2008

On 10/10/2008 10:22 AM, Thomas J.M. Burton wrote:
> Peter wrote:
>> [if-item-data products sku]
>>     This is a real sku.
>> [else]
>>     This is a variant.
>> [/else][/if-item-data]
>> Peter
> Rather than checking for the sku in the products table, what about 
> checking for the "code" field (the variant table's key)? Since the 
> products table doesn't have a field named "code", its presence would 
> indicate the product is in the variants table without the extra db hit 
> from using the if-item-data method.
> [if-item-field code]
>     Code field is present, this is in the variants table.
> [else]
>     No code field, this is in the products table.
> [/else]
> [/if-item-field]
> I haven't thoroughly tested this, so I'm not entirely sure if it will work.

I think sku may get duplicated to code internally, so I'm not sure if it 
will work or not without testing.

> Also, the catalog in which I did a little testing gave me a "sorry, we 
> couldn't find that" message when I tried to access a page for a variant 
> item. You might need to tweak some config settings in order for things 
> to work the way you want to.

You probably need to add variants to the ProductFiles directive in 


More information about the interchange-users mailing list