Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Product list with comparison set for each product (/showthread.php?t=8808)

theast March 16th, 2013 05:57 AM

Product list with comparison set for each product

Im trying to list all my products on the store's frontpage, and each product is supposted to have a comparison set. Is this possible?

theast March 16th, 2013 06:27 AM <- Has exactly what im looking for. Im almost looking for a rip-off about how he presents his products

Eric March 16th, 2013 09:01 AM


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:

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%">
      <td>[product.currency mode='sign'][product.price]</td>
      <td><a href="[product.url]" class="dfbutton dforange dflarge" rel="nofollow">Buy Now</a></td>

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">
  <div class="t3 col1">
    <div class="bdr">
      <div class="lc">
        <div class="thmb"><a href="[]" title="[]">[product.image tag='1']</a></div>
        <div class="prc">[product.currency mode='sign'][product.price]</div>
      <div class="rc">
        <h2><a href="[]" title="[]">[]</a></h2>
        <div class="desc"><?php echo datafeedr_tag('compset?p='.$product->id); ?></div>
      <div class="clearingdiv"> </div>
  <div class="clearingdiv"> </div>

That worked for me.


theast March 16th, 2013 09:44 AM

Thanks! It seems to work, only one problem.. The code adds <div>
<div class="modwrp col1">
<div class="modcont" >
<div class="clearingdiv">&nbsp;</div>
<div class="clearingdiv">&nbsp;</div>

Everywhere, any idea how to get rid off it?

Eric March 16th, 2013 09:50 AM


Ah yes, forgot that part.

Go here: The Factory > Your Store > VIEWS > CUSTOM VIEWS > compset > View menu > View Properties and check the Don't use layout for this view checkbox.

Save and then click the [Update Settings Only] button.


theast March 16th, 2013 09:53 AM

And another thing, i dont want to loop all products, because then ill get lots of duplicates. I only want to show the compsets once. Any solution :D?

Eric March 16th, 2013 10:12 AM


Yes, go here: The Factory > Your Store > VIEWS > STORE FRONT PAGE > Default > Product list module > Settings ()

Select Use custom query and in the Custom query string field put: compset_status=2


theast March 16th, 2013 10:24 AM

Thanks! You're awsome.. :D

Eric March 16th, 2013 10:28 AM

You're welcome.

theast March 16th, 2013 01:16 PM


I have another question.. On my category page, how do i show only the products in that category? Atm all my products shows up on the category page?

theast March 16th, 2013 01:20 PM

I use custom query :)

Eric March 16th, 2013 02:11 PM


That's not quite possible... If you have just a few products in a category you could do what I mentioned here: /show...3875#post33875

But it's not possible to do what you did on the store's front page on your category pages. It's an issue with pagination. You can get the page 1 to display but it fails when navigating to page 2, 3, etc...


All times are GMT -5. The time now is 12:57 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.