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 June 30th, 2007, 10:25 PM
psoxie psoxie is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2007
Posts: 2 psoxie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 49 sec
Reputation Power: 0
Angry Creating default/result column settings in tables

i'm using the coldfusion version of cartweaver and i need to change the default settings (which are to display two column tables) to display three columns for the results. attached is the file that i'm pretty sure defines these styles. thanks for the help!

Code:
<cfparam name="URL.category" default="0">
<cfparam name="URL.secondary" default="0">
<cfparam name="URL.keywords" default="">
<cfparam name="URL.PageNum_Results" default="1">
<cfif NOT IsNumeric(URL.PageNum_Results)>
	<cfset URL.PageNum_Results = 1 />
</cfif>
<cfmodule template="CWTags/CWTagSearchAction.cfm" 
	category="#URL.category#" 
	secondary="#URL.secondary#" 
	keywords="#URL.keywords#"
	startpage="#URL.PageNum_Results#"
	maxrows="#Application.ResultsPerPage#">
<!--- ////////// [ END ] Cartweaver Search Results Custom Tag Call ] ////////// --->

<!--- Variables for manipulating product images --->
<cfparam name="ImagePath" default="">
<cfparam name="ImageSRC" default="">

<!--- Set defaults for paging --->
<cfparam name="PagingCategory" default="">
<cfparam name="PagingSecondary" default="">
<cfparam name="PagingKeywords" default="">
<cfset PagingCategory = "&category=" & URL.category>
<cfset PagingSecondary = "&secondary=" & URL.secondary>
<cfif URL.keywords NEQ "" AND URL.keywords NEQ "Enter Keywords">
	<cfset PagingKeywords = "&keywords=" & URLEncodedFormat(URL.keywords)>
</cfif>
<cfset URLVars = PagingCategory & PagingSecondary & PagingKeywords>

<!--- Columnar display variables --->
<cfset NumberOfColumns = Application.NumberOfColumns />
<cfset ColsOutput = 0 />
<cfset RecordsOutput = 0 />
<cfset RowsOutput = 0 />
<cfset ColWidth = Fix(100/NumberOfColumns) />

<!--- START -  Display Results --->
<!--- //  Display number of matching records  // --->
</cfsilent>
<cfprocessingdirective suppresswhitespace="yes"> 

<!--- //  Display the following based on search results  // ---> 
<cfif ResultCount IS 0> 
	<p></p>
<cfelse>
	<cfoutput>
		<cfif NumberOfColumns GT 1>
			<table class="tabularData" id="tableSearchResults">
				<cfloop query="Results">
					<cfsilent>
					<cfset ColsOutput = ColsOutput + 1 />
					<cfset RecordsOutput = RecordsOutput + 1 />
					<cfset ImageSRC = cwGetImage(Results.product_ID, 1) />
					</cfsilent>
					<cfif ColsOutput EQ 1>
						<cfset RowsOutput = RowsOutput + 1 />
						<tr class="#cwAltRows(RowsOutput)#">
					</cfif>
					<td <cfif RowsOutput EQ 1> style="width: #ColWidth#%;"</cfif>
						<p>
							<cfif ImageSRC NEQ "">
								<a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#"><img src="#ImageSRC#" alt="#product_Name#" border="0"></a><br />
							</cfif><h1>#product_Name#</h1>
							#Results.product_ShortDescription#<br />
							<!--- Get the current product tax rate if the merchant has elected to show prices including taxes --->
							<cfif Application.DisplayTaxOnProduct EQ "True">
								<cfset taxRate = cwGetTotalProductTaxRate(product_ID, Client.TaxStateID, Client.TaxCountryID) />
							<cfelse>
								<cfset taxRate = "" />
							</cfif>
							<cfmodule template="CWTags/CWTagPriceList.cfm" Product_ID="#Results.product_ID#" CurrentRecord="#Results.CurrentRow#" TaxRate="#taxRate#">
							<br />
							<a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#"></a></p></td>
					<cfif ColsOutput EQ NumberOfColumns OR CurrentRow EQ Results.RecordCount>
						<!--- Fill the row with empty table cells if necessary --->
						<cfloop from="#ColsOutput#" to="#NumberOfColumns - 1#" index="i">
							<cfscript>
							writeoutput("<td>&nbsp;</td>");
							</cfscript>
						</cfloop>
						</tr>
						<!--- Reset the column counter --->
						<cfset ColsOutput = 0 />
					</cfif>
				</cfloop>
			</table>
		<cfelse>
			<table class="tabularData" id="tableSearchResults">
				<tr>
					<th>Item Name</th>
					<th>Image</th>
				</tr>
				<cfloop query="Results">
					<cfset ImageSRC = cwGetImage(Results.product_ID, 1) />
					<tr class="#cwAltRows(CurrentRow)#">
						<td><p><strong>#product_Name#</strong><br />
								#product_ShortDescription#<br />
								<!--- Get the current product tax rate if the merchant has elected to show prices including taxes --->
								<cfif Application.DisplayTaxOnProduct EQ "True">
									<cfset taxRate = cwGetTotalProductTaxRate(product_ID, Client.TaxStateID, Client.TaxCountryID) />
								<cfelse>
									<cfset taxRate = "" />
								</cfif>
								<cfmodule template="CWTags/CWTagPriceList.cfm" Product_ID="#Results.product_ID#" CurrentRecord="#Results.CurrentRow#" TaxRate="#taxRate#">
							</p></td>
						<td style="text-align: center;"><p>
							<cfif ImageSRC NEQ "">
								<a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#"><img src="#ImageSRC#" alt="#product_Name#" border="0"></a><br />
								<br />
							</cfif>
							<a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#">More Info »</a></p></td>
					</tr>
				</cfloop>
			</table>
		</cfif>
	</cfoutput>
