View Single Post
  #6  
Old 01-11-2004, 08:45 PM
 
rackit rackit is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 31
 

Default

Good Idea. I figured out that the xcart_product_links table would delete an upselling link if the number did not correspond to an actual product. To remedy this, I created a new product with the "Not Available" option enabled. I then used a similar format as before using the product number of this "invisible". The invisible product's number was "77298" so the code looked like the following:
Code:
{if $product_links[cat_num].productid eq "77298"} <td width=1%> </td> <td width=99%> <a href="home.php?cat=999" target=_blank> My Custom Category Title </a> {else} <td width=1%>#{$product_links[cat_num].productid}</td> <td width=99%> <a href="product.php?productid={ $product_links[cat_num].productid }" target=_blank> { $product_links[cat_num].product|escape} </a> {/if}

999 being a generic number for the category I need to go to. It's a bit sloppy, but it works. The application for this is pretty wide as the link can take you to any place that is convenient for the product (even outside of your own site). This works a lot better than my previous direction too because there is no need to edit the database. The upselling link can be created using the normal method.
Reply With Quote