Skip to content

I Want My Sale and Featured Products To Display Differently. Is This Possible?

Yes. The plugin allows you to check if the following fields are On:

  • hasshippingcalculation
  • istaxable
  • isfeaturedproduct
  • isdiscountenabled
  • isvalid
  • usesaleprice

This enables you to insert HTML into the Product Detail Format or Product List Item Format fields only if those fields are On.

The command format is -


#if(usesaleprice|<div class='saleitem'></div>)

The above will render the HTML code <div class='saleitem'></div> only if the Use Sale Price field is checked in

#if(isfeaturedproduct|<div class='featureitem'></div>)

The above will render the HTML code <div class='featureitem'></div> only if the Featured Product field is checked in

For example, I want to insert this HTML - <div class='saleitem'></div> before the product details but only on the items that I have marked Use Sale Price in  I would insert the following into the Product List Item Format

<div class="product">
     #if(usesaleprice|<div class='saleitem'></div>)
     #if(isfeaturedproduct|<div class='featureitem'></div>)
     <div class="col1">
          <a href="/store/#ProductHyphenName">#ProductImage</a>
     <div class="col2">
          <span class="product_name"><a href="/store/#ProductHyphenName">#ProductName</a></span>
          <span class="product_details">
               <span class="description">#ShortDescription</span>
               <span class="sku">#ProductSku</span>
               <span class="price">#ProductPrice</span>
               <span class="buy-now">#BuyNow</span>
          <div class="clear"> </div>
     <div class="clear"> </div>

A live example of this code in action can be found at

Feedback and Knowledge Base