Table of Contents

Advertisement

Quick Links

macromedia
®
DRUMBEAT
2000
eCOMMERCE
EDITION
Users Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DRUMBEAT 2000 ECOMMERCE EDITION and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for MACROMEDIA DRUMBEAT 2000 ECOMMERCE EDITION

  • Page 1 ® ™ DRUMBEAT 2000 eCOMMERCE EDITION Users Guide...
  • Page 2 Copyright © 1999 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of Macromedia, Inc. Part Number ZBD10ES100...
  • Page 3: Table Of Contents

    CONTENTS INTRODUCTION Paths to e-Commerce Development ......8 A Typical e-Commerce Flow ........9 Up and Running Fast with eStore .
  • Page 4 CHAPTER 3 Configuring the Shopping Cart’s Content..... . .92 Customizing the Data-Map........93 Adding the Shopping Cart SmartElement .
  • Page 5 CHAPTER 7 Setting Up Shopping Cart Adjustments ..... . .136 Setting Up Adjustments for Total Weight, Quantity or Purchase..137 Ordering Page Interactions .
  • Page 7 INTRODUCTION Developing an e-Commerce Site ............
  • Page 8: Paths To E-Commerce Development

    Paths to e-Commerce Development For clarity’s sake, think of the development path as having four main aspects: Identity Delivery Development Maintenance Identity defines the theme, colors, and conventions. Delivery defines the target browser, server platform, security requirements, and, specifically for e-Commerce, the payment method.
  • Page 9: A Typical E-Commerce Flow

    A Typical e-Commerce Flow The Quick Store tutorial and eStore instructional media, such as DrumNotes and Starting Points follow this very typical e-commerce flow. However, you can create any flow you want. As e-commerce matures, there will be better flows discovered and planned.
  • Page 10: How To Use This Book

    Encryption: Save the check-out pages on a secure server using Secure Sockets Layer (SSL). Database: Make sure the database is not saved in the wwwroot directory on the server. Add a user name and password to the database. Authentication: Protect individual files and folders on Windows NT servers using the Challenge Response authentication.
  • Page 11: Installing Drumbeat 2000 Estore Builder

    The Drumbeat Support Center Web site is updated regularly with the latest information on Drumbeat, plus advice from expert users, advanced topics, examples, tips, and updates. Check the Web site often for the latest news on Drumbeat and how to get the most out of the program at www.macromedia.com/ support/drumbeat.
  • Page 13: What You Need To Complete Quick Store

    CHAPTER 1 Quick Store Tutorial ............
  • Page 14: Getting Familiar With Quick Store Starting Point

    Getting Familiar with Quick Store Starting Point A Drumbeat Starting Point is a project file that has all or part of a site already developed. The Quick Store Starting Point has all the pages for the storefront as well as most of the functionality set up. You will add the Shopping Cart and set up the Login and Checkout areas.
  • Page 15 Site Structure In the Site tab you can see the site organization. Expand the site tree to expose all the pages in the site. The Home page is designed to present visitors with rotating book specials. If a special catches their eye, they can order it immediately by clicking an order button.
  • Page 16 Templates Templates speed up the development time by reducing repetitive design tasks. Click the Templates tab and you’ll see that the site has three templates: a Master Template and two section templates: Master Template: This template contains only the link style information for the site.
  • Page 17 Commerce Template: This template is used for the shopping cart and checkout pages. It contains a background, logo and two linked images for navigation. All of the pages shown under this template in the Templates tab site tree inherit these elements. For more information about templates check the index of the Drumbeat User’s Guide or Help for the words in bold.
  • Page 18 The Recordsets used in the Quick Store tutorial have also been created for you. You can view them by querying the Asset Center for site-level elements. Click the Locate Assets button and choose Site Elements > Show all site-level elements. The site-level elements on this site also include the DataForm and Cookies that are used.
  • Page 19 The description and purpose of each recordset is explained in the following table. Recordset Name Content Table Description BookQuery BookQuery Used in the search, results, and details product pages. From the detail page, the product items are inserted into the Orders table and then carried by the Orders detail and Orders recordsets to the CheckOut pages.
  • Page 20 The custom eStore SmartElements are: Shopping Cart: This component is a server-side object which holds user selections as they shop the store. It manages the data in an online shopping session until they are ready for checkout. Shopping Cart Display: This component is used to display the data contained in the shopping cart, so that users can check the contents of their cart.
  • Page 21 eStore Interactions An Interaction is a pre-written JavaScript or VBScript function that can be applied to SmartElements. By selecting SmartElements, you create a context- sensitive list of interactions, from which you can choose the one(s) you want to use. A number of eStore-specific interactions are included in the eStore package. These are added to the Interactions available to you in the Interactions Center and will appear when the appropriate participants are selected.
  • Page 22 Not all of the eStore interactions are used in this tutorial, so be sure to check for what’s available when you develop your own online store and want to customize it with advanced features. Also, check the DrumNotes for examples of how to use many of these interactions.
  • Page 23: Step 1: Adding A Shopping Cart

    Step 1: Adding A Shopping Cart You will add the heart of the shopping experience by adding and setting up these components: The Shopping Cart server element (referred to as ‘basement element’ in Drumbeat) The Shopping Cart Display element (can also be referred to as ‘page element’ in Drumbeat) The Data-Map which binds the Shopping Cart server and display elements to product, customer, and billing information.
  • Page 24 Add the Shopping Cart SmartElement In Site Manager, expand the Search For Books node, and click the Book Detail icon to make its layout active. From the SmartElements Toolbar, select the Shopping Cart SmartElement and drop it on the page. The Basement opens (if not already) and the element appears in the Basement.
  • Page 25 Right click the Cart1 SmartElement in the basement and select Attributes. In the Attributes Sheet, set the attributes as shown in the table. Attribute Description Set to: Content Sets the content of the element to Select Static Content. the Shopping Cart Data-Map Click the ellipsis button, and Shopping Cart Content Table.
  • Page 26 To create an Element Collection for the ShoppingCart Object: Right click the ShoppingCartObject element in the basement and choose Add to SmartElement Library. Name the element BookstoreCart and click OK. From the Element Toolbar open the Element Library by clicking the Element Library button.
  • Page 27 Choose an icon to use to represent the collection on the SmartElements toolbar. Uncheck the Use Wizard checkbox, if it is not already unchecked. Click the Edit button and then click the Appearance tab. Click Change Icon. Scroll to the far right for the next to last icon and you’ll find the icon created especially for this element, as shown in the margin.
  • Page 28 To add a Shopping Cart button: Drag an Image Button from the SmartElements Toolbar to the upper right side of the layout (under the ‘Number of Copies’ text). In the Attributes tab, name the button ShoppingCartButton. From Asset Center query for images. Locate and drag the btn-AddToCart2 and btn-AddToCart1 images to the Image Button element.
  • Page 29 Shift select the following elements: Add to Shopping Cart button (on page) Dropdown list for number of copies (on page) ShoppingCartObject (in Basement) BookQuery Recordset (in Basement) Right click and choose Possible Interactions. In Interactions Center, double click the interaction in the eStore Shopping Cart category that says: Add item from [BookQuery] to [ShoppingCartObject] when [ShoppingCartButton] is clicked using quantity from [Quantity]...
  • Page 30 Set the parameters according to the following table, then click OK. Parameter Description Set to: Redirect after adding Redirect the shopper to Checked confirmation page. Redirect if already in Redirect the shopper to a message Checked Cart: page if the selected item is already in the cart.
  • Page 31 Build the Shopping Cart Page The Shopping Cart page displays the items in the Shopping Cart and allows the shopper to manage his or her cart. From this page the shopper can check out or continue shopping. To develop the Shopping Cart page: In Site Manager, click the Shopping Cart page to make its layout active.
  • Page 32 Note: The Attributes Sheet for this element is very long. In order to see and set all the attributes, use the attribute scroll buttons (the blue arrows) in the top right corner of the Attributes Sheet. Attribute: Set to: Left Width Height Border...
  • Page 33 Attribute: Set to: ShowSummary Checked UseCurrencySymbol Checked EmptyMsgStyle SC Display Header EvenRowStyle SC Text HeaderStyle SC Display Header OddRowStyle SC Odd Row SummaryStyle SC Totals Name ShoppingCartDisplay Adjusted Total Label Adjusted Subtotal ColumnWidths 10%,45%,15%,15%,5% CurrencySymbol EmptyMsg Shopping Cart is Currently Empty GrandTotal Label Grand Total SourceCart...
  • Page 34 To create an Element Collection for the ShoppingCartDisplay Object: In the Layout, shift-select the ShoppingCartDisplay and ShoppingCartObject elements. Right click and choose Add to SmartElement Library. Name the element BookstoreCartandDisplay. Click OK In Element Library, click the Element Collections tab and check the box next to the BookstoreCartandDisplay name.
  • Page 35: Managing The Cart

    Managing the Cart Additional functions required by shoppers are the ability to modify quantities, remove individual items, or clear the cart completely and continue shopping. Continuing on the same Shopping Cart page, you will add update, checkout, clear cart, and continue shopping buttons to the Shopping Cart page. Add an Update Button To add an update button: Drag a Form Button from the SmartElements Toolbar to the layout above the...
  • Page 36 Shift select the following elements: Update Button (on page) ShoppingCartObject (in Basement) Right click and choose Possible Interactions. Scroll to the eStore Shopping Cart category and double click the interaction: Do not display Update if ShoppingCartObject is empty There are no parameters for this Interaction. Shift select the following elements: Update Button (on page) ShoppingCartDisplay (on page)
  • Page 37 Add a Checkout Button To add a checkout button: From the SmartElements Toolbar, add another Form Button to the layout, next to the Update Order button. Right click the button and choose Attributes. In the Attributes Sheet, set the attributes according to the following table and as shown in the accompanying figure.
  • Page 38 Right click and choose Possible Interactions. Scroll to the eStore Shopping Cart category and double click the interaction: Do not display Checkout if ShoppingCartObject is empty There are no parameters for this Interaction. This next Interaction ensures that edits are made to this page and saved in the Shopping Cart array and carried over to checkout.
  • Page 39 Right click and choose Possible Interactions. In the eStore Shopping Cart category, double click the interaction: Update ShoppingCartObject with data from ShoppingCartDisplay when Checkout is clicked and redirect to pagename. In the Parameters dialog, click Assign. Then, expand the Search For Books node and select the CheckArea page.
  • Page 40 Clear Items from the Cart To clear all items from cart: From the SmartElements Toolbar, add another Form Button to the layout next to the Checkout button. Right click the button and choose Attributes. In the Attributes Sheet, set the attributes according to the following table and as shown in the accompanying figure.
  • Page 41 Right click and choose Possible Interactions. Scroll to the eStore Shopping Cart category double click the interaction: Do not display ClearCart if ShoppingCartObject is empty There are no parameters for this Interaction. With the ClearCart button and ShoppingCartObject elements still selected scroll to the eStore Shopping Cart category and double the interaction: Remove all ShoppingCart items when ClearCart is clicked and redirect to page In the Parameters dialog, click Assign.
  • Page 42 Add a Continue Shopping Button To add a Continue Shopping button: From SmartElements Toolbar, add another Form Button to the layout next to the Clear Cart button. Right click the button and choose Attributes. In the Attributes Sheet, set the attributes according to the following table and as shown in the accompanying figure.
  • Page 43 Right click and choose Possible Interactions. In the eStore Shopping Cart category and double click the interaction:: Update ShoppingCartObject with data from ShoppingCartDisplay when Continue is clicked and redirect to pagename In the Parameters dialog, click Assign. Then, expand the Search For Books node and select the Book Search Result List page.
  • Page 44 Publish and Browse You can now publish the site and search for books and click through to the products detail page. You can add and view books in the Shopping Cart. To publish the site: In Windows Explorer, create a new folder under the inetpub\wwwroot\ directory.
  • Page 45 Click the Publish button on the main toolbar and choose All Pages. Publishing takes several moments. Once the publishing has been completed, you need to copy the book cover images into the images folder under the publish folder. (The images folder was created during the publishing process).
  • Page 46 Take a Snapshot Site Snapshot enables you to save a copy of the project file in its current state under a different name. Drumbeat saves every change you make to the application to the project file as you work, so taking a Snapshot becomes important when you want to save milestones as backups.
  • Page 47: Step 2: Setting Up Login And Checkout

    Step 2: Setting Up Login and Checkout The basic checkout area includes pages where the site shopper can change the contents in the shopping cart, and decide to check out. The first stage of checking out is the login page. Returning shoppers are sent to the checkout page. The checkout page displays the shopping cart’s contents and their personal account information.
  • Page 48 Validate the username and password boxes You will apply a validation that ensures that shoppers enter text into the edit boxes. The Non-blank validation can be applied at any time before the form is submitted. You will add it first since it deals with only one element and is the simplest procedure on this page.
  • Page 49 Select the Form element in the Basement. Right click and choose Possible Activations. Scroll to the Forms Validation category and double click the activation that says: Login Form: Validate when LoginForm is submitted. There are no parameters. This ensures that all validation activations have been applied prior to submission.
  • Page 50 The Interaction Center now shows the Possible Interactions between the edit box and cookie elements currently selected. Double click this interaction: Set Content of UserName to the value in Password Cookie Set the Name parameter to eStoreUserName, then click OK. Parameter Description Set to:...
  • Page 51 To save the passwords in a cookie: To ensure the necessary elements are selected, first select the Password edit box. Then, shift-select the PasswordCookie element in the basement. Right click and choose Possible Interactions. View the Cookie category and double click this Interaction: Set content of Password to the value in PasswordCookie Set the Name parameter to eStorePassword, then click OK.
  • Page 52 Set the Name parameter to eStore Password, then click OK. Parameter Description Set to: Name Defines the Name in the Name- Paste (Ctrl+V) eStorePassword Value pair which is stored in the cookie. Select the SavePassword checkbox. Then shift select the PasswordCookie. Interaction Center now shows the Possible Interactions for the check box and cookie elements currently selected.
  • Page 53 Scroll to the bottom of the Security category and double click this Interaction: Verify username from Username and password from Password and redirect (store additional request in Session) Set the parameters according to the following table, then click OK. Parameter Description Set to: SuccessRedirect...
  • Page 54: Checking Out

    Create and Update User Profiles The NewUser and UpdateUser pages insert user data into the Customers Recordset. The functionality has already been added to the Quick Store Starting Point so you can focus on setting up the main e-commerce functionality. After completing this tutorial, refer to Chapter 3 Creating Checkout Pages in the Building Your eStore section of this book for page descriptions.
  • Page 55 ShippingHidden (hidden form element) The Interactions you will add on the page: You will apply Point-and-Click Interactions for ordering and payment functionalities including shipping, and tax calculation on-the-fly. eStore shipping eStore tax eStore Shopping Cart Database Edit Forms Set Value Form Submit Check the Customer Database We have added a filter on the Customers recordset to this page in the Starting...
  • Page 56 View Shopping Cart Contents The Shopping Cart Display element is used to display the contents of the shopping cart. From the Element Toolbar, use the Shopping Cart and Display Element Collection, named BookStoreCartandDisplay, you previously created, and drop it on the layout. Select the Shopping Cart Display element, right click and choose Attributes.
  • Page 57 Displaying the OrderDate The order date is set to the current date of the server following these steps. Set tokens in the Order Date text box: Right-click the OrderDateText text box element and select Attributes. From the drop down list for Content, select Text. Click on the ellipses button to open the text editor.
  • Page 58 Inserting OrderDate into the Orders Recordset Set the token in the hidden form element: Right-click the OrderDateHidden element, in the Basement, and select Attributes. From the drop down list for Content, select Text. Click on the ellipses button to open the text editor. Enter [monthnumber]/[daynumber]/[year] for the tokens.
  • Page 59 Calculating the Subtotal These values are calculated using interactions between text boxes and the ShoppingCartObject. The steps for each one are the same, only the participants are different. To calculate the Subtotal: Select the SubtotalText text box. Type $[SUBTOTAL] in it Shift select the following elements: SubtotalText text box (on page) ShoppingCartObject (in Basement)
  • Page 60 Calculating and Displaying Shipping Cost There are numerous methods for calculating shipping costs in eStore Builder. For this tutorial, we will use the simplest method and calculate shipping cost based on a flat rate of $5 per item. Other options include shipping costs based on weight and on total purchase.
  • Page 61 Inserting Shipping Cost into the Orders Recordset Now we set up the Shipping Cost to be inserted into the Orders recordset when the Submit Order button is clicked. Since this is not possible using a text element, we need to insert it from the ShippingHidden hidden form SmartElement. Set the token in the hidden form element: Right-click the ShippingHidden element, in the basement, and select Attributes.
  • Page 62 Right click and choose Possible Interactions. In the Database Edit category, double click the interaction: Use ShippingHidden data to update/insert in Orders when SubmitOrder is clicked Set the Recordset parameter according to the following table, then click OK. Parameter Set to: Recordset Column Freight Calculating and Displaying Sales Tax...
  • Page 63 Inserting Sales Tax into the Orders recordset Now we need to set up the sales tax to be inserted into the Orders recordset when the Submit Order button is clicked. Set the token in the hidden form element: Right-click the SalesTaxHidden element, in the basement, and select Attributes.
  • Page 64 Right click and choose Possible Interactions. In the Database Edit category, double click the interaction:: Use SalesTaxHidden data to update/insert in Orders when SubmitOrder is clicked Set the Recordset Column parameter according to the following table, then click OK. Parameter Set to: Recordset Column SalesTax...
  • Page 65 Inserting CustomerID into the Orders Recordset The CustomerID is derived from the Customers recordset, and inserted into the Orders recordset. Bind the CustomerIDHidden element to the Customers recordset: Right-click the CustomerIDHidden element, in the Basement, and select Attributes. From the drop down list for Content, select Recordset. Select the Customers recordset, and the CustomerID column.
  • Page 66 To insert the new order and save the OrderID in the Session element: Shift select the following elements: Session (in Basement) Orders recordset (in Basement) Submit Order button (on page) Right click and choose Possible Interactions. Scroll to the eStore Shopping Cart category and double click the interaction: Insert order in Orders and store OrderID in Session when SubmitOrder is clicked...
  • Page 67 Insert the Shopping Cart as Order Details After you insert the order, and OrderID in the session object, you use the OrderID, along with the Shopping Cart contents to insert into the OrdersDetail recordset. Shift select the following elements: ShoppingCartObject (in Basement) Session (in Basement) OrderDetails recordset (in Basement) Submit Order button (on page)
  • Page 68 Submit the Form Next, you will apply the Activation that submits the form when the shopper clicks the Submit Order button. Right click the Submit Order element and choose Possible Activations. Scroll to the Forms Submit category and double click this activation: SubmitOrder: Submit the form when SubmitOrder is click Set the parameters according to the following table, then click OK.
  • Page 69 Publish and Browse Click the Publish button on the main toolbar and choose All Pages. Publishing takes a few moments. When Publishing has been completed, click Browse on the main toolbar. Take a Snapshot Site Snapshot enables you to save a copy of the project file in its current state under a different name.
  • Page 70: Step 3: Confirming The Order

    Step 3: Confirming the Order When the shopper clicks the Submit Order button on the Checkout page, two actions can take place depending on the outcome of the payment and order insert mechanisms. If the order is submitted properly, the shopper is taken to a confirmation page, which assures the shopper that he or she will soon receive the order.
  • Page 71 Use OrderID in Session to Filter Recordsets You will reference the recordset with the session variable before the Order Confirmation page loads ensuring that the current order is displayed. To do this: Click the Order Confirmation page to activate its layout. From Asset Center, click the Locate Assets button.
  • Page 72 To filter the customers recordset with the customerID: Shift select the following elements: Customers recordset (in Basement) CustOrderDetails recordset (in Basement) Right click and choose Possible Interactions. Scroll to the Database Filter category and double-click the interaction: Filter Customers with related field from CustOrderDetails Set the parameters according to the following table, then click OK.
  • Page 73 Display Order Data on Order Confirmation Page This is done by replacing tokens. Tokens for billing and order information are used on the Confirmation Page. To replace tokens for First and Last Name in Order Summary area: Shift select the following elements: Ordering text element (on page) Customers recordset (in Basement) Right click and choose Possible Interactions.
  • Page 74 To replace tokens for Total Price: Shift-select the following elements: TotalPrice text element (on page) OrderTotals recordset (in Basement) Right click and choose Possible Interactions. Scroll to the Database Miscellaneous category and double click the interaction: Replace [token] in TotalPrice with value of [Field] from OrderTotals Set the parameters according to the following table, then click OK.
  • Page 75 To replace tokens for Shipping Address data: Shift-select the following elements: City text element (on page) Customers recordset (in Basement) Right click and choose Possible Interactions. Scroll to the Database Miscellaneous category and double click the interaction: Replace multiple [tokens] in City with values from Customers Set the parameters according to the following table, then click OK.
  • Page 76 Moving Forward Quick Store is a fast-track approach to understanding e-commerce application development. Hopefully, by going through Quick Store, you have acquired an awareness of which SmartElements and Interactions can be used when developing an e-commerce application in Drumbeat. As well as getting acquainted with eStore, you have built a fully functioning store front.
  • Page 77: Chapter 2

    Shopping Cart Data-Map The Data-Map is a static Content Table in Drumbeat. You can change and customize it as you would any other static Content Table (see index of the Drumbeat User’s Guide or HTML Help for information about Content Tables). Depending on your specific storefront requirements, your Data Map will look different from project to project.
  • Page 78 Shopping Cart Display (Page-level) SmartElement This is a place-holder display image that represents the look and content of the server-side element. Since the actual content of the server-side Shopping Cart cannot be displayed at design-time, use the Shopping Cart Display page-level element while developing the storefront in Drumbeat.
  • Page 79: Chapter 2

    CHAPTER 2 Setting Up Product Pages ............
  • Page 80: Setting Site Preferences

    Setting Site Preferences Set the Drumbeat Site Preferences to ASP. From the main menu, choose File > Preferences > Site. Select ASP for the Server application support. Setting Publishing Settings Enter your publish settings. From the main menu, choose Publish > Publish Settings.
  • Page 81: Setting Up A Data Source Name To The Products Database

    Setting up a Data Source Name to the Products Database Set up a System Data Source Name (DSN) to the products database. The DSN is set up in the Windows ODBC Administrator that can be accessed from Query Manager in Drumbeat or from the Windows Control Panel. If you need step-by-step instruction on how to set up a DSN, check the index of the Drumbeat User’s Guide or Help for the words in bold.
  • Page 82: Creating A Query

    Creating a Query Create a query. From Asset Center, click Add Assets and choose Queries. Then click New. The SQL Query dialog opens where you can use SQL Wizard to create the query. The query results are used to generate the product pages. Click Save Query.
  • Page 83: Creating Product Pages With Dataform Wizard

    Creating Product Pages with DataForm Wizard This is a simple example in which two product pages are generated using DataForm Wizard. The first product page lists the product items in a table. The product name is linked to a product details page. After creating product pages, you can add the shopping components.
  • Page 84 In the first screen, select the ODBC Content Table that represents the product information. DataForm Wizard asks you to enter a name for your DataForm and choose the pages you want to create. A Detail page will always be created, so this option is checked by default and grayed out.
  • Page 85 In the Message option dialog, you can choose the message you want to display when users reach the end of record navigation while browsing Detail pages, or accept the defaults (No more records). In the next screen, you choose the columns in the Content Table that you want to display in the Detail page by checking those fields you want to include.
  • Page 86 In this example the Result List page is used to provide an abbreviated list of all product items by default (when the page is accessed directly, instead of via a search). In the next screen, you can choose to have sort features on the Results List page.
  • Page 87 The page that lists all the product items has a link to a page where the product item is described. Choose which column you want to link to the details page. If the unique key has not been set in the Query, you will have to indicate the unique keys in the database in one more dialog.
  • Page 88 After clicking Finish, DataForm Wizard generates the products results and details pages. Each DataForm page contains the Recordset SmartElement in the Basement that represents the data source for that page (as shown in the Results List page in the screenshot below). A Recordset element is created for each database query that is used on a page.
  • Page 89 The shopping cart will be added to the product detail page in Chapter 3: Adding Products to the Shopping Cart. If you need step-by-step instruction on how to publish and browse product pages, check the index of the Drumbeat User’s Guide or Help for the words in bold.
  • Page 91 CHAPTER 3 Adding and Updating the Shopping Cart ............
  • Page 92: Configuring The Shopping Cart's Content

    Updating the shopping cart can take place on the page where the shopper adds items to the shopping cart, or a redirection page. On either page, the shopper can manage the shopping cart by increasing the quantity of an item or removing it from the shopping cart altogether.
  • Page 93: Customizing The Data-Map

    Customizing the Data-Map Each project is unique. Therefore, you will probably want to customize the Data- Map at some point to suit your own requirements. Customizing the Data-Map gives you a lot of flexibility regarding the database tables you need to reference and the type of functionality you want to set up.
  • Page 94 In the Data-Map table in Drumbeat, double click the first cell under the column header titled ProductID. The text editor appears. Look at your products (source) database table in your database program to find the Unique Key field-name. Then, enter the field name of the Unique Key in the cell. The second column titled Qty, which stands for Quantity, has None entered by default and should not be changed.
  • Page 95 Double click the Price cell and enter the field name for the product-item price field. The next two cells in the basic Data-Map table: Total and Remove should not be changed. The word None is entered indicating that the content does not come from the source database.
  • Page 96 In the Data-Map table in Drumbeat, double click the second cell under the column header titled ProductID. The text editor appears. Look at your orders-details (destination) database table in your database program to find the Unique Key field-name. Then, enter the field name of the Unique Key in the cell.
  • Page 97 The second row should reflect the field names of your destination database. Double check to make sure that you haven’t made any typos and that you entered the correct field names. Note: Data-Map Third Row: Do not change this row. Provides keys for required columns of the shopping cart.
  • Page 98 Adding Columns to the Data-Map By adding columns to the Data-Map you can: Add additional columns in the Shopping Cart Display Capture additional columns into the Orders (destination database) tables. To add a column to the Data-Map content table: In Content Center, open the Data-Map. Click the Add Row/Column and choose Add Row from the list.
  • Page 99 In the Content dialog, make sure all the columns are under ‘Show these columns’. Note: A typical cause of the ‘SourceCol is undefined’ run-time error is caused by Data-Map columns configured as ‘not shown’ for the content attribute of the Shopping Cart. Displaying the Shopping Cart Data-Map Columns Data-Map Fourth Row (Is Visible): Determines the visibility of a column in the Shopping Cart Display element.
  • Page 100: Adding The Shopping Cart Smartelement

    Adding the Shopping Cart SmartElement To insert product items into a shopping cart, you need the Shopping Cart server, Recordset, and Form button SmartElements on the same page. In the example below, the Shopping Cart element is added to the Product Detail page generated by DataForm Wizard (see Chapter 2 Creating Products Pages).
  • Page 101 To create an Element Collection: In the Basement, right click the ShoppingCartObject element and choose Add to SmartElement Library. Name the element and click OK. From the Element Toolbar open the Element Library by clicking the Element Library button. Click the Element Collections tab and check the box next to the name.
  • Page 102: Adding An Add-To-Cart Button On The Shopping Page

    Adding an Add-to-Cart Button on the Shopping Page You can use either a Form Button or an Image Button on a product detail page that when submitted adds the product information to a Shopping Cart. The button must have a Submit Form action. The Form Button has the Submit Form action by default.
  • Page 103: Displaying Shopping Cart Items On A Page

    Parameters: Redirect after adding: A toggle that determines whether you want to redirect after adding the item or not. NewItemRedirect: Specifies the target page for redirecting after an item is successfully added to the cart. Redirect if already in Cart: Toggles whether you want to redirect to a message page if the selected item is already in the cart.
  • Page 104 To add the Shopping Cart server SmartElement from Asset Center: From Asset Center, click Locate Assets and choose SmartElements > Show all Custom SmartElements, mouse down to the Shopping Cart SmartElement. Drag and drop the element on the page. The element shows up in the Basement.
  • Page 105 Formatting the Shopping Cart Display SmartElement The Shopping Cart Display element can be displayed on the page in many ways. It has formatting attributes that you can change. Along with the attributes, you can customize the Data-Map and decide on such things as how many columns to display and the name of the column headers.
  • Page 106 Displaying Column Headers in the Shopping Cart Display Most likely, you will want to change the default column header names. These header names are coming from the column headers in the Data-Map. To change these names you need to open the Data-Map Content Table and change the column header name to the desired name.
  • Page 107: Updating The Shopping Cart

    Changing the Design-time Shopping Cart Image Once you have formatted the Shopping Cart display by setting its attributes, you can publish, browse, and then take a screenshot of the display. Save the screenshot as a BMP. Then, you can change the design-time image. From Element Library in the Appearance tab, you can browse to and select the BMP for the element to use at design-time.
  • Page 108 Inserting Quantities of Items To allow shoppers to edit the quantity for each item, you need to display the quantity column in the Shopping Cart Display page element. To allow shoppers to edit quantities: In Content Center, open the Data-Map Content Table. In the cell for the IsVisible row under the Qty column, set the value to 'True'.
  • Page 109: Testing And Trouble Shooting The Shopping Cart

    Testing and Trouble Shooting the Shopping Cart Once you have added and configured the shopping pages, you are ready to test the shopping cart connection to the products (source) and orders (destination) database tables. To test the shopping area, you must publish the site to an ASP- compatible server.
  • Page 111: Chapter 4

    CHAPTER 4 Creating Checkout Pages ............
  • Page 112: Creating Login Pages

    Creating Login Pages Login saves shoppers a lot of time from repeatedly entering account information when buying products. The username and password are compared against a customers database. If registered, the shopper is taken to the final checkout page listing account information and the shopping cart’s contents. The main functionality on a login page is set using the Security and Database Navigation Interactions.
  • Page 113 The first interaction compares the username and password to the Customers recordset. The security interaction is between the username and password edit boxes, the login button page elements, and the form and recordset Basement elements. In the parameters dialog, you can set up the failed and successful redirection pages.
  • Page 114 The second interaction maintains the state of the recordset when redirecting. It is between the login (form) button and the Customers recordset. Now, click an empty space on the layout to view the full list of interactions on the page. You can see that a number of Cookie Interactions. These interactions are applied to capture in a cookie the username and password.
  • Page 115: Creating New And Update User Pages

    Creating New and Update User Pages Both the new and update user pages insert and update user data into a Customers recordset. To use as an example open the QuickStoreComplete Starting Point (is not already) and activate the NewUser page in the layout. The NewUser page in the QuickStoreComplete EDF file was initially built using DataForm Wizard and then enhanced with elements and interactions.
  • Page 116 You can see that the enhanced NewUser page has an added recordset on the page. The recordset holds Credit Card types. This was added so that a dropdown list could be populated with the credit card types. Database Edit Interactions were applied to the credit card fields so the credit card selection would be inserted into the Customers database table.
  • Page 117 Notice on the page under the Shipping Information header, the checkout box that when checked enters the billing address in the shipping address fields. This is a very common and convenient feature. An Interaction under Forms Interelement category is used between a billing address, shipping address, and checkbox. The other interactions on the page are mainly for validation.
  • Page 118: Creating The Check Out Page

    Creating the Check Out Page At browse time the shopper logs in as an existing customer or registers as a new one on the New User page. Before the Checkout page loads the Customers recordset is filtered on the CustomerID in the session variable. Step 2 Logging in and Checking out in the Quick Store tutorial shows you how to save the CustomerID and filter the Customers recordset.
  • Page 119 Notice that some of the text fields have tokens and some do not. Select one of the text elements that do not have tokens and click the Attributes tab. You see that the Contents attribute is set to the Customers recordset. Now, select one of the text elements that have tokens.
  • Page 120 To create a token: Select the text element and type the desired text adding a token in brackets [ ]. Select the recordset in the Basement and text element on the page. Right click and choose Possible Interactions. Replace multiple [tokens] in [TextElement] with values from [Recordset] In the parameters dialog, type in the desired tokens.
  • Page 121: Chapter 5

    CHAPTER 5 Security ............
  • Page 122: Linking Using Https Protocol

    Linking Using HTTPS Protocol If you want to assign links using HTTPS protocol, you will need to set up a web server certificate. There are a number of vendors that provide digital certificates. The most popular vendors are: VeriSign: www.verisign.com Thawte: www.thawte.com You can go to their sites and apply for a digital certificate.
  • Page 123: Authentication And Log In

    Authentication and Log In Shoppers can bypass entering their account information multiple times by entering their user name and password. Conveniently, product items can be ordered in just a few clicks. As a developer, you can make sure account information is private and secure. To add privacy and security while logging in: On NT servers, use the Management Console to set up the Challenge Response.
  • Page 125: Chapter 6

    CHAPTER 6 Payment Processing ............
  • Page 126: Recommended Reading

    Recommended Reading Navigating E-Commerce (Copyright of MonkeySoup.com by Greg Zellers) Install Path: <installation directory>/Drumbeat/eStore Builder/navigating.doc Understanding Electronic Commerce, David Kosiur Microsoft Press. Online Transactions with CyberCash For online transactions, CyberCash provides credit card services that includes authorization, capture, voids, returns, etc. Currently, the Drumbeat CyberCash SmartElement provides the capability to authorize and capture credit card charges.
  • Page 127: Setting Up Cybercash Test Account

    Setting up CyberCash Test Account You can install a test account on your publishing server. From Windows Explorer, navigate to <installation directory>/Drumbeat 2000/ eStore Builder/Install. In the Install folder click on the Setup.exe file. The Merchant Connection Kit Setup is launched. Click Next. In the second screen, make sure the Build a Test Merchant radio button is selected and click Next.
  • Page 128: Adding The Cybercash Smartelement

    Adding the CyberCash SmartElement This example demonstrates how to add the CyberCash SmartElement and apply interactions to authorize and capture order and payment information. From Element Toolbar, add the CyberCash SmartElement to the layout. The element shows up in the Basement. Right click the CyberCash server object and select Attributes.
  • Page 129: Passing The Orderid To The Cybercash Object

    Passing the OrderID to the CyberCash Object To pass the orderID to the CyberCash element you need to have the Orders recordset, a Session element, and a Form button on the page. Open DrumNote 502 to view an example of this. These instructions show the interaction and its participants.
  • Page 130: Setting Customer Credit Card Properties

    Setting Customer Credit Card Properties This is an interaction that sets all the CyberCash SmartElement credit card properties to values from the Customer recordset. The Interaction parameters specify the columns in the recordset that contain data appropriate for the respective credit card properties. The customer’s table that the recordset queries, must have the following fields of data: Table Fields: BillingCountry...
  • Page 131: Submitting To Cybercash

    CyberCash Attribute Description: Parameter Set to: BillingCountryCol BillingCountry BillingZipCol BillingPostalCode BillingStateCol BillingRegion BillingCityCol BillingCity BillingAddressCol BillingAddress Exp Year Col CardExpYr Exp Month Col CardExpMo Card Number Col CreditCard CardHolder First Name Col FirstName CardHolder Last Name Col LastName Submitting to CyberCash This interaction is between the CyberCash element and a Form button.
  • Page 132: Storing The Transaction Results In Session Object

    Storing the Transaction Results in Session Object This Interaction allows you to store transaction status data returned from CyberCash in the Session object. The status can be displayed in the error message on a “failure” page (as seen in DrumNote 502). This interaction must be applied after the Submit contract.
  • Page 133: Storing The Transaction Results In The Orders Recordset

    Storing the Transaction Results in the Orders Recordset This interaction allows you to store the transaction results in the Orders recordset and redirect based on the transaction outcome (as seen in DrumNote 502). To store the outcome of the transaction: Shift select the following elements: Recordset (in Basement) Submit Order button (on page)
  • Page 134: Setting Up Offline Transactions

    Setting Up Offline Transactions To learn how to capture an order in an orders table, refer to Step 2 Logging In and Checking Out in the Quick Store tutorial under the Insert the Shopping Cart as Order Details section. Once the order has been captured in the database you can send it to the payment processor at any time.
  • Page 135 CHAPTER 7 Merchandising ............
  • Page 136: Setting Up Shopping Cart Adjustments

    Store merchandising adjustments: Percentage adjustments (discounts or fee) on total weight, quantity and purchase price. Percentage adjustments (discount) on total number of product items purchased. Flat-rate adjustments (discount or fee) on total weight, quantity and purchase price. Flat-rate adjustment (discount or fee) on total number of product items purchased.
  • Page 137: Setting Up Adjustments For Total Weight, Quantity Or Purchase

    Setting Up Adjustments for Total Weight, Quantity or Purchase You can add sub-total adjustments to the page by applying activations on the Shopping Cart. When you apply activations on the Shopping Cart SmartElement, you can set up the adjustment on such order attributes as, weight, quantity, or sub-total.
  • Page 138 In the Basement, right click the Shopping Cart SmartElement and choose Possible Activations. From the possible activations, in the eStore Adjustments category double click: Add [flat-value] adjustment [type] to [ShoppingCart] if [data] exceeds [threshold] In the parameters dialog, set the adjustment parameters. See below for parameter descriptions.
  • Page 139: Ordering Page Interactions

    Parameter Description: Parameter Description AdjustmentName Enter a name for the adjustment. AdjustmentType Select the type of adjustment: fee or discount. Comparison Select how you want the order data compared to the threshold: >= and <=. Data Select which shopping cart data to use when comparing against the threshold value: total weight, purchase or quantity.
  • Page 140: Adjustment Examples

    Adjustment Examples Refer to eStore DrumNotes on how to set up a few different types of adjustments within the Drumbeat site file. You can use these site files as building blocks in building your own project. Check the Drumbeat web site for additional DrumNotes that may have been added after this printing.
  • Page 141 DrumNote_500: Handling Fees This DrumNote demonstrates how to automatically add in special handling fees based on shopping cart data. You define a threshold number that must be met before the handling fee is activated. In this example we define a $15 handling fee for orders that exceed 25 pounds. You can also base the calculation on the shopping cart's total purchase or total quantity.
  • Page 143: Chapter 8

    CHAPTER 8 Customizing Quick Store ............
  • Page 144: Customizing Templates And Media Assets

    Customizing Templates and Media Assets You can change the background, navigation buttons and link styles on each template so that all the pages under them use your colors and theme. Change the Background Before making modifications, be sure to take a snapshot or open a site based on the QuickStoreComplete Starting Point so you don’t change the base site file.
  • Page 145 In the Media Properties dialog, click the File Location Browse button and navigate to the background you want to use. If the image does not appear as the background, uncheck and recheck the Background Image checkbox. For information about media assets, see chapter 7 Images in Using Drumbeat.
  • Page 146 Change the Navigation Buttons Before making modifications, be sure to take a snapshot or open a site based on the QuickStoreComplete Starting Point so you don’t change the base site file. Each templates has navigation buttons. You can change these buttons to suit your storefront in the attributes for the element.
  • Page 147 Change the Link Styles Before making modifications, be sure to take a snapshot or open a site based on the QuickStoreComplete Starting Point so you don’t change the base site file. You can change the Quick Store link styles to your own on the Master Template. To change link styles: In Templates Manager, click on the Master Template to make its layout active.
  • Page 148: Customizing The Quick Store Content

    Customizing the Quick Store Content The Quick Store content is derived from querying the products database. By changing the content in the products database, adding a new DataSource Name (DSN) and applying that DSN to each query in Drumbeat, you can quickly customize the content in Quick Store.
  • Page 149 Open the table in Datasheet view and replace the existing content with your product content. Book cover images are referenced from the books table in the Coverpic field. You can replace the existing images with your own product shots. Remember to copy your product shots to the images folder under the publishing directory.
  • Page 150 In SQL Query Manager, select the new DSN from the dropdown list. Click Save Query. In Query Manager, repeat steps 6 and 7 for each query so that each query uses the new DSN. Click Done to close the dialog.
  • Page 151 Publish and Browse You can change the publishing setting if you don’t want to override the Quick Store published files. You can learn about publishing Active Server Pages from Chapter 8 Publishing under Publishing Active Server Pages. Once you have published, browse the site with your customized images and content.
  • Page 153: Shopping Cart Smartelement

    CHAPTER 9 Shopping Cart Reference ............
  • Page 154 Shopping Cart Attributes The design-time behavior of the Shopping Cart is configured using the Attributes Sheet. Users can configure the following properties: Content: A Static Content table that contains titles of each column in the cart, the associated database source and destination columns, column keys, and column visibility information.
  • Page 155 Adjustments Array An array of Adjustment objects. Each adjustment object contains several properties that allow the value of the adjustment to be calculated throughout the application. Adjustments are added to the shopping cart using the AddAddjustment method. Values of the adjustment are calculated based on the adjustment object properties using the SetAdjustmentValue method.
  • Page 156: Shopping Cart Methods

    Order-level adjustments in the adjustments array are managed via a variety of eStore Adjustments contracts and several methods of the Shopping Cart's API. API methods most frequently used in associated with the adjsutments array are: GetSubTotal() GetAdjustedTotal() GetAdjustmentCount() GetAdjustmentsTotal() AdjustmentExists(Name) AddAdjustment(Name, AdjType, RateType, Rate, DataType, Threshold, Comparison) GetAdjustmentValueByName(Name)
  • Page 157 AddItem(DbRecordset,qty) Adds an item to the shopping cart, retrieving information from any data in the bindings array (see AddBinding above) and the Recordset based on column names provided in the Shopping Cart's data map. The DbRecordset parameter is a reference to a Drumbeat Recordset. The qty is the number of items to be added. If no quantity is passed, a default value of 1 is used.
  • Page 158 GetAdjustedTotal() Returns the shopping cart's subtotal adjusted for any adjustments in the shopping cart adjustments array. In other words, it is the sum of the value returned by GetSubTotal() and GetAdjustmentsTotal(). GetAdjustmentCount() Returns the number of adjustments with non-zero values currently in the shopping cart's adjustments array.
  • Page 159 GetItemCount() Returns the number of line-items currently in the shopping cart. Note that this is not the total quantity of items ordered (see GetTotalQuantity()). Example: If the shopping cart contains a single line in which 5 of ProductX are ordered, GetItemCount() returns 1 and GetTotalQuantity() returns 5.
  • Page 160 GetTotalWeight() Returns the total weight represented by the current order. This is useful for implementing weight-based shipping, for instance. Note that GetTotalWeight() only works if you track weight in the products database and have included the WEIGHT and TOTALWEIGHT required columns in your shopping cart data map.
  • Page 161 SetDiscount(data,type,row) Sets or updates a line-item discount based on the discount threshold and rate stored in the products database. The data argument specifies whether the discount is based on item price or quantity, the type specifies whether the discount is a flat or percentage discount, and row specifies the row to which the discount applies.
  • Page 162: Shopping Cart Events

    Shopping Cart Events Two events are available for the Shopping Cart: Server() The is the 'main event' for the shopping cart. The majority of the current contracts are executed in this event. In some cases, the order in which contracts are applied is important.
  • Page 163: Configuring Shopping Cart Content: The Data Map

    Configuring Shopping Cart Content: The Data Map For the Shopping Cart to function, you must supply its content in the form of a static content table, affectionately known as the Data Map. This content table provides an information map for the Shopping Cart. You must provide titles for each column of the data map and provide four additional rows.
  • Page 164 identifies the name of the database Data Map Second Row (Destination DB field) destination field for a given shopping cart column when the cart is submitted to your orders database. Values for this row will depend on your database schema, but you will typically want to store the ProductID, quantity and price.
  • Page 165: Modifying The Data Map Content Table

    Line-item discount columns are defined as follows: defines the threshold requirement for receiving the discount. This Disc_threshold value will most likely be obtained from your database. defines the rate of the discount if the threshold is met. Disc_rate determines the value of the discount based on characteristics of the Disc_value order item and the value in the DISC_RATE column.
  • Page 166: Specifying Shopping Cart Column Order

    Specifying Shopping Cart Column Order You can modify the order in which columns will appear in the Shopping Cart when you first assign the content table to the shopping cart, or by selecting the ellipses button next to the Cart's content attribute after the content has been assigned.
  • Page 167 Attributes The run-time appearance of the Shopping Cart Display is configured using the Attributes Sheet. Users can configure the following properties: specifies the table border width in the Shopping Cart Display. Border specifies the table cell padding in the display. Padding specifies the table cell spacing in the display.
  • Page 168 specifies font and background color formatting for the Header Row HeaderStyle of the table as a Drumbeat style. name of the Shopping Cart Display. Name a comma-delimited set of percentages to specify the relative ColumnWidths column widths of the table. Percentages represent the percentage of the total table width.
  • Page 169: Shopping Cart Interactions

    Shopping Cart Interactions The Shopping Cart Contracts allow you to add items to and update items in a shopping cart, insert shopping cart data into a database, and perform a couple of miscellaneous display functions based on data in the shopping cart. Add item from [Recordset] to [ShoppingCart] when [button] is clicked This is a contract between a basement Shopping Cart SmartElement, a submit...
  • Page 170 Add item from [Recordset] to [ShoppingCart] when [button] is clicked using quantity from [FormElement] This is a contract between a basement Shopping Cart SmartElement, a submit button, a form element and a Recordset that provides source data to the Shopping Cart.
  • Page 171 Add item from [Recordset] to [ShoppingCart] when [imagebutton] is clicked (Looper) Use this contract to add items to the shopping cart directly from a looper-based results list without having to navigate to a detail page. It is an interaction between a basement Shopping Cart SmartElement, an image or image button, and a Recordset that provides source data to the Shopping Cart.
  • Page 172 Add item from [Recordset] to [ShoppingCart] when [textelement] is clicked (Looper) Use this contract to add items to the shopping cart directly from a looper-based results list without having to navigate to a detail page. It is an interaction between a basement Shopping Cart SmartElement, a text element, and a Recordset that provides source data to the Shopping Cart.
  • Page 173 Add item from [Recordset] to [ShoppingCart] when [imagebutton] is clicked using quantity from [FormElement] (Looper) Use this contract to add items to the shopping cart directly from a looper-based results list without having to navigate to a detail page. It is an interaction between a basement Shopping Cart SmartElement, an image or image button, an edit box or drop down list, and a Recordset that provides source data to the Shopping Cart.
  • Page 174 Insert [ShoppingCart] items as new records in [Recordset] when [button] is clicked This contract is an interaction between a basement ShoppingCart element, a submit button, and the destination Recordset for the Cart data. When the button is clicked, the shopping cart data is inserted into the orders database. The "Go To Page"...
  • Page 175 Insert [ShoppingCart] in [Recordset] when [button] is clicked using OrderID from [HiddenFormElement] This contract is an interaction between a basement ShoppingCart element, a submit button, a Hidden Form Element and the destination Recordset for the Cart data. This contract can be used when the order information is submitted on a previous page and redirected to a confirmation page, where the OrderID generated from the previous page is assigned to a form element.
  • Page 176 Insert [ShoppingCart] in [Recordset] when [button] is clicked using OrderID from [ASPServer] Similar to its Hidden Form Element counterpart, this contract is an interaction between a basement ShoppingCart element, a submit button, an ASPServer object and the destination Recordset for the Cart data. Note: This contract can be used in conjunction with contracts that generate an OrderID needed for an OrderDetails record (such as the 'Insert order in [recordset]...' and "Replace...
  • Page 177 Insert order in [Recordset] and store OrderID in [ASPServer] when [button] is clicked This contract inserts a new Order record and allows you to obtain an Autonumber OrderID from the database when a new order is generated from the on-line store. The Autonumber OrderID is placed in an ASPServer object (typically a Session variable).
  • Page 178 Insert [ShoppingCart] in [Recordset] when [button] is clicked using OrderID from [ASPServer] if [CyberCash] transaction is success This contract is an extension of the interaction to submit the Shopping cart contents to a recordset using an OrderID from the Session. With an additional participant - the CyberCash element - this contract allows you to submit the cart contents if the Cybercash transaction was successful, otherwise the cart won't be submitted.
  • Page 179 Insert [ShoppingCart] in [Recordset] when [button] is clicked using OrderID from [HiddenFormElement] if [CyberCash] transaction is success This contract is an extension of the interaction to submit the Shopping cart contents to a recordset using an OrderID from a Hidden Form Element. With an additional participant - the CyberCash element - this contract allows you to submit the cart contents if the Cybercash transaction was successful, otherwise the cart won't be submitted.
  • Page 180 Update [ShoppingCart] with data from [SCDisplay] when [button] is clicked This contract is primarily intended for the page containing the shopping cart display element. Within the display element, you can edit quantities and mark items for removal. When the contract is applied the Shopping Cart element, the SC Display and a submit button, the shopping cart is updated to reflect the modifications made in the display element.
  • Page 181 Populate [ShoppingCart] with Order from [Recordset] when [button] is clicked This contract retrieves an order record and associated order detail records from the database and populates the shopping cart. The source recordset's query will likely be based on a view that joins the Orders, OrderDetails, Customers and Product tables, so that all the relevant display information for the cart can be retrieved.
  • Page 182 Remove all [ShoppingCart] items when [source] is clicked and redirect to page This interaction will remove the session variables that are associated with the shopping cart. It will preserve other session information that you may not want to destroy when the user removes all the items from the cart. Note: Note that it is not necessary when doing an insert of the cart contents in the database.
  • Page 183 Replace [token] in [target] with item count from [ShoppingCart] This interaction replaces a token in a text element with the item count currently in the shopping cart. the item count, in this case, refers to the number of cart line items as opposed to the total quantity of items in the cart.
  • Page 184 Replace [token] in [target] with unique OrderID This is an activation on a text element that replaces a token in a text element with the value of an unique OrderID generated by the server. The OrderID is generated using the SessionID and a timestamp. Parameters: Token is the exact case-sensitive text in the text element that will be replaced with the unique OrderID...
  • Page 185 Add [EditBox] to bindings of [ShoppingCart] when [button] is clicked This contract allows you to add non-recordset data contained in an edit box to the shopping cart when an item is added is added to the cart. This contract must be applied to the Cart before the "Add Item"...
  • Page 186 Add value of [ASPServer] variable to bindings of [ShoppingCart] when [button] is clicked This contract allows you to add non-recordset data contained in a Session variable to the shopping cart when an item is added is added to the cart. This contract must be applied to the Cart before the "Add Item"...
  • Page 187: Shopping Cart Miscellaneous Interactions

    Shopping Cart Miscellaneous Interactions The Drumbeat Shopping Cart Miscellaneous Contracts allow you to enable several miscellaneous eStore features that aren't part of the Core shopping cart functionality. (Allow Mulitples) - Add item from [Recordset] to [ShoppingCart] when [button] is clicked This is a variation of the "Add item from [Recordset] to [ShoppingCart] when [button] is clicked"...
  • Page 188 (AllowMultiples) - Add item from [Recordset] to [ShoppingCart] when [button] is clicked using quantity from [FormElement] This is a variation of the "Add item from [Recordset] to [ShoppingCart] when [button] is clicked using quantity from [FormElement]" contract that allows you to add the same product more than once to your shopping cart.
  • Page 189 Add item from [Recordset] to [ShoppingCart] when [imagebutton] is clicked (Looper)–Allow Multiples This is a variation of the "Add item from [Recordset] to [ShoppingCart] when [imagebutton] is clicked–(Looper) " contract that allows you to add the same product more than once to your shopping cart. Use this contract to add items to the shopping cart directly from a looper-based results list without having to navigate to a detail page.
  • Page 190 Add item from [Recordset] to [ShoppingCart] when [textelement] is clicked (Looper) - Allow Multiples This is a variation of the "Add item from [Recordset] to [ShoppingCart] when [textelement] is clicked - (Looper) " contract that allows you to add the same product more than once to your shopping cart.
  • Page 191 Replace token in [TextElement] with related products from [Recordset], except [ShoppingCart] items and current product from [ProductRecordset] This is a very specialized contract to populate a text element with a list of related products to a given product on a storefront shopping page. It allows you to incorporate the "Customers who bought this product also purchased these products"...
  • Page 192 Replace [token] in [target] with last [N] characters in credit card number from [Recordset] The interaction allows you to replace a token in a text element the last several digits of a credit card number along with a mask specified as a parameter. This allows you to display a customer's credit card number (at least the last few digits) without displaying the whole number and jeopardizing the security of this important customer information.
  • Page 193: Shopping Cart Adjustments

    Shopping Cart Adjustments The Service release of Drumbeat eStore Builder includes a number of enhancements in the Shopping Cart that enable various merchandising features. These merchandising features are implemented via several new methods and properties of the Shopping Cart API, along with associated contract described in the document.
  • Page 194: Shopping Cart Contracts

    Shopping Cart Contracts Add [percentage] adjustment [type] to [ShoppingCart] based on [comparison] of [OrderData] to [threshold] This is an activation on the ShoppingCart that adds a percentage adjustment to the cart based on how the specified order data parameter compares to the threshold parameter.
  • Page 195 Add [percentage] adjustment [type] to [ShoppingCart] if [ASPServer] variable matches [value] This is an interaction between the Shopping Cart and a basement Session element that adds a percentage adjustment to the cart if the specified Session variable matches the specified value. An adjustment in this context represents a fee or discount on the total order.
  • Page 196 Add [percentage] adjustment [type] to [ShoppingCart] when [button] is clicked (requires submit) This is an interaction between the ShoppingCart and a button that adds a percentage adjustment to the cart without any data criterion constraints. An adjustment in this context represents a fee or discount on the total order and is set using the 'AdjustmentType' parameter.
  • Page 197 Add [flat-value] adjustment [type] to [ShoppingCart] based on [comparison] of [OrderData] to [threshold] This is an activation on the Shopping Cart that adds a flat adjustment to the cart based on how the specified order data parameter compares to the threshold parameter.
  • Page 198 Add [flat-value] adjustment [type] to [ShoppingCart] if [ASPServer] variable matches [value] This is an interaction between the Shopping Cart and a basement Session element that adds a percentage adjustment to the cart if the specified Session variable matches the specified value. An adjustment in this context represents a fee or discount on the total order and is set with the 'AdjustmentType' parameter.
  • Page 199 Add [flat-value] adjustment [type] to [ShoppingCart] when [button] is clicked (requires submit) This is an interaction between the ShoppingCart and a button that adds a flat adjustment to the cart without any data criterion constraints. An adjustment in this context represents a fee or discount on the total order and is set using the 'AdjustmentType' parameter.
  • Page 200 Set line-item [type] discount from [Recordset] in [ShoppingCart] if [data] threshold is met when [button] is clicked This is an interaction between the Shopping Cart, a recordset and a button that will determine whether a line item discount should be applied on a particular product based on criteria stored for that product in the recordset.
  • Page 201 Set line-item discount in [ShoppingCart] if threshold is met based on criteria in [Recordset] when [button] is clicked This is an interaction between the ShoppingCart, a recordset and a button that will determine whether a line item discount should be applied on a particular product based on criteria stored for that product in the recordset.
  • Page 202 Add flat adjustment [type] from [Recordset] schedule based on [ShoppingCart] data This is an extension of the related ShoppingCart activation that adds a flat adjustment to the cart based on how the specified order data parameter compares to the threshold parameter. In this case, however, the Shopping Cart interacts with a recordset that contains ranges of the specified order data and associated adjustment rates.
  • Page 203 Add percentage adjustment [type] from [Recordset] schedule based on [ShoppingCart] data This is an extension of the related Shopping Cart activation that adds a percentage adjustment to the cart based on how the specified order data parameter compares to the threshold parameter. In this case, however, the Shopping Cart interacts with a recordset that contains ranges of the specified order data and associated adjustment rates.
  • Page 204 Replace [token] in [target] with value of adjustment [name] from [ShoppingCart] This is an interaction between the ShoppingCart and a text element or edit box that replaces a token with the value of an adjustment whose name is provided as a contract parameter.
  • Page 205 Replace [token] in [target] with adjustments total from [ShoppingCart] This is an interaction between the ShoppingCart and a text element or edit box that replaces a token with the sum total of adjustments currently applied to the cart. This contract simply returns a string representation of a number formatted to two decimal places.
  • Page 206 Insert adjustments from [ShoppingCart] in [Recordset] when [button] is clicked using OrderID from [HiddenFormElement] This contract is an interaction between a basement ShoppingCart element, a submit button, a Hidden Form Element and the destination Recordset for the Cart data. This contract can be used when the order information is submitted on a previous page and redirected to a confirmation page, where the OrderID generated from the previous page is assigned to a form element.
  • Page 207 Insert adjustments from [ShoppingCart] in [Recordset] when [button] is clicked using OrderID from [ASPServer] Similar to its Hidden Form Element counter part, this contract is an interaction between a basement ShoppingCart element, a submit button, an ASPServer object and the destination Recordset for the Cart adjustments. When the button is clicked, the shopping cart adjustments are inserted into the orders database using the OrderID stored in the ASPServer, where each cart adjustment will become a record in the recordset.
  • Page 208 Do not create [target] if [adjustment] exists in [ShoppingCart] Will not show the target participant if the specified adjustment exists in the shopping cart. Parameters: AdjustmentName is the name of the shopping cart adjustment used to determine if the target will be shown Participants: Shopping Cart Target (image, button, text element, etc.)
  • Page 209: Inventory Control

    Inventory Control The service release of Drumbeat eStore builder includes several new inventory related capabilities that are enabled through the eStore inventory contracts. The use of these contracts is illustrated in DrumNote_508. Replace [token] in [target] with product availability from [recordset] This is an interaction between a recordset and a text element or hidden form element that replaces a token with the availability of a given product.
  • Page 210 Show [image] based on availability from [recordset] This contract is conceptually similar to the "Replace [token] in [target] with product availability from [recordset]" contract, except that an 'in-stock' image is shown when the product is in stock, otherwise, an 'out-of-stock' image is shown. The contract assumes that the recordset contains the columns to store the units in stock, the units on order and the reorder level.
  • Page 211 Update inventory in [Recordset] with [ShoppingCart] data when [button] is clicked Use this contract when an order is being captured to increment the 'UnitsOnOrder' column of the products recordset by the number of items being ordered for each product in the shopping cart. This is an interaction between the shopping cart, a recordset and a button.
  • Page 212 Do not create [target] if the quantity of any product in [OrderDetailsRS] exceeds stock levels in [ProductRS] Will not show the target participant if any product specified in the OrderDetailsRS does not have sufficient quantity in stock to fulfill the quantity ordered.
  • Page 213 Create [target] if the quantity of any product in [OrderDetailsRS] exceeds stock levels in [ProductRS] This contract is the opposite of the "Do not create [target] if the quantity of any product in [OrderDetailsRS] exceeds stock levels in [ProductRS]" contract. It will only show the target participant if any product specified in the OrderDetailsRS does not have sufficient quantity in stock to fulfill the quantity ordered.
  • Page 214 Update inventory in [ProductsRS] with [OrderDetailsRS] data when [button] is clicked This contract updated the inventory data in the Products recordset when an order is fulfilled by clicking a button. This contract is intended to be used in conjuction with an update contract on the order record. In other words, the page should contain and Orders and OrderDetails recordset filtered on the OrderID so that they are showing data for the same order.
  • Page 215: Chapter 10

    CHAPTER 10 CyberCash SmartElement Reference ............
  • Page 216: Cybercash Features Supported

    CyberCash Features Supported CyberCash provides a full array of credit card services that includes authorization, capture, voids, returns, etc. Currently, the Drumbeat CyberCash SmartElement provides the capability to 'authorize' and 'capture' credit card charges. In the terminology of credit card processing, 'authorization' means verifying that the credit card has sufficient credit to cover the requested purchase.
  • Page 217 Run-Time Attributes The following attributes are customer and order-related variables sent to or returned from the CyberCash CashRegister. Because these are specific to a particular customer and order, they are only accessible at run-time and are set using associated CyberCash contracts. is the first name of the cardholder for the credit card being submitted FirstName is the last name of the cardholder for the credit card being submitted...
  • Page 218: Contracts

    CyberCash Interactions The Drumbeat CyberCash contracts interact with the CyberCash SmartElement to enable CyberCash transaction services in an online store. While setting up and using the CyberCash element is easy, you will still need to register as a merchant with CyberCash, install and configure the CyberCash Merchant Connection Kit (MCK), and set up bank accounts for your commerce sites before you can go live.
  • Page 219 Set [CyberCash] <Credit Card property> to value from [Recordset] when [button] is clicked A series of interactions between the CyberCash SmartElement, a Recordset, and a button that submits the page. There are interactions for each of the CyberCash element's credit card-related properties. Each of these contracts includes a parameter that specifies the column name in the recordset that contains the appropriate data.
  • Page 220 Submit [CyberCash] data for processing when [button] is clicked This contract between the CyberCash element and a button that submits the page sends data to the CyberCash CashRegister for processing and stores the transaction results in the CyberCash SmartElement. This contract must be applied after all of the 'Set' contracts have been applied.
  • Page 221: Shipping Calculations

    Order is Important There are two requirements for proper ordering. First, the contracts must be applied in the proper order, with the battery of 'Set' contracts being applied before the 'submit' contract, which in turn have to be applied before the contracts to respond to transaction results.
  • Page 222: Version 2.0 Contracts

    Version 2.0 Contracts Populate [ListElement] with UPS options using weight from [ShoppingCart] and billing info from [recordset] This is a server-side contract that populates a dropdown list with available UPS shipping options and corresponding shipping costs. After the contract executes, the dropdown list will display each available shipping option.
  • Page 223 Populate [ListElement] with ship options from [Recordset] using weight from [ShoppingCart] This contract creates a dropdown list of ship options from a recordset containing various ship methods from various carriers based on a single rate zone. The recordset is built from a table that contains a specified zone from the carriers shipping rate tables.
  • Page 224 For example, suppose you choose to charge Zone 7 ship rates by default and you are a merchant in California. The ship cost for customers on the Eastern seaboard probably corresponds to Zone 8 rates. By supplying a list of states on the eastern seaboard (i.e., NY, RI, VT, etc) and an alternate zone of Zone8, you can charge customers in these states Zone 8 rates.
  • Page 225 Set shipping in [ShoppingCart] to value of [ListElement] containing ship data Sets the shipping property of the Shopping cart to the cost value of the selected option from a list element that contains ship costs in the value of each list option. This is a general contract to be used with list elements that are populated manually.
  • Page 226 Set shipping in [ShoppingCart] to [flat-rate] shipping based on total order quantity This is a server-side contract that sets the ShoppingCart shipping property to a shipping value based on a flat-rate shipping charge for each item ordered. The number of items ordered is determined from the shopping cart. For instance, suppose you have 5 items ordered, and you specify a flat rate of 5.00 per item.
  • Page 227 Use [ShipList] data to update/insert in [ShipViaCol] and [ShipCostCol] of [Recordset] when [button] is clicked Inserts/updates a recordset with data from a list element that is populated via the 'Populate list element..." contracts from eStore version 2. This contract inserts the list element's 'value' attribute.
  • Page 228: Version 1.0 Contracts

    Replace [token] in [target] with value of grand total from [ShoppingCart] This is an interaction between the ShoppingCart and a text element or edit box that replaces a token with the value of the shopping cart's grand total. This is determined as the sum of the shopping cart's adjusted total, shipping and sales tax.
  • Page 229 Set value in [grandtotal] to sum of [EditBoxes] when [ShipList] changes This is a client-side contract that calculates a grand total as the sum of values contained in edit boxes when the selected shipping option of a dropdown list is changed.
  • Page 230 Replace [token] in [target] with shipping value from [recordset] based on [ShoppingCart] data This is a server-side contract that replaces a token in a text element or edit box with a shipping value from a lookup recordset based on the weight or purchase price of an order containined in the shopping cart.
  • Page 231 Replace [token] in [target] with sum of [ShoppingCart] adjusted subtotal, shipping, and tax This is a server-side contract that replaces a token in a text element or edit box with a the sum of the ShoppingCart subtotal, a shipping value contained in another text element, and a sales tax value contained in yet another text element.
  • Page 232: Known Issues With Using Ups Shipping Contracts

    Known Issues With Using UPS Shipping Contracts The UPS shipping contracts allow you to present UPS shipping options and calculate shipping costs based on input parameters for an order in your online store. Currently, the contracts only support shipping calculation for UPS. The shipping calculations rely on passing input data from your order to a UPS cgi script.
  • Page 233: Sales Tax Interactions

    Sales Tax Interactions Set sales tax in [ShoppingCart] to tax value from [TaxRS] using state from [CustomerRS] This contract sets the shopping cart sales tax property based on the sales tax rate for the customers billing state and the current value for the shopping cart's adjusted subtotal.
  • Page 234 Replace [token] in [target] with value of sales tax from [ShoppingCart] Replaces a token in a text element, edit box, or hidden form element with the value of the shopping cart's sales tax property. Use the "Set sales tax in [ShoppingCart] to tax value from [TaxRS] using state from [CustomerRS]"...
  • Page 235 Replace [token] in [target] with sales tax from [TaxRS] using [ShoppingCart] total and state from [CustomerRS] Note: This contract was initially developed between the version 1 and version 2 releases of eStore and is deprecated in favor of the version 2 contract "Set sales tax in [ShoppingCart] to tax value from [TaxRS] using state from [CustomerRS]"...
  • Page 237 INDEX Active Server Pages Data Source Name 81 publish settings 80 set up 81 security 123 database, products table 79 server application support 80 databases, security 122 site preferences 80 DataForm wizard 79 Add-to-Cart button, adding to shopping page 102 Data-Map adjustments CSV file 92...
  • Page 238 Shopping Cart adding from Asset Center 100 password, login 112 adding to a page 100 payment processing 125 adding to product pages 91 SET 123 adjustments 135 product pages adjustments reference 193 setting up 79 API methods 154 Shopping Cart SmartElements 91 contracts 169 using DataForm wizard 79 displaying column headers 106...

Table of Contents