You are here:  » Search Results Grid Layout


Search Results Grid Layout

Submitted by support on Tue, 2011-10-11 11:07 in

Hi everyone,

Here's HTML templates for displaying search results in a grid layout:

wp-admin > Settings > PriceTapestry.org > HTML > Search Results

Before:

<div class='pto_search'>
<table><tr>

Each:

<td>
<h4><a href='%PRODUCT_URL%'>%PRODUCT_NAME%</a></h4>
%IF_IMAGE%
<img height='100' src='%IMAGE_URL%' /><br />
%ENDIF_IMAGE%
%IF_COMPARED%
  <em>from</em> %PRICE%
  <br />
  <a href='%PRODUCT_URL%'>Compare Prices</a>
%ELSE_COMPARED%
  %PRICE%
  <br />
  <a href='%PRODUCT_URL%'>More Information</a>
%ENDIF_COMPARED%
</td>
%IF_EVERY3%
</tr><tr>
%ENDIF_EVERY3%

After:

</tr></table></div>

When using a grid layout, it's best to use a $config_resultsPerPage setting that is a multiple of the number of columns, e.g. 12 if using a 3 column layout as above...

Submitted by Fuzzy on Sat, 2011-10-15 09:05

Thanks for this, looks great!

Submitted by iamrofe on Mon, 2012-01-23 15:15

I have applied this layout, however I would like to display 12 products instead of 10, have changed this in the config file however it is still displaying 10 products. Any help would be greatly appreciated :)

Submitted by support on Mon, 2012-01-23 15:25

Hi there,

Number of search results per page in the plugin is configured independently of config.php in the PriceTapestry installation. If you go to wp-admin > Settings > PriceTapestry.org and then scroll down to the External section you'll find the equivalent $config_resultsPerPage setting there...

Cheers,
David.
--
PriceTapestry.com

Submitted by brentmitchell on Thu, 2012-02-02 21:47

Hi David,

Looks great...is there a way to create an option on the page for the consumer to switch from list to grid view?

Submitted by brentmitchell on Fri, 2012-02-03 02:51

Hey David,

Is there a way to use an image where it says 'More Information'. I used to have that, but when I switched over to the grid layout, it went away...please let me know. Thanks!

Submitted by support on Fri, 2012-02-03 08:17

Hi Brent,

Sure - from wp-admin > Settings > PriceTapestry.org, scroll down to your Search Results / Each template and where you have:

<a href='%PRODUCT_URL%'>More Information</a>

...REPLACE with:

<a href='%PRODUCT_URL%'><img border='0' src='/images/moreinfo.gif' /></a>

Modify the image src as appropriate, don't forget to use an absolute path e.g. beginning in / so that the browser knows where to find the image regardless of where it is called from...

Cheers,
David.
--
PriceTapestry.com

Submitted by brentmitchell on Fri, 2012-02-03 17:50

Thanks David!