Thread: Sorting Feature
View Single Post
  #7  
Old August 15th, 2012, 07:58 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

There are a couple of problems. First, here's your code for Metal Types:

HTML Code:
<ul>
                 <?php if                  (@$_GET['Metal Type']) { ?>
                  <li><a                  href="[server.url                  type='fullpage' query='-Metal Type']">[X]                  Remove Metal Type filter</a></li>
                 <?php } else { ?>
                 
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=Platinum']">Platinum</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=18K White                  Gold']">18K White Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=18K Yellow                  Gold']">18K Yellow Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=18K Rose                  Gold']">18K Rose Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=18K 2Tone                  Gold']">18K 2Tone Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=14K White                  Gold']">14K White Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=14K Yellow                  Gold']">14K Yellow Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=14K Rose                  Gold']">14K Rose Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=14K 2Tone                  Gold']">14K 2Tone Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=10K White                  Gold']">10K White Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=10K Yellow                  Gold']">10K Yellow Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=10K Rose                  Gold']">10K Rose Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=10K 2Tone                  Gold']">10K 2Tone Gold</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=Sterling                  Silver']">Sterling Silver</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=Palladium']">Palladium</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=Titanium']">Tatinum</a></li>
                 <li><a href="[server.url                  type='fullpage' query='Metal Type=Tungsten']">Tungsten</a></li>
                 
                 <?php } ?>
                 </ul>
The first problem is what I mentioned in post #2 of this thread and that is merchant's don't provide characteristics of their products in specific data feed fields such as "metal type" or "carat". So doing something like the following will never work:

query='Metal Type=Titanium'

You would be better off doing:

word='Titanium'

Secondly, your code has many spaces in the code. For example, you have this:

Code:
query='Metal Type=14K Yellow                  Gold'
You can't have all of the space. That will severely mess up the query.

To rewrite that correctly using the proper code and spacing it would look like this:

Code:
query='word=14K Yellow Gold'
Same goes for all of your other filters.

Eric