[ic] show hyperlink only when there are crossproducts

Marty Tennison marty at sediva.com
Mon Dec 5 18:57:58 EST 2005


Eric Bont wrote:
> 
>>> On my resultpage I show a list with all selected products 
>>> (comment/SKU/image). Only when a product has some crossproducts I 
>>> want to show also a hyperlink to the flypage of this product. On this 
>>> flypage you can see all connected crossproducts.
>>>
>>> <a href="xxxx/cgi-bin/xxx/[item-code]">More products</a>
>>>
>>> On my resultpage I want to show above hyperlink only when there are 
>>> crossproducts for a product. If there are no crossproducts the 
>>> hyperlink should not be visible. Does anyone know how I can do this?
> 
>> That doesn't sound like a big problem. Where do you store the 
>> crossproducts ?
>>
>> Bye
>>     Racke
> 
> All products (also the crossed products) are in the table 'products'. 
> The connection between a product and the crossed products is in the 
> merchandising table, field cross_sell
> 
> Eric

If you have this line

[set cross_codes][item-data merchandising cross_sell][/set]

in your flypage.html file, you can test it like this

[if !scratch cross_codes]
  no cross codes found
[else]
  cross codes found
[/else]
[/if]

You can, of course, leave out the [else] statement.

You can also check to see if a field in your database has data like this 
(this example assumes you are within a [fly-list][/fly-list] block.

[if-item-data merchandising cross_sell]
  data found
[else]
  no data found
[else]
[/if]

Again, the [else] is optional.


-- 
-  - -- ----  ---------------------------- --- -- -   -
Marty Tennison
-  -- --- --------------------------------------- --- --


More information about the interchange-users mailing list