Replacement CartList Control for StoreFront 6
by Structured Solutions

This is a drop-in replacement for the CartList control that ships with StoreFront 6.0. This control displays a list of items in the cart in a format similar to a register tape. It can be used anywhere the standard CartList can be used.

Features
Tables of Contents

Installation Instructions

The Replacement CartList Control is a drop-in replacement for the CartList control that ships with StoreFront 6.0. This means that it completely replaces the standard CartList control. Follow these steps to install the Replacement CartList Control:

  1. Make a backup copy of CartList.ascx and CartList.ascx.vb located in the Controls directory of your store.
  2. Copy SSCartList.dll from the bin directory where you unzipped the distribution package, to the bin directory of your store and to your secure bin directory if you have one.
  3. Copy SSCartlist.js to the root and ssl directories of your store. 
  4. Copy CartList.ascx and CartList.ascx.vb from the unzipped Controls directory to the Controls directory of your store.
  5. Copy CartList.ascx to the ssl/Controls directory of your store.
  6. Compile your store using "Compile Components" on the StoreFront Client Menu in FrontPage or DreamWeaver; or by loading the CompileSite.aspx page of your store (i.e. open your browser and load the page http://yoursite/CompileSite.aspx).
  7. Optional: Copy the sample images from the unzipped images directory to the images and ssl/images directories of your store. These are the same images seen in Examples 3-6 below.
Do not put  your backup copy of codebehind files (files that end with "vb") anywhere in the store directory tree. This will confuse the compiler and cause errors when you try to Compile Components.

Back to top

Control Documentation

After installation, the replacement CartList control will work without any other changes to your pages. See Example 1 below to see how the control looks by default. You can completely customize the look and feel of the replacement CartList with just a few simple additions to the CartList tag. The replacement CartList control is designed to make customization very easy by eliminating the need to edit complex ASP.NET controls or change the "codebehind" programming. 

The table below lists all of the replacement CartList attributes that can be added to the CartList tag. Multiple attributes can be used just like with regular HTML tags. Moreover, you do not need to recompile your store to see your changes. Just save your page or control file (aspx or ascx) and reload the page in your browser. This makes experimenting very easy. Several examples are shown in the next section.

Replacement CartList Control Attributes
Attribute Description Example
CssClass

The Cascading Style Sheet (CSS) class to use throughout this control. If no CssClass is specified, then CartList will explicitly inherit the class of the control that surrounds it. For example, if the CartList control is in an HTML table cell with a class of "RightColumn", then the CartList will also use a class of "RightColumn".

This CSS class will propagate to each of the individual elements in CartList that do not have a class assigned. By default no class is assigned to any element.

Default: The container class

<uc1:CartList CssClass="RightColumn" ...>
EmptyText

The text to display when no items are in the cart. This can be turned off by setting ShowEmpty="False".

Default: "No Items"

<uc1:CartList EmptyText="Nada" ...>
ExpandImage The relative path of an image file to display in the Shrink/Expand position of the toolbar. The path is relative to the page in which this control is included. If no path is entered, then the ExpandText is displayed. The image is linked to a routine that will display all the items in the cart.

Default: nothing

<uc1:CartList ExpandImage="images/expand.gif" ...>
ExpandText The text to display in the Shrink/Expand position of the toolbar if no ExpandImage is specified. If ExpandImage is specified, this text will be used as the alternate text for the image. The text is linked to a routine that will display all the items in the cart.

Default: "Expand"

<uc1:CartList ExpandText="Show Items" ...>
FooterStyle CSS inline style overrides for the footer portion of the control.

Default: blank

<uc1:CartList FooterStyle="text-align: right" ...>
FooterText The text to display in the footer portion of the CartList. You can include any Cart field in the text and it will be formatted as currency. To include a Cart field, enclose it in square brackets "[ ]".

Default: "Total: [SubTotal]"

<uc1:CartList FooterText="Sub Total: [Sub Total]" ...>
HeaderImage The relative path of an image file to display in the header portion of the control. The path is relative to the page in which this control is included. If no path is entered, then the HeaderSignedInText and HeaderSIgnedOutText are displayed. The image is linked to the Checkout page.

Default: blank

<uc1:CartList HeaderImage="images/cartcheckout.gif" ...>
HeaderSignedInText The text to be displayed as a header when the customer is signed in. If a HeaderImage is specified, then this text will be used as the alternate text for the image. The header text is linked to the Checkout page. You can include any Customer field in the text. To include a Customer field, enclose it in square brackets "[ ]".

Default: "[CustFirstName]'s Cart"

<uc1:CartList HeaderSignedInText="[CustFirstName] [CustLastName]'s Cart" ...>
HeaderSIgnedOutText The text to be displayed as a header when the customer is signed out. If a HeaderImage is specified, then this text will be used as the alternate text for the image. The header text is linked to the Checkout page.

Default: "My Cart"

<uc1:CartList HeaderSignedOutText="Checkout" ...>
HeaderStyle CSS inline style overrides for the header portion of the control.

Default: blank

<uc1:CartList HeaderStyle="text-align: center; font-weight: bold" ...>
ItemStyle CSS inline style overrides for the items listed in the body of the control.

Default: blank

<uc1:CartList ItemStyle="text-align: left" ...>
ItemWrap A Boolean value (True or False) which determines whether the item name should be allowed to wrap onto multiple lines.

Default: True

<uc1:CartList ItemWrap="False" ...>
LineColor Specifies the color of the lines that separates the header and footer from the "register tape" portion of the control. Any valid html color is allowed.

Default: Black

<uc1:CartList LineColor="White" ...>
MultipleItemsText The summary text displayed in the body of the control when the Cart is shrunk and ShowSummary is True and there is more than 1 item in the cart. You can include any Cart field in the text. To include a Cart field, enclose it in square brackets "[ ]".

Default: "[ItemCount] Items"

<uc1:CartList MultipleItemsText="[Count] pieces" ...>
ShowEmpty A Boolean value (True or False) which determines if the EmptyText message is displayed when there are no items in the cart.

Default: True

<uc1:CartList ShowEmpty="False" ...>
ShowFooter A Boolean value (True or False) which determines if the FooterText is displayed.

Default: True

<uc1:CartList ShowFooter="False" ...>
ShowHeader A Boolean value (True or False) which determines if the Header  is displayed.

Default: True

<uc1:CartList ShowHeader="False" ...>
ShowLines A Boolean value (True or False) which determines if the separator lines are displayed.

Default: True

<uc1:CartList ShowLines="False" ...>
ShowLinks A Boolean value (True or False) which determines if the product name is linked to the detail page for the product.

Default: True

<uc1:CartList ShowLinks="False" ...>
ShowPlurals A Boolean value (True or False) which determines if plural product names are used when the quantity is greater than 1. If True and no plural name is defined, the singular will be used.

Default: True

<uc1:CartList ShowPlurals="False" ...>
ShowSummary A Boolean value (True or False) which determines if  MultipleItemsText or SingleItemText are displayed when the cart is shrunk.

Default: True

<uc1:CartList ShowSummary="False" ...>
ShowToolbar A Boolean value (True or False) which determines if the Toolbar is displayed.

Default: True

<uc1:CartList ShowToolbar="False" ...>
ShrinkImage The relative path of an image file to display in the Shrink/Expand position of the toolbar. The path is relative to the page in which this control is included. If no path is entered, then the ShrinkText is displayed. The image is linked to a routine that will hide the items in the cart.

Default: nothing

<uc1:CartList ShrinkImage="images/shrink.gif" ...>
ShrinkText The text to display in the Shrink/Expand position of the toolbar if no ShrinkImage is specified. If ShrinkImage is specified, this text will be used as the alternate text for the image. The text is linked to a routine that will hide the items in the cart.

Default: "Shrink"

<uc1:CartList ShrinkText="Hide" ...>
SingleItemText The summary text displayed in the body of the control when the Cart is shrunk and ShowSummary is True and there is exactly 1 item in the cart. You can include any Cart field in the text. To include a Cart field, enclose it in square brackets "[ ]".

Default: "[ItemCount] Item"

<uc1:CartList SingleItemText="One Item" ...>
ToolbarStyle CSS inline style overrides for the toolbar portion of the control.

Default: blank

<uc1:CartList ToolbarStyle="text-align: center; font-weight: bold" ...>
ViewCartImage The relative path of an image file to display in the View Cart position of the toolbar. The path is relative to the page in which this control is included. If no path is entered, then the ViewCartText is displayed. The image is linked to the Shopping Cart page.

Default: nothing

<uc1:CartList ViewCartImage="images/viewcart.gif" ...>
ViewCartText The text to display in the View Cart position of the toolbar if no ViewCartImage is specified. If ViewCartImage is specified, this text will be used as the alternate text for the image. The text is linked to the Shopping Cart page.

Default: "View Cart"

<uc1:CartList ViewCartText="Show Cart" ...>
Width Specifies the width of the CartList control. Any valid HTML width is allowed.

Default: Not specified

<uc1:CartList Width="100%" ...>
Cart Fields

These Cart fields can be referenced in the FooterText, SingleItemText and MultipleItemsText attributes. To reference a field, enclose it in square brackets "[ ]". For example, "Subtotal: [SubTotal]". Most of these fields will not have useful information until you start checking out. Similarly, it would not make sense to use a Text field in the FooterText since it will be formatted as currency.

Field Name Type
BackOrderMessage Text
BackOrderTotalAmt Number
CODTotal Number
Count Number
CountryTax Number
DiscountTotal Number
GiftCertificateTotal Number
 
Field Name Type
GrandTotal Number
HandlingTotal Number
ItemCount Number
LocalTax Number
MerchandiseTotal Number
OandaISO Text
OandaRate Number
 
Field Name Type
OrderTotal Number
ShipmentsTotal Number
ShippingTotal Number
StateTax Number
SubHandlingTotal Number
SubTotal Number
TotalBilledAmt Number
Customer Fields

These Customer fields can be referenced in the HeaderSignedInText attributes to provide a personalized message to customers when they are signed on. For example, if you specify HeaderSignedInText="[CustFirstName]'s Cart" and Joe Arbogast is signed in, then the Header text will read "Joe's Cart".

Field Name Type
CustFirstName Text
CustIsSubscribed True/False
CustLastName Text
CustPassWord Text
Email Text
OandaISO Text
OandaRate Number
Editing the Replacement CartList Control

Although you can change a great deal of the look and feel of CartList control using tag attributes, you may find that you want to change more. In that case, you will need to edit the CartList control source (CartList.ascx). These tips and guidelines are meant to help you change the control without breaking it:

Back to top

Examples

All of the following examples were taken from a standard StoreFront 6.1 installation using the default "Coffee" design scheme. The CartList control was inserted below the Simple Search control in the default RightColumnNav.ascx file using the tag shown. Any changes to the CartList html are shown in the CartList.ascx column. Each one builds on the previous. Changes from one to the next are highlighted in bold.

Sample
Display
CartList Tag
(in RightColumnNav.ascx)
CartList Source Changes
(in CartList.ascx)
Example 1: This example shows the default appearance of the Replacement CartList Control. This is what you will see after you install CartList if you make no other changes.
<uc1:CartList id="CartList1" runat="server"></uc1:CartList> No changes
Example 2: Custom styles are used to center the header and make the text bold, and align the footer to the right. Notice that the customer has signed in, so their first name now appears in the header.
<uc1:CartList id="CartList1" runat="server" HeaderStyle="text-align:center; font-weight:bold" FooterStyle="text-align:right"></uc1:CartList> No changes
Example 3: Convert the header and toolbar to use graphic images. The sample images are 50 and 100 pixels wide so the cart width is set to match and centered in the column.
<center>
<uc1:CartList id="CartList1" runat="server" HeaderStyle="text-align:center; font-weight:bold" FooterStyle="text-align:right" HeaderImage="images/cartcheck.gif" ViewCartImage="images/viewcart.gif" ExpandImage="images/expand.gif" ShrinkImage="images/shrink.gif" Width="100"></uc1:CartList>
</center>
No changes
Example 4: Same as above but the items are hidden because the Shrink button was pressed.
No changes No changes
Example 5: Now the summary line is hidden and the line color is changed to match the button borders.
<center>
<uc1:CartList id="CartList1" runat="server" HeaderStyle="text-align:center; font-weight:bold" FooterStyle="text-align:right" HeaderImage="images/cartcheck.gif" ViewCartImage="images/viewcart.gif" ExpandImage="images/expand.gif" ShrinkImage="images/shrink.gif" Width="110" LineColor="#929081" ShowSummary="False"></uc1:CartList>
</center>
No changes
Example 6: This last example shows that you can also make changes to the source template for the control. In this case, the footer is changed to bold white.
No changes <asp:TableCell id="FooterCell" Runat="server" wrap="False" Width="100%" Font-Bold="True" ForeColor="#ffffff"></asp:TableCell>

Back to top

Removal Instructions

To remove the Replacement CartList Control from your store, you will need to restore CartList.ascx and CartList.ascx.vb. If you made backup copies of these files prior to installation, then use them in the restore steps below. Otherwise, use the original versions from the StoreFront installation directory (e.g. "C:\Program Files\StoreFront 6.0\Web\Controls").

  1. Copy the backup or original CartList.ascx and CartList.ascx.vb files to the Controls directory of your store.
  2. Copy the backup or original CartList.ascx file to the ssl/Controls directory of your store.
  3. Remove SSCartList.dll from the bin directory of your store.
  4. Remove SSCartList.dll from the secure bin directory of your store if you have one.
  5. Remove SSCartlist.js from the root and ssl directories of your store.
  6. Compile your site using "Compile Components" on the StoreFront Client Menu in FrontPage or DreamWeaver; or by loading the CompileSite.aspx page of your store (i.e. open your browser and load the page http://yoursite/CompileSite.aspx).

Back to top

Support

Direct email support is available from support@sfaddons.com for all licensed users of the Replacement CartList Control. You also may find answers to questions on the StoreFront newsgroup.

Back to top