<%
'*************************************************************************
' Function: PrintProductLineCategoryImage()
' Description: prints the pattern Images
' Parameters: strProductLineCategoryId
' Returns: none
' Written by: Wilbert Madarang
' Date: February 4, 2003
'*************************************************************************
Function PrintProductLineCategoryImages( strProductLineCategoryId )
Dim strSQL, strProductLineCategoryThumbnailLocation, strProductLineCategoryImageLocation, rs
'Prepare SQL Statement
strSQL = "Select * FROM dirProductLineCategories WHERE plCategoryId=" & strProductLineCategoryId
Call openDataConnection()
Set rs = dataConnection.Execute( strSQL )
Call closeDataConnection()
'Get Image Locations
If NOT (rs.EOF AND rs.BOF) Then
strProductLineCategoryThumbnailLocation = rs.Fields( "plCategory_Thumbnail_Location" )
strProductLineCategoryImageLocation = rs.Fields( "plCategory_Image_Location" )
Else
strProductLineCategoryThumbnailLocation = ""
strProductLineCategoryImageLocation = ""
End If
'Write Headers
strProductLineCategoryName = getProductLineCategoryName( strProductLineCategoryId )
Response.Write "" & strProductLineCategoryName & "
" &vbCrLf
'Print Images
Response.Write "
" & vbCrLf
'**************************************
' Modification 1.0 on March 15 by WM
' Modification 1.1 on March 29, 2003 by WM
'**************************************
'Response.Write "
"
'Response.Write "
"
' Response.Write "
"
' Response.Write ""
'**************************************
' End of Modification 1.0, March 15 by WM
'**************************************
End Function
'*************************************************************************
' Function: PrintProductsByProductLineCategory()
' Description: prints patterns by product line category
' Parameters: none
' Returns: none
' Written by: Wilbert Madarang
' Date: April 21, 2003
'*************************************************************************
Function PrintProductsByProductLineCategory()
Dim strSQL, strTable, strConstraint, strLocalPatternId, rs
Dim strCurrencyLabel
Dim nProductPrice
'Prepare Currency Label
strCurrencyLabel = getCurrencyLabel()
'Prepare SQL statements
strRegularPriceFieldName = getRegularPriceFieldName() 'US or Cdn Price
strSalePriceFieldName = getSalePriceFieldName() 'US or Cdn Price
strDisplayOrder = " ORDER BY dirProducts.patternId"
strConstraint = " WHERE productLineId=" & strProductLineId & " AND productLineCategoryId=" & strProductLineCategoryId
'strColumnNames = " productId, productName, " & strRegularPriceFieldName & "," & strSalePriceFieldName
strTable = "dirProducts INNER JOIN dirPatterns ON dirProducts.patternId=dirPatterns.patternId "
strSQL = "SELECT * FROM " & strTable & strConstraint & strDisplayOrder
'Open Data Connections
Call openDataConnection()
Set rs = dataConnection.Execute( strSQL )
Call closeDataConnection()
'Write Headers
Response.Write "
" & vbCrLf
'Write Data
DO WHILE NOT rs.EOF
'************************************************************************
' Modified by WM - March 29, 2003
'************************************************************************
' 1. Added Bold Attributes to strPatternName.
' 2. Display Product Code instead of Product ID
' 3. Added Font Color Attributes to strProductCode
' 4. Changed field names for currency to nProductSalePrice, nProductRegularPrice
' from strProductSalePrice, strProductRegularPrice
' 5. Changed logic for displaying Sale price
' - don't use LEN(strProductSalePrice) > 0
' - use (nProductSalePrice) > 0
'************************************************************************
'Obtain Fields
strProductId = rs.Fields("productId")
strProductName = rs.Fields( "productName" )
strProductCode = rs.Fields( "productCode" )
strPatternId = rs.Fields( "patternId" )
strPatternName = rs.Fields( "patternName" )
nProductRegularPrice = rs.Fields( strRegularPriceFieldName )
nProductSalePrice = rs.Fields( strSalePriceFieldName )
nProductPrice = getProductPrice( nProductRegularPrice, nProductSalePrice )
'Define Form
Response.Write "" & vbCrLf
rs.MoveNext
LOOP
Response.Write "
" & vbCrLf
Response.Write "
" & vbCrLf
Response.Write "
" & vbCrLf
Call AddLinkToCart()
Response.Write "
" & vbCrLf
Response.Write "
" & vbCrLf
End Function
'*************************************************************************
' Function: PrintColorSelectionListByPattern()
' Description: prints the products by pattern provided
' Parameters: strProductId
' Returns: none
' Written by: Wilbert Madarang
' Date: February 4, 2003
'*************************************************************************
' Modified by WM - November 1, 2003
'************************************************************************
' 1. Added color as a hidden web parameter into the shopping cart form.
'************************************************************************
Function PrintColorSelectionListByPattern( strProductId )
Dim strSQL, strTable, strConstraint, rs, strUrl
'Prepare SQL
strConstraint = " WHERE rel_Product_Color.productId=" & strProductId
strTable = "rel_Product_Color INNER JOIN dirColors ON rel_Product_Color.colorId=dirColors.colorId"
strSQL = "SELECT rel_Product_Color.colorId, dirColors.colorName FROM " & strTable & strConstraint
'Call SQL Statement
Call openDataConnection()
Set rs = dataConnection.Execute( strSQL )
Call closeDataConnection()
'Assess if there are Records
If rs.EOF AND rs.BOF Then
Response.Write " " & vbCrLf
Exit Function
End If
'Print Colors Selection List
'Response.Write "