Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 18th, 2009, 06:52 PM
felipemullen felipemullen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 2 felipemullen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 2 sec
Reputation Power: 0
Cartweaver2 multiple column results

does anyone know anything about cartweaver?

...so im trying to figure out how i can modify my search results in CW2 so that instead of the multiple-row display, i have 3 columns with each having 3 rows, no description, just pictures. (and whatever results are left become new pages)

it was easy to remove the descriptions and header text, but i cant figure out for the life of me how to setup multiple columns because if i just repeat the code the columns display the exact same thing. (repeats)

im trying to get a result similar to something like:
//sorry i had to post a url
htt p://righthookrecords.bigcartel.c om/
(remove the spaces)

but i want to limit the rows to 3.

Reply With Quote
  #2  
Old February 21st, 2009, 12:21 PM
felipemullen felipemullen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 2 felipemullen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 2 sec
Reputation Power: 0
....

ok well i figured it out. sort of. this forum isnt helping very much but....

i still have a problem. though i have the 3 column display, the results arent cut off after reaching the result limit, in my case, 9. i tried a couple different things and i cant really figure it out, instead of creating a new page, it displays all products on the same one.

heres my code for CWINCresults.cfm:

Code:
<!--- START -  Display Results --->
<!--- //  Display number of matching records  // --->
</cfsilent>
<cfprocessingdirective suppresswhitespace="yes">
 <!---<p><strong>Total Search Results: </strong>[ <cfoutput>#ResultCount#</cfoutput> ]</p> --->
<!--- //  Display the following based on search results  // ---> 
<cfif #ResultCount# IS '0' > 
	<p align="center"> Sorry, no records that match your search criteria were found.<br> 
		Please refine or change your search and try again.</p> 
	<p align="center"><strong>Thank You! </strong></p> 
	<cfelse> 
	<!--- // If there ARE records, nest a table in the next row with the results // ---> 
	<table class="tabularData" id="tableSearchResults">
  <tr>
  <td>
		<!--- Call the custom tag. --->
<CF_Columns Cols="3" Records="#Results.RecordCount#">

<table border="0" cellpadding="5">
 <tr>
<!--- Loop over the number of columns and display the data for each 
column. --->
  <cfloop index="LoopCount" from="1" to="3">
   <cfset start = ("start" & LoopCount)>
   <cfset end = ("end" & LoopCount)>
   <td valign="top" class="copy">
		<cfoutput query="Results" startrow="#Evaluate(start)#" maxrows="#Evaluate(end)#">             
		<!--- Get product thumbnail --->
		<cfquery name="rsThumbnail" datasource="#request.dsn#" username="#request.dsnUsername#" password="#request.dsnPassword#">
		SELECT 
			tbl_prdtimages.prdctImage_FileName
		FROM tbl_prdtimages 
		WHERE 
			tbl_prdtimages.prdctImage_ProductID = #product_ID# AND
			tbl_prdtimages.prdctImage_ImgTypeID = 1
		</cfquery>
        <cfset ImageSRC = ImageRoot & rsThumbnail.prdctImage_FileName> 
		<cfset ImagePath = ExpandPath(ImageSRC)>
		<cfif FileExists(ImagePath)>
            <a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#"><img src="#ImageSRC#" alt="#product_Name#" border="0" /></a>
            <cfelse>
		    No Image Available
	      </cfif>
            <p></p>
	</cfoutput>
   </td>
  </cfloop>
 </tr>
</table>

</cfif> 


SO, on the part that it says, call the custom tag, i am calling a page titled columns.cfm, which has this loop inside:

Code:
<cfset cols = Attributes.Cols>
<cfset items = Attributes.Records>

<cfset colstogo = IncrementValue(cols)>
<cfset remain = items>
<cfset total = 0>

<cfloop index="LoopCount" from="1" to="#cols#">

   <cfset colstogo = DecrementValue(colstogo)>
   
   <cfset StartTemp = ("Caller.start" & LoopCount)>
   <cfset EndTemp = ("Caller.end" & LoopCount)>
   
   <cfparam name="#StartTemp#" default="#IncrementValue(total)#">
   <cfparam name="#EndTemp#" default="#Ceiling(remain/colstogo)#">
   
   <cfset total = (total + Evaluate(EndTemp))>
   <cfset remain = (items - total)>
	
</cfloop>


so it looks good to me. can anyone figure out how to limit it correctly? i cant just type in "3" for the maxrows element. it truncates the results correctly, but when i click to go to the next page it takes me to a page just like the first one.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > Cartweaver2 multiple column results


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap