title: Add additional labels (e.g. new, in stock, sale) in Magento theme
body: <p>I have a Magento store, using a template I purchased, I'd like to add additional product label prompts. For example, at the moment we have 'Sale' and 'New' as standard. But I'd like to add 'in stock' or anything else that might provide a call to action.</p>
  
  <p>Below is the 'labels.php' file which controls the labels (as far as I can tell). I wondered if I can add more lables to this perhaps after setting up a product attribute (e.g. in_stock YES/NO) to gain the additional labels.</p>
  
  <pre><code>&lt;?php
  
   class Infortis_Ultimo_Helper_Labels extends Mage_Core_Helper_Abstract
   {
  /**
   * Get product labels (HTML)
   *
   * @return string
   */
  public function getLabels($product)
  {
      $html = '';
  
      $isNew = false;
      if (Mage::getStoreConfig('ultimo/product_labels/new'))
      {   
          $isNew = $this-&gt;isNew($product);
      }
  
      $isSale = false;
      if (Mage::getStoreConfig('ultimo/product_labels/sale'))
      {
          $isSale = $this-&gt;isOnSale($product);
      }
  
      if ($isNew == true)
      {
          $html .= '&lt;span class="sticker-wrapper top-left"&gt;&lt;span class="sticker new"&gt;' . $this-&gt;__('New') . '&lt;/span&gt;&lt;/span&gt;';
      }
  
      if ($isSale == true)
      {
          $html .= '&lt;span class="sticker-wrapper top-right"&gt;&lt;span class="sticker sale"&gt;' . $this-&gt;__('Sale') . '&lt;/span&gt;&lt;/span&gt;';
      }
  
      return $html;
  }
  
  /**
   * Check if "new" label is enabled and if product is marked as "new"
   *
   * @return  bool
   */
  public function isNew($product)
  {
      return $this-&gt;_nowIsBetween($product-&gt;getData('news_from_date'), $product-&gt;getData('news_to_date'));
  }
  
  /**
   * Check if "sale" label is enabled and if product has special price
   *
   * @return  bool
   */
  public function isOnSale($product)
  {
      $specialPrice = number_format($product-&gt;getFinalPrice(), 2);
      $regularPrice = number_format($product-&gt;getPrice(), 2);
  
      if ($specialPrice != $regularPrice)
          return $this-&gt;_nowIsBetween($product-&gt;getData('special_from_date'), $product-&gt;getData('special_to_date'));
      else
          return false;
  }
  
  protected function _nowIsBetween($fromDate, $toDate)
  {
      if ($fromDate)
      {
          $fromDate = strtotime($fromDate);
          $toDate = strtotime($toDate);
          $now = strtotime(Mage::app()-&gt;getLocale()-&gt;date()-&gt;setTime('00:00:00')-&gt;toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
  
          if ($toDate)
          {
              if ($fromDate &lt;= $now &amp;&amp; $now &lt;= $toDate)
                  return true;
          }
          else
          {
              if ($fromDate &lt;= $now)
                  return true;
          }
      }
  
      return false;
  }
  }
  </code></pre>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thanks very much</p>