View Single Post
  #1  
Old 03-14-2013, 09:15 AM
 
MAPerformance MAPerformance is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 145
 

Default {if} {else} statement tweaking

I am using a {if} {else} statement to show or hide a Free Shipping graphic on certain items on our shop.

Code:
{if $product.price >= 99.99 && $product.productid ne 20786 && $product.productid ne 17302} <img src="image.jpg" /> {else} <img src="_spacer.gif"/> {/if}
This shows my free shipping graphic on items that are $99.99 or more, and shows a blank spacer image if it's less. The problem is I have a handful of items that don't qualify for free shipping even though they are over $99.99. You can see what I did do in the code there to account for those items, but I'm wondering of there's a shorter way of declaring the $productid of these exception items other than what I've already done?

Also, maybe this can be used as a reference for someone else looking to do this
__________________
www.maperformance.com

X-Cart Version: 4.4.3 Gold
Reply With Quote