Victor2009
Technical User
I am using a customcatalog.xml file to display products from the database. In the following code, the category is displayed above an image that contains fields from the database.
<variable>
<name>certified</name>
<value>##if:eq,rowquery_UserChar2,"Y","<span style="position: relative; z-index: 123; top: -53px; left: -120px; width: 80px; height: 66px; background: url(/brokered/images/1.gif) no-repeat;"></span>",""##</value>
</variable>
<pagehtml>
<center>
<table width="670px" style="border: 0; margin:0; padding:0; font: 10pt arial,verdana;" >
##ROWHTML##
</table>
</center>
</pagehtml>
<rowquery>
<column>UserChar1</column>
<column>UserChar2</column>
<column>UserChar3</column>
<column>UserChar4</column>
<column>UserChar5</column>
<column>CourseCode</column>
<column>Course_ID</column>
<column>Notes</column>
<column>CertificationType</column>
<column>CEU</column>
<!--column>Category</column-->
<sql>select c.UserChar1, c.UserChar2, c.UserChar3, c.UserChar4, c.UserChar5, c.CourseCode, c.Course_ID, c.Notes, c.CertificationType, c.CEU from courses c where c.coursecode='##productcode##' </sql>
</rowquery>
<rowhtml>
##Category##
<div style="background: url(/brokered/images/header-bg1.gif) top left repeat-x; height: 120px; padding: 4px;">
<span style="position: relative; float:left; width: 510px;">
<a href="javascript:self.document.Details.ProductCode.value='##ProductCode##';
self.document.Details.GroupID.value='NOGROUP'; self.document.Details.CampusIDstr.value=##campusid##;
self.document.Details.submit();"><font color="white"><b>Course</b>: ##Title##</font><br/></a>
<b>Course Code</b>: ##rowquery_Course_ID##<br/>
<b>Course Level</b>: ##rowquery_CertificationType##<br/>
<b>Course Line of Authority</b>: ##rowquery_UserChar1##<br/>
<b>Notes</b>: ##rowquery_Notes##
</span>
<span style="position: relative; left: -10px; float: right;">
<b>Price</b>: $##price##<br/>
<b>Total Credit Hours</b>: ##rowquery_CEU##<br/>
<b>Purchase</b>: ##ShoppingLink##
</span>
##Certified##
</div>
</rowhtml>
I am trying to group all the products from a category (##Category##) together before repeating a new category heading and new products.
An example of how this works now:
Florida Ethics Course
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
Florida Ethics Course
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
What I am looking for is:
Florida Ethics Course
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
New Category Heading
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
Could someone help?
<variable>
<name>certified</name>
<value>##if:eq,rowquery_UserChar2,"Y","<span style="position: relative; z-index: 123; top: -53px; left: -120px; width: 80px; height: 66px; background: url(/brokered/images/1.gif) no-repeat;"></span>",""##</value>
</variable>
<pagehtml>
<center>
<table width="670px" style="border: 0; margin:0; padding:0; font: 10pt arial,verdana;" >
##ROWHTML##
</table>
</center>
</pagehtml>
<rowquery>
<column>UserChar1</column>
<column>UserChar2</column>
<column>UserChar3</column>
<column>UserChar4</column>
<column>UserChar5</column>
<column>CourseCode</column>
<column>Course_ID</column>
<column>Notes</column>
<column>CertificationType</column>
<column>CEU</column>
<!--column>Category</column-->
<sql>select c.UserChar1, c.UserChar2, c.UserChar3, c.UserChar4, c.UserChar5, c.CourseCode, c.Course_ID, c.Notes, c.CertificationType, c.CEU from courses c where c.coursecode='##productcode##' </sql>
</rowquery>
<rowhtml>
##Category##
<div style="background: url(/brokered/images/header-bg1.gif) top left repeat-x; height: 120px; padding: 4px;">
<span style="position: relative; float:left; width: 510px;">
<a href="javascript:self.document.Details.ProductCode.value='##ProductCode##';
self.document.Details.GroupID.value='NOGROUP'; self.document.Details.CampusIDstr.value=##campusid##;
self.document.Details.submit();"><font color="white"><b>Course</b>: ##Title##</font><br/></a>
<b>Course Code</b>: ##rowquery_Course_ID##<br/>
<b>Course Level</b>: ##rowquery_CertificationType##<br/>
<b>Course Line of Authority</b>: ##rowquery_UserChar1##<br/>
<b>Notes</b>: ##rowquery_Notes##
</span>
<span style="position: relative; left: -10px; float: right;">
<b>Price</b>: $##price##<br/>
<b>Total Credit Hours</b>: ##rowquery_CEU##<br/>
<b>Purchase</b>: ##ShoppingLink##
</span>
##Certified##
</div>
</rowhtml>
I am trying to group all the products from a category (##Category##) together before repeating a new category heading and new products.
An example of how this works now:
Florida Ethics Course
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
Florida Ethics Course
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
What I am looking for is:
Florida Ethics Course
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
New Category Heading
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
Course Title: Credit Hours:
Course Code: Price:
Course Level: Purchase
Course Authority:
Could someone help?