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.
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:
| † 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. |
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.
| 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%" ...> |
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.
|
|
|
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".
|
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:
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> |
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> |
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> |
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").
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.