MACROMEDIA DRUMBEAT 2000 ECOMMERCE EDITION User Manual

Summary of DRUMBEAT 2000 ECOMMERCE EDITION

  • Page 1

    Users guide macromedia ® drumbeat ™ 2000 ecommerce edition.

  • Page 2

    2 trademarks macromedia, the macromedia logo, the made with macromedia logo, authorware, backstage, director, extreme 3d, and fontographer are registered trademarks, and afterburner, appletace, authorware interactive studio, backstage, backstage designer, backstage desktop studio, backstage enterpri...

  • Page 3

    3 contents introduction developing an e-commerce site. . . . . . . . . . . . . . . . . 7 paths to e-commerce development . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 a typical e-commerce flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 up and running fast with es...

  • Page 4

    Contents 4 chapter 3 adding and updating the shopping cart . . . . . . . . 91 configuring the shopping cart’s content. . . . . . . . . . . . . . . . . . . . . . .92 customizing the data-map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93 adding the shopping cart smartelement . ....

  • Page 5

    Contents 5 chapter 7 merchandising . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 setting up shopping cart adjustments . . . . . . . . . . . . . . . . . . . . . . .136 setting up adjustments for total weight, quantity or purchase. . . . .137 ordering page interactions . . . . . ...

  • Page 6

    Contents 6.

  • Page 7

    7 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Developing an e-commerce site the development cycle for each e-comm...

  • Page 8

    Introduction 8 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, an...

  • Page 9: A Typical E-Commerce Flow

    Developing an e-commerce site 9 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 a...

  • Page 10: How to Use This Book

    Introduction 10 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 window...

  • Page 11: Drumbeat Support Center

    Developing an e-commerce site 11 minimum: 166mhz; 128 megs ram asp enabled sa or ms postingacceptor installed odbc dsn creation/update methodology installing drumbeat 2000 estore builder to install storebuilder from the cd: 1 insert the drumbeat 2000 with estore builder, or the estore builder cd. Th...

  • Page 12

    Introduction 12.

  • Page 13

    13 1 chapter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quick store tutorial the quick store tutorial walks you through the...

  • Page 14: Starting Point

    Chapter 1 14 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 ...

  • Page 15

    Quick store tutorial 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 ...

  • Page 16

    Chapter 1 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 s...

  • Page 17

    Quick store tutorial 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...

  • Page 18

    Chapter 1 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 inclu...

  • Page 19

    Quick store tutorial 19 the description and purpose of each recordset is explained in the following table. For answers about database-related questions, check the index of the drumbeat user’s guide or help for the words in bold. Estore builder smartelements in drumbeat, a smartelement is any type of...

  • Page 20

    Chapter 1 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 th...

  • Page 21

    Quick store tutorial 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...

  • Page 22

    Chapter 1 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. If you are new ...

  • Page 23

    Quick store tutorial 23 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 ele...

  • Page 24

    Chapter 1 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. 1 from the smartelements toolbar, select the shopping cart smartelement and drop it on the page. The basement opens (if not already) and the el...

  • Page 25

    Quick store tutorial 25 2 right click the cart1 smartelement in the basement and select attributes. In the attributes sheet, set the attributes as shown in the table. Each time you use the shopping cart smartelement on a page, the content must be set to the shopping cart data-map content table. Sinc...

  • Page 26

    Chapter 1 26 to create an element collection for the shoppingcart object: 1 right click the shoppingcartobject element in the basement and choose add to smartelement library. Name the element bookstorecart and click ok. 2 from the element toolbar open the element library by clicking the element libr...

  • Page 27

    Quick store tutorial 27 3 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...

  • Page 28

    Chapter 1 28 to add a shopping cart button: 1 drag an image button from the smartelements toolbar to the upper right side of the layout (under the ‘number of copies’ text). 2 in the attributes tab, name the button shoppingcartbutton. 3 from asset center query for images. Locate and drag the btn-addt...

  • Page 29

    Quick store tutorial 29 6 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 ...

  • Page 30

    Chapter 1 30 7 set the parameters according to the following table, then click ok. 8 click ok and ok again. Then, close interactions center. Parameter description set to: redirect after adding redirect the shopper to confirmation page. Checked redirect if already in cart: redirect the shopper to a m...

  • Page 31

    Quick store tutorial 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: 1 in site manager, click the shoppin...

  • Page 32

    Chapter 1 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 24 top 234 width 555 height 135 border 0 padding 2 spacing 0 ...

  • Page 33

    Quick store tutorial 33 for more information about the attributes of the shopping cart display smartelement, see the shopping cart display smartelement section of the reference guide section in this book. Create an element collection with the shopping cart page and basement elements so you don't hav...

  • Page 34

    Chapter 1 34 to create an element collection for the shoppingcartdisplay object: 1 in the layout, shift-select the shoppingcartdisplay and shoppingcartobject elements. Right click and choose add to smartelement library. Name the element bookstorecartanddisplay. Click ok . 2 in element library, click...

  • Page 35: Managing The Cart

    Quick store tutorial 35 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 sh...

  • Page 36

    Chapter 1 36 3 shift select the following elements: update button (on page) shoppingcartobject (in basement) 4 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...

  • Page 37

    Quick store tutorial 37 add a checkout button to add a checkout button: 1 from the smartelements toolbar, add another form button to the layout, next to the update order button. 2 right click the button and choose attributes. In the attributes sheet, set the attributes according to the following tab...

  • Page 38

    Chapter 1 38 4 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 pa...

  • Page 39

    Quick store tutorial 39 6 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. 7 in the parameters dialog, click assign. Then, ...

  • Page 40

    Chapter 1 40 clear items from the cart to clear all items from cart: 1 from the smartelements toolbar, add another form button to the layout next to the checkout button. 2 right click the button and choose attributes. In the attributes sheet, set the attributes according to the following table and a...

  • Page 41

    Quick store tutorial 41 4 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. 5 with the clearcart button and shoppingcartobject e...

  • Page 42

    Chapter 1 42 add a continue shopping button to add a continue shopping button: 1 from smartelements toolbar, add another form button to the layout next to the clear cart button. 2 right click the button and choose attributes. In the attributes sheet, set the attributes according to the following tab...

  • Page 43

    Quick store tutorial 43 4 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 5 in the parameters dialog, click assign. The...

  • Page 44

    Chapter 1 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: 1 in windows explorer, create a new folder under the inetpub\wwwroot\ directory. Name the new folder ...

  • Page 45

    Quick store tutorial 45 3 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 pub...

  • Page 46

    Chapter 1 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 b...

  • Page 47: Logging In

    Quick store tutorial 47 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 ...

  • Page 48

    Chapter 1 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 simples...

  • Page 49

    Quick store tutorial 49 8 select the form element in the basement. Right click and choose possible activations. 9 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 valida...

  • Page 50

    Chapter 1 50 6 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 7 set the name parameter to estoreusername, then click ok. 8 to insert the use...

  • Page 51

    Quick store tutorial 51 to save the passwords in a cookie: 1 to ensure the necessary elements are selected, first select the password edit box. Then, shift-select the passwordcookie element in the basement. 2 right click and choose possible interactions. 3 view the cookie category and double click t...

  • Page 52

    Chapter 1 52 10 set the name parameter to estore password, then click ok. 11 select the savepassword checkbox. Then shift select the passwordcookie. 12 interaction center now shows the possible interactions for the check box and cookie elements currently selected. Double click this interaction:: set...

  • Page 53

    Quick store tutorial 53 3 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) 4 set the parameters according to the following table, then click ok. See drumnote 3 ...

  • Page 54: Checking Out

    Chapter 1 54 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, re...

  • Page 55

    Quick store tutorial 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 ed...

  • Page 56

    Chapter 1 56 view shopping cart contents the shopping cart display element is used to display the contents of the shopping cart. 1 from the element toolbar, use the shopping cart and display element collection, named bookstorecartanddisplay, you previously created, and drop it on the layout. 2 selec...

  • Page 57

    Quick store tutorial 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: 1 right-click the orderdatetext text box element and select attributes. 2 from the drop down list for content, select text. 3 click o...

  • Page 58

    Chapter 1 58 inserting orderdate into the orders recordset set the token in the hidden form element: 1 right-click the orderdatehidden element, in the basement, and select attributes. 2 from the drop down list for content, select text. 3 click on the ellipses button to open the text editor. 4 enter ...

  • Page 59

    Quick store tutorial 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: 1 select the subtotaltext text box. Type $[subtotal] in ...

  • Page 60

    Chapter 1 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 ...

  • Page 61

    Quick store tutorial 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 smarte...

  • Page 62

    Chapter 1 62 8 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 9 set the recordset parameter according to the following table, then click ok. Calculating and disp...

  • Page 63

    Quick store tutorial 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: 1 right-click the salestaxhidden element, in the basement, and select ...

  • Page 64

    Chapter 1 64 5 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 6 set the recordset column parameter according to the following table, then click ok. Calculating ...

  • Page 65

    Quick store tutorial 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: 1 right-click the customeridhidden element, in the basement, and select...

  • Page 66

    Chapter 1 66 to insert the new order and save the orderid in the session element: 1 shift select the following elements: session (in basement) orders recordset (in basement) submit order button (on page) 2 right click and choose possible interactions. Scroll to the estore shopping cart category and ...

  • Page 67

    Quick store tutorial 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. 1 shift select the following elements: shoppingcartobject (in basemen...

  • Page 68

    Chapter 1 68 submit the form next, you will apply the activation that submits the form when the shopper clicks the submit order button. 1 right click the submit order element and choose possible activations. 2 scroll to the forms submit category and double click this activation: submitorder: submit ...

  • Page 69

    Quick store tutorial 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 curr...

  • Page 70: Step 3: Confirming The Order

    Chapter 1 70 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 assur...

  • Page 71

    Quick store tutorial 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: 1 click the order confirmation page to activate its layout. 2 from asset c...

  • Page 72

    Chapter 1 72 to filter the customers recordset with the customerid: 1 shift select the following elements: customers recordset (in basement) custorderdetails recordset (in basement) 2 right click and choose possible interactions. Scroll to the database filter category and double-click the interactio...

  • Page 73

    Quick store tutorial 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: 1 shift select the following elements: ordering text el...

  • Page 74

    Chapter 1 74 to replace tokens for total price: 1 shift-select the following elements: totalprice text element (on page) ordertotals recordset (in basement) 2 right click and choose possible interactions. Scroll to the database miscellaneous category and double click the interaction: replace [token]...

  • Page 75

    Quick store tutorial 75 to replace tokens for shipping address data: 1 shift-select the following elements: city text element (on page) customers recordset (in basement) 2 right click and choose possible interactions. Scroll to the database miscellaneous category and double click the interaction: re...

  • Page 76

    Chapter 1 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 ...

  • Page 77

    Quick store tutorial 77 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 storef...

  • Page 78

    Chapter 1 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 el...

  • Page 79

    79 2 chapter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting up product pages the content on the product pages comes fro...

  • Page 80: Setting Site Preferences

    Chapter 2 80 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. In the ...

  • Page 81: Products Database

    Setting up product pages 81 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 s...

  • Page 82: Creating A Query

    Chapter 2 82 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. The query manager opens, clic...

  • Page 83

    Setting up product pages 83 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 pag...

  • Page 84

    Chapter 2 84 2 in the first screen, select the odbc content table that represents the product information. 3 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

    Setting up product pages 85 4 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). 5 in the next screen, you choose the columns in the content table that you w...

  • Page 86

    Chapter 2 86 7 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). 8 in the next screen, you can choose to have sort features on the results list page. You can also choose how many ...

  • Page 87

    Setting up product pages 87 9 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 on...

  • Page 88

    Chapter 2 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 ...

  • Page 89

    Setting up product pages 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 90

    Chapter 2 90

  • Page 91

    91 3 chapter 3 adding and updating the . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Shopping cart before adding the shopping ca...

  • Page 92

    Chapter 3 92 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. To allow users...

  • Page 93: Customizing The Data-Map

    Adding and updating the shopping cart 93 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 refere...

  • Page 94

    Chapter 3 94 4 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 t...

  • Page 95

    Adding and updating the shopping cart 95 6 double click the price cell and enter the field name for the product-item price field. 7 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 sour...

  • Page 96

    Chapter 3 96 4 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 uni...

  • Page 97

    Adding and updating the shopping cart 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 co...

  • Page 98

    Chapter 3 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: 1 in content center, open the data-map. ...

  • Page 99

    Adding and updating the shopping cart 99 8 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. Dis...

  • Page 100

    Chapter 3 100 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 wi...

  • Page 101

    Adding and updating the shopping cart 101 to create an element collection: 1 in the basement, right click the shoppingcartobject element and choose add to smartelement library. Name the element and click ok. 2 from the element toolbar open the element library by clicking the element library button. ...

  • Page 102: Shopping Page

    Chapter 3 102 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 d...

  • Page 103

    Adding and updating the shopping cart 103 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: to...

  • Page 104

    Chapter 3 104 to add the shopping cart server smartelement from asset center: 1 from asset center, click locate assets and choose smartelements > show all custom smartelements, mouse down to the shopping cart smartelement. 2 drag and drop the element on the page. The element shows up in the basement...

  • Page 105

    Adding and updating the shopping cart 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 thin...

  • Page 106

    Chapter 3 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 he...

  • Page 107: Updating The Shopping Cart

    Adding and updating the shopping cart 107 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 i...

  • Page 108

    Chapter 3 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: 1 in content center, open the data-map content table. 2 in the cell for the isvis...

  • Page 109: Shopping Cart

    Adding and updating the shopping cart 109 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 pu...

  • Page 110

    Chapter 3 110

  • Page 111

    111 4 chapter 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating checkout pages following the typical flow of an e-commerc...

  • Page 112: Creating Login Pages

    Chapter 4 112 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...

  • Page 113

    Creating checkout pages 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 s...

  • Page 114

    Chapter 4 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. ...

  • Page 115

    Creating checkout pages 115 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 ...

  • Page 116

    Chapter 4 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 ca...

  • Page 117

    Creating checkout pages 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...

  • Page 118: Creating The Check Out Page

    Chapter 4 118 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...

  • Page 119

    Creating checkout pages 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 tok...

  • Page 120

    Chapter 4 120 to create a token: 1 select the text element and type the desired text adding a token in brackets [ ]. 2 select the recordset in the basement and text element on the page. Right click and choose possible interactions. 3 replace multiple [tokens] in [textelement] with values from [recor...

  • Page 121

    121 5 chapter 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Security you can ensure secure transactions using the following me...

  • Page 122: Linking Using Https Protocol

    Chapter 5 122 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 t...

  • Page 123: Authentication and Log In

    Security 123 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 ...

  • Page 124

    Chapter 5 124.

  • Page 125

    125 6 chapter 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Payment processing payment processing falls under two umbrellas: o...

  • Page 126: Recommended Reading

    Chapter 6 126 recommended reading navigating e-commerce (copyright of monkeysoup.Com by greg zellers) install path: /drumbeat/estore builder/navigating.Doc understanding electronic commerce, david kosiur microsoft press. Online transactions with cybercash for online transactions, cybercash provides ...

  • Page 127

    Payment processing 127 setting up cybercash test account you can install a test account on your publishing server. 1 from windows explorer, navigate to /drumbeat 2000/ estore builder/install. 2 in the install folder click on the setup.Exe file. The merchant connection kit setup is launched. Click ne...

  • Page 128

    Chapter 6 128 adding the cybercash smartelement this example demonstrates how to add the cybercash smartelement and apply interactions to authorize and capture order and payment information. 1 from element toolbar, add the cybercash smartelement to the layout. The element shows up in the basement. 2...

  • Page 129

    Payment processing 129 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 parti...

  • Page 130

    Chapter 6 130 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 ...

  • Page 131: Submitting to Cybercash

    Payment processing 131 cybercash attribute description: submitting to cybercash this interaction is between the cybercash element and a form button. It sends the data to the cybercash cashregister for processing and stores the transaction results in the cybercash smartelement after the order is subm...

  • Page 132: Session Object

    Chapter 6 132 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...

  • Page 133: Orders Recordset

    Payment processing 133 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: 1 shift select the fol...

  • Page 134

    Chapter 6 134 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 ...

  • Page 135

    135 7 chapter 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Merchandising merchandising adjustments can be set up on a product...

  • Page 136

    Chapter 7 136 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. F...

  • Page 137: Quantity Or Purchase

    Merchandising 137 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,...

  • Page 138

    Chapter 7 138 2 in the basement, right click the shopping cart smartelement and choose possible activations. 3 from the possible activations, in the estore adjustments category double click: add [flat-value] adjustment [type] to [shoppingcart] if [data] exceeds [threshold] 4 in the parameters dialog...

  • Page 139: Ordering Page Interactions

    Merchandising 139 parameter description: this activation calculates the adjustment as a percentage or fee to the shopping cart's subtotal. A related contract is available to apply flat adjustments in this manner. Note that these adjustments are global to the order and are not relevant to specific li...

  • Page 140: Adjustment Examples

    Chapter 7 140 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...

  • Page 141

    Merchandising 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 ex...

  • Page 142

    Chapter 7 142.

  • Page 143

    143 8 chapter 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Customizing quick store as mentioned at the beginning of this book...

  • Page 144

    Chapter 8 144 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 th...

  • Page 145

    Customizing quick store 145 3 in the media properties dialog, click the file location browse button and navigate to the background you want to use. 4 if the image does not appear as the background, uncheck and recheck the background image checkbox. For information about media assets, see chapter 7 i...

  • Page 146

    Chapter 8 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...

  • Page 147

    Customizing quick store 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 li...

  • Page 148

    Chapter 8 148 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 qui...

  • Page 149

    Customizing quick store 149 2 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...

  • Page 150

    Chapter 8 150 6 in sql query manager, select the new dsn from the dropdown list. 7 click save query. 8 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

    Customizing quick store 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 s...

  • Page 152

    Chapter 8 152.

  • Page 153: Shopping Cart Smartelement

    153 9 chapter 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Shopping cart reference the drumbeat shopping cart consists of two...

  • Page 154

    Chapter 9 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...

  • Page 155

    Shopping cart reference 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 t...

  • Page 156: Shopping Cart Methods

    Chapter 9 156 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(...

  • Page 157

    Shopping cart reference 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 dr...

  • Page 158

    Chapter 9 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-z...

  • Page 159

    Shopping cart reference 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() retu...

  • Page 160

    Chapter 9 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 colu...

  • Page 161

    Shopping cart reference 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...

  • Page 162: Shopping Cart Events

    Chapter 9 162 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. For instance, it is impor...

  • Page 163: Data Map

    Shopping cart reference 163 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 provi...

  • Page 164

    Chapter 9 164 data map second row (destination db field) identifies the name of the database 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 produc...

  • Page 165

    Shopping cart reference 165 line-item discount columns are defined as follows: disc_threshold defines the threshold requirement for receiving the discount. This value will most likely be obtained from your database. Disc_rate defines the rate of the discount if the threshold is met. Disc_value deter...

  • Page 166

    Chapter 9 166 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. A...

  • Page 167

    Shopping cart reference 167 attributes the run-time appearance of the shopping cart display is configured using the attributes sheet. Users can configure the following properties: border specifies the table border width in the shopping cart display. Padding specifies the table cell padding in the di...

  • Page 168

    Chapter 9 168 headerstyle specifies font and background color formatting for the header row of the table as a drumbeat style. Name name of the shopping cart display. Columnwidths a comma-delimited set of percentages to specify the relative column widths of the table. Percentages represent the percen...

  • Page 169: Shopping Cart Interactions

    Shopping cart reference 169 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 [reco...

  • Page 170

    Chapter 9 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. When the button is cl...

  • Page 171

    Shopping cart reference 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 c...

  • Page 172

    Chapter 9 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 smarteleme...

  • Page 173

    Shopping cart reference 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 interac...

  • Page 174

    Chapter 9 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 i...

  • Page 175

    Shopping cart reference 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 contr...

  • Page 176

    Chapter 9 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 t...

  • Page 177

    Shopping cart reference 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 ...

  • Page 178

    Chapter 9 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 ...

  • Page 179

    Shopping cart reference 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 f...

  • Page 180

    Chapter 9 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 shop...

  • Page 181

    Shopping cart reference 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 joi...

  • Page 182

    Chapter 9 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 f...

  • Page 183

    Shopping cart reference 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 o...

  • Page 184

    Chapter 9 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...

  • Page 185

    Shopping cart reference 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

    Chapter 9 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 ...

  • Page 187

    Shopping cart reference 187 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] ...

  • Page 188

    Chapter 9 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 ...

  • Page 189

    Shopping cart reference 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 o...

  • Page 190

    Chapter 9 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 you...

  • Page 191

    Shopping cart reference 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...

  • Page 192

    Chapter 9 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'...

  • Page 193: Shopping Cart Adjustments

    Shopping cart reference 193 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 ...

  • Page 194: Shopping Cart Contracts

    Chapter 9 194 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 thres...

  • Page 195

    Shopping cart reference 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 specifi...

  • Page 196

    Chapter 9 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 ...

  • Page 197

    Shopping cart reference 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

    Chapter 9 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 a...

  • Page 199

    Shopping cart reference 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 repre...

  • Page 200

    Chapter 9 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 bas...

  • Page 201

    Shopping cart reference 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 particu...

  • Page 202

    Chapter 9 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, howev...

  • Page 203

    Shopping cart reference 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 par...

  • Page 204

    Chapter 9 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. Various formatting option...

  • Page 205

    Shopping cart reference 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 stri...

  • Page 206

    Chapter 9 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 co...

  • Page 207

    Shopping cart reference 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...

  • Page 208

    Chapter 9 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 participant...

  • Page 209: Inventory Control

    Shopping cart reference 209 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 produc...

  • Page 210

    Chapter 9 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 ...

  • Page 211

    Shopping cart reference 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....

  • Page 212

    Chapter 9 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. This would typic...

  • Page 213

    Shopping cart reference 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 on...

  • Page 214

    Chapter 9 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 ord...

  • Page 215

    215 10 chapter 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cybercash smartelement reference the drumbeat cybercash smartele...

  • Page 216: Cybercash Features Supported

    Chapter 10 216 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 o...

  • Page 217

    Cybercash smartelement reference 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 associ...

  • Page 218: Contracts

    Chapter 10 218 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...

  • Page 219

    Cybercash smartelement reference 219 set [cybercash] 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 propert...

  • Page 220

    Chapter 10 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 b...

  • Page 221: Shipping Calculations

    Cybercash smartelement reference 221 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 r...

  • Page 222: Version 2.0 Contracts

    Chapter 10 222 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 execu...

  • Page 223

    Cybercash smartelement reference 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 b...

  • Page 224

    Chapter 10 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 a...

  • Page 225

    Cybercash smartelement reference 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...

  • Page 226

    Chapter 10 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 fr...

  • Page 227

    Cybercash smartelement reference 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 con...

  • Page 228: Version 1.0 Contracts

    Chapter 10 228 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 adjust...

  • Page 229

    Cybercash smartelement reference 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. This contract is spe...

  • Page 230

    Chapter 10 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 ...

  • Page 231

    Cybercash smartelement reference 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 ...

  • Page 232: Known Issues With Using Ups

    Chapter 10 232 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 shippin...

  • Page 233: Sales Tax Interactions

    Cybercash smartelement reference 233 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 shoppi...

  • Page 234

    Chapter 10 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 [c...

  • Page 235

    Cybercash smartelement reference 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 ...

  • Page 236

    Chapter 10 236.

  • Page 237

    237 index a active server pages publish settings 80 security 123 server application support 80 site preferences 80 add-to-cart button, adding to shopping page 102 adjustments purchase 137 quantity 137 shopping cart contracts 194 weight 137 adjustments array, shopping cart api methods 155 authenticat...

  • Page 238

    Index 238 p password, login 112 payment processing 125 set 123 product pages setting up 79 shopping cart smartelements 91 using dataform wizard 79 products database 79 publish settings, set up for asp 80 q query, create 82 quick store, customizing 143 r recordset smartelement, dataforms 88 redirecti...