<?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 : displaying featured items &#111;n an html page</title>
  <link>https://forum.productcart.com/</link>
  <description><![CDATA[This is an XML content feed of; ProductCart Shopping Cart Software Forums : Customizing ProductCart : displaying featured items &#111;n an html page]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 11 Apr 2026 20:36:36 +0000</pubDate>
  <lastBuildDate>Fri, 13 Jul 2007 15:39:27 +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=965</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[displaying featured items &#111;n an html page : Hello: I modified Dan Tang&amp;#039;s...]]></title>
   <link>https://forum.productcart.com/displaying-featured-items-on-an-html-page_topic965_post2773.html#2773</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forum.productcart.com/member_profile.asp?PF=514">mrondael</a><br /><strong>Subject:</strong> 965<br /><strong>Posted:</strong> 13-July-2007 at 3:39pm<br /><br /><P>Hello:</P><P>I modified Dan Tang's code snippet so that it displays horizontally, but I'd like to be able to display in a column/row format, say 4 wide by 8 rows or any configuration.</P><P>here is the code...</P><P>&lt;%<BR>'This file is a modified version of code submitted to the ProductCart Developer's Corner by Dan Tang - <A href="mailto:sales@dmn.com.au" target="_blank">sales@dmn.com.au</A><BR>'To submit your custom ProductCart code to Early Impact, e-mail us at <A href="mailto:marketing@earlyimpact.com" target="_blank">marketing@earlyimpact.com</A> and we will be happy to feature the code on the ProductCart developers' corner located at <A href="http://www.earlyimpact.com/productcart/support/developers.asp" target="_blank"> http://www.earlyimpact.com/productcart/support/developers.as p</A><BR>%&gt;<BR>&lt;% response.Buffer=true %&gt;<BR>&lt;!--#include file="../includes/settings.asp"--&gt;<BR>&lt;!--#include file="../includes/storeconstants.asp"--&gt; <BR>&lt;!--#include file="../includes/opendb.asp"--&gt;<BR>&lt;!--#include file="../includes/languages.asp"--&gt; <BR>&lt;!--#include file="../includes/currencyformatinc.asp"--&gt; <BR>&lt;% <BR>function preparemsg(what)<BR>&nbsp;a=what<BR>&nbsp;a=replace(a,"\","\\")<BR>&nbsp;a=replace(a,"/","\/")<BR>&nbsp;a=replace(a,vbclrf,"\n")<BR>&nbsp;a=replace(a,chr(34),"\"&amp;chr(34))<BR>&nbsp;a=replace(a,"'","\'")<BR>&nbsp;a="document.write('"&amp;a&amp;"');"<BR>&nbsp;preparemsg=a<BR>end function</P><P>on error resume next <BR>'Check to see if store has been turned off by admin, then display message<BR>Dim mySQL, conntemp, rs<BR>call openDb()</P><P>'select products that are flagged as featured items for the homepage<BR>mySQL="SELECT sku,idProduct, description, serviceSpec, details, price, smallImageUrl FROM products WHERE showInHome=-1 AND active=-1"</P><P>set rs=conntemp.execute(mySQL)</P><P>if err.number &lt;&gt; 0 then<BR>&nbsp;call closeDb()<BR>&nbsp; &nbsp;Response.Write "No featured product available"<BR>&nbsp;response.end <BR>end if</P><P>if rs.eof then<BR>&nbsp;call closeDb()<BR>&nbsp; &nbsp;Response.Write "No featured product available"<BR>&nbsp;response.end <BR>end if<BR>Dim iAddDefaultPrice<BR>DIM Html<BR>i=0<BR>Html=""</P><P>URL="/ProductCart/Pc/" 'edit path to the PC folder as needed<BR>do while not rs.eof and i&lt;8&nbsp; 'change this number to return a different amount<BR>&nbsp;iAddDefaultPrice=rs("price")<BR>&nbsp;&nbsp;if rs("serviceSpec") then<BR>&nbsp;&nbsp;mySQL="SELECT categories.categoryDesc, products.description, configSpec_products.configProductCategory, configSpec_products.price, configSpec_products.Wprice, categories_products.idCategory, categories_products.idProduct, products.weight FROM categories, products, categories_products INNER JOIN configSpec_products ON  categories_products.idCategory=configSpec_products.configPro ductCategory WHERE  (((configSpec_products.specProduct)="&amp;rs("idProduct")&am p;") AND ((configSpec_products.configProduct)=&#091;categories_products&#093;.&#091;idproduct&#093;) AND ((categories_products.idCategory)=&#091;categories&#093;.&#091;idcategory&#093;) AND ((categories_products.idProduct)=&#091;products&#093;.&#091;idproduct&#093;) AND ((configSpec_products.cdefault)=1)) ORDER BY configSpec_products.catSort, categories.idCategory, configSpec_products.prdSort;"<BR>&nbsp;&nbsp;set rsSSObj=conntemp.execute(mySQL)<BR>&nbsp;&nbsp;if NOT rsSSobj.eof then <BR>&nbsp;&nbsp;&nbsp;do until rsSSobj.eof<BR> &nbsp;&nbsp;&nbsp;&nbsp;iAddDefaultPrice=Cdbl(iAddDefaultPri ce+Cdbl(rsSSobj("price")))<BR>&nbsp;&nbsp;&nbsp;rsSSobj.moveNext<BR>&nbsp;&nbsp;&nbsp;loop<BR>&nbsp;&nbsp;&nbsp;set rsSSobj=nothing<BR>&nbsp;&nbsp;end if<BR>&nbsp;end if<BR>&nbsp;Html=Html &amp; "&lt;td width=25 rowspan=2 align=center&gt;&lt;a href=""" &amp; URL &amp; "viewprd.asp?idproduct=" &amp; rs("idProduct") &amp; """&gt;&lt;img align=left border=0 width=50&nbsp; src=" &amp; URL &amp; "Catalog/" &amp; rs("smallImageUrl") &amp; "&gt;&lt;/a&gt;&lt;/td&gt;&lt;td align=left&gt;&lt;font face=""" &amp; FFType &amp; """ color=""" &amp; FColor &amp; """ size=""1""&gt;&lt;a href=""" &amp; URL &amp; "viewprd.asp?idproduct=" &amp; rs("idProduct") &amp; """&gt;" &amp; rs("sku") &amp; "&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;font face=""" &amp; FFType &amp; """ color=""" &amp; FColor &amp; """ size=""2""&gt;"&nbsp; &amp; rs("Description") &amp; "&lt;/font&gt;&lt;/td&gt;" <BR>&nbsp;If rs("SmallImageUrl")&lt;&gt;"no_image.gif" and Trim(rs("SmallImageUrl"))&lt;&gt;"" then<BR>&nbsp;&nbsp;Html=Html &amp; "&lt;td&gt;&lt;font face=""" &amp; FFType &amp; """ color=""" &amp; FColor &amp; """ size=""2""&gt;&lt;b&gt;" &amp; FormatCurrency(iAddDefaultPrice) &amp; "&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&amp;nbsp;&lt;/td&gt;"<BR>&nbsp;Else<BR>&nbsp;&nbsp;Html=Html &amp; "&lt;td colspan=2&gt;&lt;font face=""" &amp; FFType &amp; """ color=""" &amp; FColor &amp; """ size=""2""&gt;"&nbsp; &amp; rs("Description") &amp; "&lt;/font&gt;&lt;br&gt;&amp;nbsp;&lt;/td&gt;"<BR>&nbsp;End If<BR>&nbsp;i=i+1<BR>&nbsp;rs.movenext<BR>loop </P><P>call closeDb()<BR>html= "&lt;table border=0 cellpadding=2 cellspacing=0&gt;" &amp; "&lt;tr&gt;" &amp; Html &amp; "&lt;/tr&gt;" &amp;&nbsp; "&lt;tr&gt;&lt;td colspan=2 align=right&gt;&lt;font face=""" &amp; FFType &amp; """ color=""" &amp; FColor &amp; """ size=""2""&gt;&lt;a href=""" &amp; URL &amp; "ViewSpc.asp""&gt;Store  Specials...&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt; /table&gt;"<BR>response.ContentType="application/x-javascript"<BR>response.write preparemsg(Html)<BR>response.end<BR>%&gt;</P><P>Thanks for any help in advance!</P>]]>
   </description>
   <pubDate>Fri, 13 Jul 2007 15:39:27 +0000</pubDate>
   <guid isPermaLink="true">https://forum.productcart.com/displaying-featured-items-on-an-html-page_topic965_post2773.html#2773</guid>
  </item> 
 </channel>
</rss>