View Single Post
  #3  
Old March 16th, 2013, 09:01 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Welcome to the forums!

Yes, this is possible. First you need to create a comparison set for each of your products. Here's how to do that: http://www.datafeedr.com/videos/?vid...rc=yt#videotop

Then you need to create a new custom view with the name compset. You can do that here: The Factory > Your Store > VIEWS > CUSTOM VIEWS > Add a new view.

In that new compset view add a Comparison set module to the page and add the following code to the template area () of the module:

HTML Code:
<table width="100%">
  [compset.each]
    <tr>
      <td>[product.merchant_logo]</td>
      <td>[product.currency mode='sign'][product.price]</td>
      <td><a href="[product.url]" class="dfbutton dforange dflarge" rel="nofollow">Buy Now</a></td>
    </tr>
  [/compset.each]
</table>
Then go back to your store's front page view: The Factory > Your Store > VIEWS > STORE FRONT PAGE > Default > Product list module and insert the following code where you want your comparison set to appear:

PHP Code:
<?php echo datafeedr_tag('compset?p='.$product->id); ?>
In my example, to get a ballpark layout like the one you linked to, my Product list module on my Store's Front Page view looks like this:

HTML Code:
<div class="pl">
  [product.each]
  <div class="t3 col1">
    <div class="bdr">
      <div class="lc">
        <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
        <div class="prc">[product.currency mode='sign'][product.price]</div>
      </div>
      <div class="rc">
        <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
        <div class="desc"><?php echo datafeedr_tag('compset?p='.$product->id); ?></div>
      </div>
      <div class="clearingdiv"> </div>
    </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div>
That worked for me.

Eric