</cfif>
<!--- END IF  - ResultCount IS 0 ---> 
<!--- RecordSet Paging ---> 


<cfset cwDisplayDiscountDescriptions()>
</cfprocessingdirective> 

Reply With Quote
  #2  
Old July 2nd, 2007, 06:51 PM
Cartweaver.com Cartweaver.com is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 1 Cartweaver.com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 33 sec
Reputation Power: 0
Hi, I would recommend you pop over to the Cartweaver support newsgroup you’ll find answerers there for sure. If you are using Cartweaver 2, doing this s a pretty easy mod, if this is Cartweaver 3, this i9s a simple setting in the admin to display however many columns you wish. I look forward to seeing you at.

News://support.cartweaver.com

Lawrence Cramer
Cartweaver.com





Quote:
Originally Posted by psoxie
i'm using the coldfusion version of cartweaver and i need to change the default settings (which are to display two column tables) to display three columns for the results. attached is the file that i'm pretty sure defines these styles. thanks for the help!

Code:
<cfparam name="URL.category" default="0">
<cfparam name="URL.secondary" default="0">
<cfparam name="URL.keywords" default="">
<cfparam name="URL.PageNum_Results" default="1">
<cfif NOT IsNumeric(URL.PageNum_Results)>
	<cfset URL.PageNum_Results = 1 />
</cfif>
<cfmodule template="CWTags/CWTagSearchAction.cfm" 
	category="#URL.category#" 
	secondary="#URL.secondary#" 
	keywords="#URL.keywords#"
	startpage="#URL.PageNum_Results#"
	maxrows="#Application.ResultsPerPage#">
<!--- ////////// [ END ] Cartweaver Search Results Custom Tag Call ] ////////// --->

<!--- Variables for manipulating product images --->
<cfparam name="ImagePath" default="">
<cfparam name="ImageSRC" default="">

<!--- Set defaults for paging --->
<cfparam name="PagingCategory" default="">
<cfparam name="PagingSecondary" default="">
<cfparam name="PagingKeywords" default="">
<cfset PagingCategory = "&category=" & URL.category>
<cfset PagingSecondary = "&secondary=" & URL.secondary>
<cfif URL.keywords NEQ "" AND URL.keywords NEQ "Enter Keywords">
	<cfset PagingKeywords = "&keywords=" & URLEncodedFormat(URL.keywords)>
</cfif>
<cfset URLVars = PagingCategory & PagingSecondary & PagingKeywords>

<!--- Columnar display variables --->
<cfset NumberOfColumns = Application.NumberOfColumns />
<cfset ColsOutput = 0 />
<cfset RecordsOutput = 0 />
<cfset RowsOutput = 0 />
<cfset ColWidth = Fix(100/NumberOfColumns) />

