Your EE module, plugin, and extension marketplace!
Trying to build a product comparison similar to big retail sites such as Best Buy or review sites such as CNET? The Compares plugin does the behind the scenes processing for your comparison page. Build a simple form with a table listing all of the availible items and a checkbox for comparison selection. Then submit that form to a results page which will utilze the Comparison plugin to crunch the info and return the resuts to be formated however you would like to display them.
Simple to use!
Build a form listing all of the items available for comparison and include the following checkbox input with each item so that it can be selected to compare:
<input type="checkbox" title="Select two or more items to be compared." value="{url_title}" name="products[]" />
Then build a template to display the comparison and wrap the formatting in the following tag pair:
{exp:comparisons:get parse="inward"}
{/exp:comparisons:get}
Set the POST target of the form in the first template to the comparison display template and you are all set.
View website for more detailed documentation: http://www.ee-addons.com/
Must edit group id in PHP file for current weblog group:
CP Home › Admin › Weblog Administration › Field Groups
View the link associated with "Edit Field Group" for the proper group ID.
Update line 43 in pi.comparisons.php with this group ID.
Example Form:
<form method="post" action="http://domain.com/compare_results">
<table>
<tbody>
{exp:weblog:entries weblog="weblog_name"}
<tr>
<td>{custom_field_1}</td>
<td>{custom_field_2}</td>
<td>{custom_field_3}</td>
<td><input type="checkbox" title="Select two or more guns to compare." value="{url_title}" name="products[]" /></td>
</tr>
{/exp:weblog:entries}
</tbody>
</table>
</form>
Example Results:
{exp:comparisons:get parse="inward"}
<div><!-- resultsColumn -->
<div>{custom_field_1}</div>
<div>{custom_field_2}</div>
<div>{custom_field_3}</div>
</div><!-- Close "resultsColumn" -->
{/exp:comparisons:get}