<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>ProductCart Shopping Cart Software Forums : Sorting by custom fields</title>
  <link>https://forum.productcart.com/</link>
  <description><![CDATA[This is an XML content feed of; ProductCart Shopping Cart Software Forums : Customizing ProductCart : Sorting by custom fields]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 11 Apr 2026 10:48:09 +0000</pubDate>
  <lastBuildDate>Thu, 21 Dec 2006 21:46:35 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.productcart.com/RSS_post_feed.asp?TID=565</WebWizForums:feedURL>
  <image>
   <title><![CDATA[ProductCart Shopping Cart Software Forums]]></title>
   <url>https://forum.productcart.com/forum_images/pc_logo_50.png</url>
   <link>https://forum.productcart.com/</link>
  </image>
  <item>
   <title><![CDATA[Sorting by custom fields : This will be tough because each...]]></title>
   <link>https://forum.productcart.com/sorting-by-custom-fields_topic565_post1661.html#1661</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forum.productcart.com/member_profile.asp?PF=77">netprofits</a><br /><strong>Subject:</strong> 565<br /><strong>Posted:</strong> 21-December-2006 at 9:46pm<br /><br /><P>This will be tough because each product can actually have up to 3 custom fields. The custom1, custom2 and custom3 fields only hold the record # pointing back to the customfields table. The content1, content2 and content3 fields in the products table actually hold the values that you probably want to sort on.</P><P>If you only have one custom field per product then you could try sorting on:<BR>"products.custom1, products.content1". But this will sort by the custom field record # then the custom field values. If you only have one custom altogether then you can just do the sort on "products.content1".</P><P>If you actually want to sort by the real custom field names you would need to modify the whole SQL statement to join the customfields table. That could cause your searches to slow down. I would recommend an&nbsp;outer join so you don't&nbsp;lose records that have no custom field values.</P>]]>
   </description>
   <pubDate>Thu, 21 Dec 2006 21:46:35 +0000</pubDate>
   <guid isPermaLink="true">https://forum.productcart.com/sorting-by-custom-fields_topic565_post1661.html#1661</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting by custom fields :  Is there a way to sort by a...]]></title>
   <link>https://forum.productcart.com/sorting-by-custom-fields_topic565_post1660.html#1660</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forum.productcart.com/member_profile.asp?PF=398">sdesantis</a><br /><strong>Subject:</strong> 565<br /><strong>Posted:</strong> 21-December-2006 at 5:53pm<br /><br /><br>Is there a way to sort by a customfield's data.&nbsp; I'm setting up some links as predefined searches and I would like the order to go according to the customfield data.<br><br>I feel like creating another case in this snippet from showsearchresults.asp would work...&nbsp; but... what would the syntax be?<br><br>if strORD&lt;&gt;"" then<br>&nbsp;&nbsp;&nbsp; Select Case StrORD<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Case "1": strORD1="products.idproduct ASC"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Case "2": strORD1="products.sku ASC"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Case "3": strORD1="products.description ASC"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Case "4": strORD1="products.price ASC"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Case "5": strORD1="products.price DESC"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span style="font-weight: bold;"> Case "6": strORD1="products.custom1 DESC"</span><br>&nbsp;&nbsp;&nbsp; End Select<br>Else<br>&nbsp;&nbsp;&nbsp; strORD="1"<br>&nbsp;&nbsp;&nbsp; strORD1="products.idproduct ASC"<br>End If<br><br>--------<br>Any guidance would be appreciated.<br><br>thanks, <br><br>sean<br><span style="font-size:10px"><br /><br />Edited by sdesantis - 21-December-2006 at 5:54pm</span>]]>
   </description>
   <pubDate>Thu, 21 Dec 2006 17:53:50 +0000</pubDate>
   <guid isPermaLink="true">https://forum.productcart.com/sorting-by-custom-fields_topic565_post1660.html#1660</guid>
  </item> 
 </channel>
</rss>