View Single Post
  #6  
Old January 15th, 2011, 06:52 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by ayorofrance View Post
Has the template code for the sorting template been updated recently?

Will I have to revert back to the 'old' code to use the auto-submit?

Are there any drawbacks to using the old code?
Hi

Yes, the template code has changed but it does exactly the same things as the old code. We just tried to simplify the code that you saw.

There are no drawbacks to using the old code. They do the same thing.

You will have to use the old code if you want to apply the auto submit modification for now. Here's the code in case anyone is looking for it:

Code:
<div class="dffltrs">
  <form method="get">  
    <span class="dflside">
      Products per page:
      <select name="ppp" class="dfppp">
        <option value="12"<?php if (@$_GET['ppp']=='12') {echo ' selected="selected"';}?>>12</option>
        <option value="24"<?php if (@$_GET['ppp']=='24') {echo ' selected="selected"';}?>>24</option>
        <option value="36"<?php if (@$_GET['ppp']=='36') {echo ' selected="selected"';}?>>36</option>
        <option value="48"<?php if (@$_GET['ppp']=='48') {echo ' selected="selected"';}?>>48</option>
      </select>
    </span>
    <span class="dfrside">
      Sort by:
      <select name="sort" class="dfsort">
        <option value="price"<?php if (@$_GET['sort']=='price') {echo ' selected="selected"';}?>>Price (low to high)</option>
        <option value="-price"<?php if (@$_GET['sort']=='-price') {echo ' selected="selected"';}?>>Price (high to low)</option>
        <option value="name"<?php if (@$_GET['sort']=='name') {echo ' selected="selected"';}?>>Product Name (a - z)</option>    
        <option value="-name"<?php if (@$_GET['sort']=='-name') {echo ' selected="selected"';}?>>Product Name (z - a)</option>    
      </select>
      <input type="submit" value="Go" class="dfsbmt" />
    </span>
    <div class="clearingdiv">&nbsp;</div>
  </form>
</div>