inTeL Posted September 1, 2008 Share Posted September 1, 2008 {if $product.gid!="1"}<img src="templates/{$template}/images/lin-img.jpg" /> {elseif $product.gid!="2"}<img src="templates/{$template}/images/win-img.jpg" /> {elseif $product.gid!="3"}<img src="templates/{$template}/images/radyo-img.jpg" /> {elseif $product.gid!="4"}<img src="templates/{$template}/images/lin-img.jpg" /> {elseif $product.gid!="5"}<img src="templates/{$template}/images/win-img.jpg" /> {elseif $product.gid!="6"}<img src="templates/{$template}/images/ded-tr-img.jpg" /> {elseif $product.gid!="7"}<img src="templates/{$template}/images/ded-eu-img.jpg" /> {elseif $product.gid!="8"}<img src="templates/{$template}/images/vps-tr-img.jpg" /> {else $product.gid!="9"}<img src="templates/{$template}/images/vps-eu-img.jpg" />{/if} this is my codes. i want to show different images at different group id example if i m displaying cart.php?gid=2 page (as linux Web hosting) i wanna see a linux image else i am displayin cart.php?gid=3 (as windows web hosting) i wanna see a windows image at package box in products area 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted September 1, 2008 Share Posted September 1, 2008 You code makes no sense Try {if $smarty.get.gid == '1'} You should be able to fill in the rest 0 Quote Link to comment Share on other sites More sharing options...
inTeL Posted September 1, 2008 Author Share Posted September 1, 2008 You code makes no senseTry {if $smarty.get.gid == '1'} You should be able to fill in the rest thank you sparky i love u Small Note: I'm Not A GAY 0 Quote Link to comment Share on other sites More sharing options...
DeanClinton Posted September 1, 2008 Share Posted September 1, 2008 Small Note: I'm Not A GAY What has it got anything to do with it? 0 Quote Link to comment Share on other sites More sharing options...
inTeL Posted September 1, 2008 Author Share Posted September 1, 2008 What has it got anything to do with it? so say for love ___________________________ Get a mini image at product box what u want. an example: at linux web hosting page; u will see a linux logo near product details at windows web hosting page; u will see a windows logo near product details which product if u want u can show own logo at product box 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted September 2, 2008 Share Posted September 2, 2008 Lets breakdown your first line so that you know what it does {if $product.gid!="1"} $product.gid is not a variable within the $ product array ($product is an array of all the products to be displayed). != means not equal to So if a variable that does not exist is not equal to 1 then (display your image). The image would ALWAYS display because the variable is empty and would never equal 1. Hope that helped to explain to you where you went wrong. Here is a couple of linux penguins for you 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted September 2, 2008 Share Posted September 2, 2008 Be careful with those penguins, Steve. they could be mis-interpreted!! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.