View Single Post
  #1  
Old 07-01-2003, 12:52 PM
 
leadtrum leadtrum is offline
 

Member
  
Join Date: May 2003
Posts: 14
 

Default view details rollover on products.tpl

okay first...here's a test of what i want:
http://www.aerotrends.com/store/rollover.html

basically what i was looking to do was to have this 'view details' rollover appear when the user rolled over the that <tr>. well what you people already know is that you can't do a rollover in a repeating section because the <img name=""> will repeat for every new row. so basically say you name your value "pic" then for each new row it'll be "pic".

my idea was to use the smarty cycle tag after the name to give it like a numeric value.

for example

[img]pictures.jpg[/img]

problem is that its not cylcing at all, it just stays at one. I know there's gotta be a better way to do it then using the cycle tag. Is there a way that I can reference the number of the row created by the section loop?

here's the code i have so far:

product_thumbnail.tpl (param09 is my thumbnail field)

Code:
{* $Id: product_thumbnail.tpl,v 1.8 2003/04/24 09:50:33 svowl Exp $ *} {if $config.Appearance.show_thumbnails eq "Y"} {if $products[product].param09 ne ""}[img]http://www.aerotrends.com/{$products[product].param09}[/img]{/if} {/if} {if $products[product].param09 eq ""} [img]http://www.aerotrends.com/store/images/noimage.gif[/img]{/if}

customer/main/products.tpl
Code:
{* $Id: products.tpl,v 1.33 2003/04/24 09:50:33 svowl Exp $ *} {if $usertype eq "C" and $config.Appearance.products_per_row ne "" and $config.Appearance.products_per_row gt 0 and $config.Appearance.products_per_row lt 4 and ($featured eq "Y" or $config.Appearance.featured_only_multicolumn eq "N")} {include file="customer/main/products_t.tpl" products=$products} {else} {if $products} {section name=product loop=$products} <table border=0 width=100%> <tr bgcolor="{cycle values="#F7F7F7,#FFFFFF"}"><td width=90 align=center valign=top bgcolor="#FFFFFF"> <a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product} [img]http://www.aerotrends.com/store/images/main/seedetails.gif[/img]</a></td> <td valign=top> {$products[product].product}</font> <font size=1 color=#666666>{$products[product].param02}</font> <font size=1> {$products[product].descr|truncate:300:"...":true} </font> <hr size=1 noshade width=100% align=left> {if $products[product].param01 ne ""} <font size=1 color="66666">Material: {$products[product].param01} {/if} {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].price ne 0} {if $products[product].list_price gt 0} {math equation="100-(price/lprice)*100" price=$products[product].price lprice=$products[product].list_price format="%d" assign=discount} <font class=MarketPrice>{$lng.lbl_market_price}: <s> {include file="currency.tpl" value=$products[product].list_price} </s></font> {/if} <font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].list_price gt 0}, save {$discount}%{/if}{if $config.Taxes.use_vat eq "Y" and $products[product].vat gt "0"}, {$lng.lbl_including_vat} {$products[product].vat}%{/if} {else} <font class=ProductPrice>{$lng.lbl_enter_your_price}</font> {/if} {/if} {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} </td></tr> </table> [img]images/viewdetails_off.gif[/img] {/section} {else} {$lng.lbl_no_products_found} {/if} {/if}
Reply With Quote