<!--- START -  Display Results --->
<!--- //  Display number of matching records  // --->
</cfsilent>
<cfprocessingdirective suppresswhitespace="yes"> 

<!--- //  Display the following based on search results  // ---> 
<cfif ResultCount IS 0> 
	<p></p>
<cfelse>
	<cfoutput>
		<cfif NumberOfColumns GT 1>
			<table class="tabularData" id="tableSearchResults">
				<cfloop query="Results">
					<cfsilent>
					<cfset ColsOutput = ColsOutput + 1 />
					<cfset RecordsOutput = RecordsOutput + 1 />
					<cfset ImageSRC = cwGetImage(Results.product_ID, 1) />
					</cfsilent>
					<cfif ColsOutput EQ 1>
						<cfset RowsOutput = RowsOutput + 1 />
						<tr class="#cwAltRows(RowsOutput)#">
					</cfif>
					<td <cfif RowsOutput EQ 1> style="width: #ColWidth#%;"</cfif>
						<p>
							<cfif ImageSRC NEQ "">
								<a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#"><img src="#ImageSRC#" alt="#product_Name#" border="0"></a><br />
							</cfif><h1>#product_Name#</h1>
							#Results.product_ShortDescription#<br />
							<!--- Get the current product tax rate if the merchant has elected to show prices including taxes --->
							<cfif Application.DisplayTaxOnProduct EQ "True">
								<cfset taxRate = cwGetTotalProductTaxRate(product_ID, Client.TaxStateID, Client.TaxCountryID) />
							<cfelse>
								<cfset taxRate = "" />
							</cfif>
							<cfmodule template="CWTags/CWTagPriceList.cfm" Product_ID="#Results.product_ID#" CurrentRecord="#Results.CurrentRow#" TaxRate="#taxRate#">
							<br />
							<a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#"></a></p></td>
					<cfif ColsOutput EQ NumberOfColumns OR CurrentRow EQ Results.RecordCount>
						<!--- Fill the row with empty table cells if necessary --->
						<cfloop from="#ColsOutput#" to="#NumberOfColumns - 1#" index="i">
							<cfscript>
							writeoutput("<td>&nbsp;</td>");
							</cfscript>
						</cfloop>
						</tr>
						<!--- Reset the column counter --->
						<cfset ColsOutput = 0 />
					</cfif>
				</cfloop>
			</table>
		<cfelse>
			<table class="tabularData" id="tableSearchResults">
				<tr>
					<th>Item Name</th>
					<th>Image</th>
				</tr>
				<cfloop query="Results">
					<cfset ImageSRC = cwGetImage(Results.product_ID, 1) />
					<tr class="#cwAltRows(CurrentRow)#">
						<td><p><strong>#product_Name#</strong><br />
								#product_ShortDescription#<br />
								<!--- Get the current product tax rate if the merchant has elected to show prices including taxes --->
								<cfif Application.DisplayTaxOnProduct EQ "True">
									<cfset taxRate = cwGetTotalProductTaxRate(product_ID, Client.TaxStateID, Client.TaxCountryID) />
								<cfelse>
									<cfset taxRate = "" />
								</cfif>
								<cfmodule template="CWTags/CWTagPriceList.cfm" Product_ID="#Results.product_ID#" CurrentRecord="#Results.CurrentRow#" TaxRate="#taxRate#">
							</p></td>
						<td style="text-align: center;"><p>
							<cfif ImageSRC NEQ "">
								<a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#"><img src="#ImageSRC#" alt="#product_Name#" border="0"></a><br />
								<br />
							</cfif>
							<a href="#request.targetDetails#?ProdID=#product_ID#&category=#URL.category#">More Info »</a></p></td>
					</tr>
				</cfloop>
			</table>
		</cfif>
	</cfoutput>
</cfif>
<!--- END IF  - ResultCount IS 0 ---> 
<!--- RecordSet Paging ---> 


<cfset cwDisplayDiscountDescriptions()>
</cfprocessingdirective> 

Reply With Quote
  #3  
Old June 3rd, 2008, 01:43 AM
crishna crishna is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 4 crishna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 8 sec
Reputation Power: 0
I would recommend you pop over to the Cartweaver support newsgroup

cf.etisbew

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > Creating default/result column settings in tables


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