background image

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-zero values currently in the 
shopping cart's adjustments array. If an adjustment has been added to the 
shopping cart, but the criteria for receiving the adjustment are not met (and 
therefore the adjustment value is empty), that adjustment is not included in 
the count.

GetAdjustmentObj(Name)

Returns a reference to the adjustment object whose name matches the Name 
argument. This is useful for retrieving a reference to an adjustment object and 
directly manipulating its properties. For instance, the following code snippet 
retrieves the value of an adjustment named "Discount:" 

var adjObj = [ShoppingCart].GetAdjustmentObj("Discount")
var value = adjObj["Value"]

GetAdjustmentsTotal()

Returns the sum total of the adjustments currently in the shopping cart's 
adjustments array. Note that adjustments representing discounts are treated as 
negative numbers, whereas fees are treated as positive numbers. Therefore, the 
value returned from this method may be positive or negative.

GetAdjustmentValueByIndex(index)

Returns the value of an adjustment referenced by the index argument if it exists in 
the shopping cart's adjustments array. This is useful when enumerating through 
the Adjustments array in a for loop, for instance.

GetAdjustmentValueByName(Name)

Returns the value of an adjustment referenced by the Name argument if it exists in 
the shopping cart's adjustments array.

GetGrandTotal()

Returns the grand total of an order in the shopping cart. The grand total 
calculation is the sum of the Adjusted Total (GetAdjustedTotal()) plus shipping 
(GetShipping()) and Sales Tax (GetSalesTax()). 

Содержание DRUMBEAT 2000 ECOMMERCE EDITION

Страница 1: ...Users Guide macromedia DRUMBEAT 2000 eCOMMERCE EDITION ...

Страница 2: ...tradenames of Macromedia Inc or other entities and may be registered in certain jurisdictions Apple Disclaimer APPLE COMPUTER INC MAKES NO WARRANTIES EITHER EXPRESS OR IMPLIED REGARDING THE ENCLOSED COMPUTER SOFTWARE PACKAGE ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES THE ABOVE EXCLUSION MAY NOT APPLY TO YOU THIS...

Страница 3: ... 11 CHAPTER 1 Quick Store Tutorial 13 What You Need to Complete Quick Store 13 Getting Familiar with Quick Store Starting Point 14 Step 1 Adding A Shopping Cart 23 Managing the Cart 35 Step 2 Setting Up Login and Checkout 47 Logging In 47 Checking Out 54 Step 3 Confirming the Order 70 CHAPTER 2 Setting Up Product Pages 79 Setting Site Preferences 80 Setting Publishing Settings 80 Setting up a Data...

Страница 4: ...User Pages 115 Creating the Check Out Page 118 CHAPTER 5 Security 121 Linking Using HTTPS Protocol 122 Security and Databases 122 Authentication and Log In 123 ASP Security 123 Payment Processing SET 123 CHAPTER 6 Payment Processing 125 Recommended Reading 126 Online Transactions with CyberCash 126 Setting up CyberCash Test Account 127 Adding the CyberCash SmartElement 128 Passing the OrderID to t...

Страница 5: ...6 Shopping Cart Events 162 Configuring Shopping Cart Content The Data Map 163 Modifying the Data Map Content Table 165 Specifying Shopping Cart Column Order 166 Shopping Cart Display SmartElement 166 Shopping Cart Interactions 169 Shopping Cart Miscellaneous Interactions 187 Shopping Cart Adjustments 193 Shopping Cart Contracts 194 Inventory Control 209 CHAPTER 10 CyberCash SmartElement Reference ...

Страница 6: ...Contents 6 ...

Страница 7: ...nd to improve customer satisfaction To create a competitive edge the site must be functionally sophisticated and to improve customer satisfaction the site must be very user friendly Luckily these two goals go hand and hand As the complexity increases the site developer or team watches and carefully plans out the user experience If you are working with a corporate site you most likely have guidelin...

Страница 8: ...ding a storefront for a small mom and pop company you might need to consult with your clients and work out these issues The document Navigating an e Commerce Site contains a discussion of the delivery and maintenance aspects of developing an e Commerce site with a run down of questions you should answer before developing your site in Drumbeat The document is located in the Documents folder in the ...

Страница 9: ... orders database 6 The order is processed using an online or offline payment mechanism The order detail is entered into the database At this point the product items can be deducted from inventory 7 The customer is taken to a thank you page which includes the order details and delivery information Up and Running Fast with eStore The easiest way to build an e commerce site following this e commerce ...

Страница 10: ...build an eStore site Chapters 2 through 8 assume you are already familiar with Drumbeat and the basics of database driven site design It is assumed that you have completed the tutorial or already built a simple eStore site on your own These chapters include goal oriented instructions for using and adapting each eStore feature to your particular project Chapters 9 and 10 are both a technical refere...

Страница 11: ... web site In the WinZip Self Extractor select a folder in which to unzip the eStore Builder installation file Click Unzip 2 Click OK Then close the WinZip Self Extractor 3 In Windows Explorer navigate to the folder you extracted the installation file to Double click the Setup exe 4 Follow the instructions on the Installation screen The installer will add the eStore Builder files to your copy of Dr...

Страница 12: ...Introduction 12 ...

Страница 13: ...b site you can find DrumNotes demonstrating how to add various features to your eStore such as order fulfillment and Store Manager features References to DrumNotes are found throughout this guide To find these samples go to drumnotes drumbeat com eStore specific DrumNotes are in the 500 series If you have never used Drumbeat before it is strongly recommended that you go through the Quick Start tut...

Страница 14: ...kout areas Open the Quick Store Starting Point To base a new site on the Quick Store Starting Point 1 Launch Drumbeat from the Start menu 2 From the Drumbeat Start up dialog select Create a New Site Uncheck the Use Wizard checkbox Then click OK 3 In the New Site dialog name the site QuickStore 4 In the Site Origin field select the Based on Starting Point radio button From the dropdown list scroll ...

Страница 15: ...ain pages in the site tree Search and Browse Books Initiate a search by various criteria including keyword title author and category The Search For Books page in the site tree is the main page in this section Checkout Enter billing and shipping information and get an order summary The CheckoutArea page in the site tree is the main page in this section View Shopping Cart Check the current contents ...

Страница 16: ...tyle information for the site Select the Master Template in the site tree and then click the Attributes tab to see the names of the assigned link styles All pages in the site inherit these styles Books Template This template is used for the pages that display book search and detail information The template contains a background a logo and four linked images for navigation All of the pages shown un...

Страница 17: ...ion is the Shopping Cart Data Map This table whose initial content comes from a CSV file provides a bridge to the database so that user selections can be retrieved from and passed to the server side shopping cart When using database content in Drumbeat you must first create a query to the database using the Query Manager Then you create an ODBC Content Table based on that query The ODBC Content Ta...

Страница 18: ...ose Site Elements Show all site level elements The site level elements on this site also include the DataForm and Cookies that are used Notice that each Recordset matches a Content Table in the Content Center although the names of the Recordsets may differ slightly from the Content Table names You will see the recordsets used in the basement of the data driven pages in the Quick Store Starting Poi...

Страница 19: ...ed in the User s Guide and Reference Guide following 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 CardTypes CreditCardTypes Used on the NewUser and Update User pages to popula...

Страница 20: ...not on your SmartElements toolbar you should add them for this exercise Click the Element Library icon on the SmartElements toolbar and select the Custom tab Place a check next to each element then close the Element Library and they will appear on the toolbar Technical documentation on these Custom SmartElements can be found in the Shopping Cart section of the Reference guide in this book or see t...

Страница 21: ...s 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 eStore Interactions are available in the following categories eStore Adjustments eStore CyberCash eStore Inventory eStore Shipping eStore Shopping Cart eStore Shopping Cart Misc eStore Tax You can view these suites of in...

Страница 22: ...ing Forward The typical flow of an e commerce site consists of searching browsing adding items to a shopping cart and checking out Typically a search page leads to a results page with links to product details From the detail page shoppers can add items to the Shopping Cart They can then choose to continue shopping return to searching or browsing or check out Shoppers also need the flexibility to a...

Страница 23: ... at the Data Map in Drumbeat 1 In the Content Center select Shopping Cart Data Map from the dropdown list 2 Drag the splitter bar down to expand the Content Center so you can view the rows in the table as shown in the following figure The Data Map provides information needed by the shopping cart for Obtaining information from the Product database when product items are added to the shopping cart S...

Страница 24: ...1 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 This element represents the Shopping Cart on the server Ensure that the element is on the far right side If it was added to the left of the Form element drag and drop it to the right side ...

Страница 25: ...you have set all the attributes correctly create an Element Collection so that you can reuse the component on another page easily Attribute Description Set to Content Sets the content of the element to the Shopping Cart Data Map Content Table Select Static Content Click the ellipsis button and choose Shopping Cart Data Map Show all columns Cookie Expiration days Stores the shopping cart data in a ...

Страница 26: ...he 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 Library button Click the Element Collections tab and check the box next to the BookstoreCart name Doing this will add the element to the Element Toolbar ...

Страница 27: ...nsures that the content attribute for the server element is bound to the Shopping Cart Data Map on every page Next time you add the server side Shopping Cart SmartElement to a page drag the Element Collection named BookStoreCart from the Element Toolbar and the settings in the Attributes Sheet will already be made for you Insert Product Items Into the Shopping Cart Continuing on the Book Detail pa...

Страница 28: ...ent and choose Possible Activations From the list of Activations scroll down to the Forms Submit category and double click the interaction that says ShoppingCartButton Submit the Form when ShoppingCartButton is clicked 5 In the Parameters dialog uncheck Validate Form and leave the edit box blank as shown in the accompanying figure and table and then click OK See DrumNote 28 for an explanation of u...

Страница 29: ...pies 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 ...

Страница 30: ...already in Cart Redirect the shopper to a message page if the selected item is already in the cart Checked AlreadyInCartRedirect Specifies the target page for redirecting if an item is already in the cart Expand the tree node and select the Already In Cart page under the Shopping Cart page NewItemRedirect Specifies the target page for redirecting after an item is successfully added to the cart Exp...

Страница 31: ...Elements Toolbar add the ShoppingCartDisplay SmartElement to the page layout This element displays the content of the shopping cart server object 4 Click OK to dismiss the warning message Because the browser preference for the site is set to Any Version 4 0 Browser a reminder message comes up stating that certain dynamic HTML features will be unavailable as you enhance this page layout This is due...

Страница 32: ...ribute 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 Anchor Unchecked Visible Checked EditableQuantities Checked MinusSign Checked ShowShipping Tax in Summary Unchecked ShowEmptyMsg Checked ShowHeaders Checked ...

Страница 33: ...ributes again 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 ShoppingCartObject Subt...

Страница 34: ...me the element BookstoreCartandDisplay Click OK 2 In Element Library click the Element Collections tab and check the box next to the BookstoreCartandDisplay name You can change the icon from Edit Appearance as you did with the ShoppingCart object We ve added an icon especially for this Element Collection as shown in the sidebar scroll to the very end for icon 3 Click OK OK again and then Done to c...

Страница 35: ...ut above the ShoppingCartDisplay element 2 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 Attribute Description Set to Left Positions button 24 Top Positions button 202 Anchor Sets element as page anchor when enabled Unchecked Visible Sets button as visible or non visible Checked Style...

Страница 36: ... Update if ShoppingCartObject is empty There are no parameters for this Interaction 5 Shift select the following elements Update Button on page ShoppingCartDisplay on page ShoppingCartObject in Basement 6 Right click and choose Possible Interactions In the eStore Shopping Cart category double click the interaction Update ShoppingCartObject with data from ShoppingCartDisplay when Update is clicked ...

Страница 37: ...re 3 Shift select the following elements Checkout Button on page ShoppingCartObject in Basement Attribute Description Set to Left Positions button 165 Top Positions button 202 Anchor Sets element as page anchor when enabled Unchecked Visible Sets button as visible or non visible Checked Style Sets the button style You can create your own style in Asset Center SC Button Style Name Names the button ...

Страница 38: ...splay 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 5 With the CheckOut button and the ShoppingCartObject still selected shift select the ShoppingCartDisplay element in the layout ...

Страница 39: ...uble 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 expand the Search For Books node and select the CheckArea page This is the page to which the visitor is redirected after updating ...

Страница 40: ...Shift select the following elements ClearCart Button on page ShoppingCartObject in Basement Attribute Description Set to Left Positions button 275 Top Positions button 202 Anchor Sets element as page anchor when enabled Unchecked Visible Sets button as visible or non visible Checked Style Sets the button style You can create your own style in Asset Center SC Button Style Name Names the button for ...

Страница 41: ...e the interaction Remove all ShoppingCart items when ClearCart is clicked and redirect to page 6 In the Parameters dialog click Assign Then expand the Search For Books node and select the Book Search Results List page This is the page to which the visitor is redirected when deleting items from the cart and continuing shopping 7 Click OK and OK again This interaction will remove the session variabl...

Страница 42: ...the following elements Continue Button on page ShoppingCartDisplay on page ShoppingCartObject in Basement Attribute Description Set to Left Positions button 390 Top Positions button 202 Anchor Sets element as page anchor when enabled Unchecked Visible Sets button as visible or non visible Checked Style Sets the button style You can create your own style in Asset Center SC Button Style Name Names t...

Страница 43: ...Object with data from ShoppingCartDisplay when Continue is clicked and redirect to pagename 5 In the Parameters dialog click Assign Then expand the Search For Books node and select the Book Search Result List page This is the page to which the visitor is redirected when clicking the continue shopping button 6 Click OK and OK again and close Interactions Center ...

Страница 44: ...sh the site 1 In Windows Explorer create a new folder under the inetpub wwwroot directory Name the new folder QuickStore 2 The Staging Publishing settings have already been set up in Drumbeat to point to the QuickStore folder To view the settings go to the main menu and choose Publish Staging Then again from the main menu choose Publish Publish Settings Click OK when finished viewing ...

Страница 45: ... refresh your directories 2 Select all Ctrl A of the images in the covers folder Then copy Ctrl C all of the files 3 Now you will copy them into the images folder under the publishing directory Navigate to your web publishing directory at inetpub wwwroot QuickStore Images 4 With the Images folder selected copy Ctrl V all of the book cover images into the folder Browse Click the Browse button to br...

Страница 46: ... default location in Drumbeat MySites Moving Forward You ve built the Shopping Cart functionality using the eStore Shopping Cart SmartElements and Interactions In the next step you will hook up the checkout page where an electronic form collects customer and payment information and submits it to a database You will learn how to set up the Ordering functionality using the eStore Shipping SmartEleme...

Страница 47: ...se a secure server and appropriate protocols to process confidential customer information See the chapter on security in the User s Guide for further details Here are the main activities on this page Applying validation to edit boxes Setting up session based security and capturing the CustomerID in a session object Using CustomerID from session to filter recordsets Using various recordsets to disp...

Страница 48: ...e UserName edit box Right click and choose Possible Activations 2 Scroll to the Forms Validations category and double click the activation that says UserName Non Blank Validation on UserName 3 In the Parameters dialog enter the error message Please enter your email address in the User Name box Then click OK 4 Select the Password edit box Right click and choose Possible Activations 5 Scroll to the ...

Страница 49: ... using the value name pairs carried by the cookie First welcome returning shoppers by capturing their user names in a cookie and replacing the token in the header text element To save the User Names in a cookie 1 Shift select the following elements UserName edit box on page LogIn button on page Password Cookie in Basement 2 Right click and choose Possible Interactions 3 View the Cookie category an...

Страница 50: ...en the text element and cookie element currently selected Double click this interaction Replace Token in Welcome with value from PasswordCookie 10 Set the parameters according to the following table then click OK 11 The shopper can choose to save the password in a cookie by checking the Save My Password checkbox The password is passed to the editbox when the box is checked as well as when the page...

Страница 51: ...action in the Cookie category If SavePassword is selected insert Password into Password Cookie when SavePassword is clicked 7 Set the Name parameter to eStorePassword then click OK 8 To capture the password when the LogIn button is clicked shift select the LogIn image button so the edit box check box and cookie are still selected 9 Interaction Center now shows the Possible Interactions for the edi...

Страница 52: ... a session variable is created to define the customerID This session variable will be used to filter the Customer recordset on the CheckOut page The Access Group parameter can be used to restrict access to pages or elements For information about setting up access groups see the LogIn and Registration Starting Points from the StartingPoints folder under your Drumbeat directory To look up the Custom...

Страница 53: ...utArea CheckOutLogin section Parameter Description Set to SuccessRedirect Defines the page to redirect to when the username and password matches a record in the recordset Click the Assign button Click the tree node Select the Check Out page under the CheckoutArea FailedRedirect Defines the page to redirect to when the username and password does not match a record in the recordset Click the Assign ...

Страница 54: ...in the Orders details recordset In Site Manager click the CheckOut page to activate its layout The Page Level SmartElements Customer Information elements including name shipping and billing addresses email and credit card text fields Customer Update button Shopping Cart Display and object for viewing and updating cart contents you will add this in the next section Shopping Cart Update button you w...

Страница 55: ...and in each case store the CustomerID as a session variable Then on this page CheckOut the Customers recordset is filtered on the CustomerID in the session variable To view the Filter Customers on Session Variable Interactions 1 Open the basement if not already right click the Customers recordset and choose Assigned Interactions ordered 2 In the attic select the Interaction in the Database Miscell...

Страница 56: ...ent to reveal the ShopplingCartObject Then shift select the following elements Update Button on page ShoppingCartDisplay on page ShoppingCartObject in Basement 4 Right click and choose Possible Interactions Scroll to the eStore Shopping Cart category and double click the interaction Update ShoppingCartObject with data from ShoppingCartDisplay when UpdateCart is clicked Attribute Description Set to...

Страница 57: ...ist for Content select Text 3 Click on the ellipses button to open the text editor 4 Enter monthnumber daynumber year for the tokens Then click OK 5 Right click the OrderDateText text box and choose Possible Activations Double click the interaction in the Date category OrderDateText Replace tokens in OrderDateText with static date time from server 6 Set the parameter according to the following tab...

Страница 58: ...OrderDateHidden in Basement Orders recordset in Basement 8 Right click and choose Possible Interactions Double click the interaction in the Database Edit category Use OrderDateHidden data to update insert in Orders when SubmitOrder is clicked 9 Set the Recordset Column parameter according to the following table then click OK Calculate Sales Tax Shipping and Grand Total The sales tax shipping charg...

Страница 59: ...ngCartObject in Basement 3 Right click and choose Possible Interactions Scroll to the eStore Shopping Cart category and double click the interaction Replace token in SubtotalText with Total from ShoppingCartObject 4 Set the parameters according to the following table then click OK Parameter Description Set to DoNotShowIfEmpty Allows you to hide the subtotal if there are no items in the cart checke...

Страница 60: ...ng methods To set up shipping functionality 1 Select the ShippingText text box Type Shipping in it 2 Shift select the following elements as referenced by name given in Attributes Sheet ShippingText on page ShoppingCartObject in Basement 3 Right click and choose Possible Interactions In the eStore Shipping category double click the interaction Replace token in ShippingText with flat rate shipping b...

Страница 61: ...lect the following elements ShippingHidden in Basement ShoppingCartObject in Basement 5 Right click and choose Possible Interactions In the eStore Shipping category double click the interaction Replace token in ShippingHidden with flat rate shipping based on total quantity from ShoppingCartObject 6 Set the parameters according to the following table then click OK Now apply the interaction to inser...

Страница 62: ... recordset in Basement 3 Right click and choose Possible Interactions Scroll to the eStore Tax category and double click the interaction Replace token in SalesTaxText with sales tax from SalesTax using ShoppingCartObject total and state from Customers 4 Set the parameters according to the following table then click OK Note In order to display sales tax when testing your site make sure your custome...

Страница 63: ...pingCartObject in Basement SalesTax recordset in Basement Customers recordset in Basement 2 Right click and choose Possible Interactions Scroll to the eStore Tax category and double click the interaction Replace token in SalesTaxHidden with sales tax from SalesTax using ShoppingCartObject total and state from Customers 3 Set the parameters according to the following table then click OK Now apply t...

Страница 64: ...it 2 Shift select the following elements GrandTotalText text box on page ShoppingCartObject in Basement 3 Right click and choose Possible Interactions Scroll to the eStore Shopping Cart category and double click the interaction Replace token in GrandTotalText with Total from ShoppingCartObject 4 Set the parameters according to the following table then click OK Parameter Set to Recordset Column Sal...

Страница 65: ...the SubmitOrder button is clicked 5 Shift select the following elements SubmitOrder button on page CustomerIDHidden in Basement Orders recordset in Basement 6 Right click and choose Possible Interactions In the Database edit category double click the interaction Use CustomerIDHidden data to update insert in Orders when SubmitOrder is clicked 7 Set the Recordset Column parameter according to the fo...

Страница 66: ...ractions 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 3 Set the parameters according to the following table then click OK Parameter Description Set to TimeStamp Col The name of the column in the recordset that stores the Timestamp TimeStamp OrderID Col The name of the column in the recor...

Страница 67: ...tton on page 2 Right click and choose Possible Interactions Scroll to the eStore Shopping Cart category and double click the interaction Insert ShoppingCartObject in OrderDetails when SubmitOrder is clicked using OrderID from Session 3 Set the parameters according to the following table then click OK 4 Click OK and Close Interactions Center Parameter Set to Redirect After Insert Checked Failed Red...

Страница 68: ...the credit card number Notice the Credit Card text box is set to the token CreditCard We use this token when applying the interaction that masks the card number 1 Shift select the following elements CreditCardTypes on page Customers recordset in Basement 2 Right click and select Possible Interactions In the eStore Shopping Cart Misc category double click the interaction Replace token in CreditCard...

Страница 69: ...nue to work on the site or switch back to the Snapshot To take a Snapshot From the main menu choose File Snapshot Save the snapshot to the default location in Drumbeat MySites Moving Forward So far you ve built a store front to the search results and detail DataForms You added to the store front functionality by inserting customer and payment details to the orders database You learned how to filte...

Страница 70: ...es on this page Using OrderID from session to filter recordsets Using various recordsets to display order information on page by replacing tokens To activate the Order Confirmation page In Site Manager click the Order Confirmation page to make its layout active The Page Level SmartElements Customer Information text elements that contain Tokens Data Loop element to display shopping cart items from ...

Страница 71: ...in the Basement 4 Shift select the following elements ASPSession in Basement CustOrderDetails recordset in Basement 5 Right click and choose Possible Interactions Scroll to the Database Miscellaneous category and double click the interaction Filter CustOrderDetails with Session variable before page loads 6 Set the parameters according to the following table then click OK Now that the correct recor...

Страница 72: ...er is filtered on the orderID To filter the customers recordset with the orderID 1 Shift select the following elements OrdersTotals recordset in Basement CustOrderDetails recordset in Basement 2 Right click and choose Possible Interactions Scroll to the Database Filter category and double click the interaction Filter OrdersTables with related field from CustOrderDetails 3 Set the parameters accord...

Страница 73: ... Shift select the following elements OrderNumber text element on page CustOrderDetails recordset in Basement 2 Right click and choose Possible Interactions Scroll to the Database Miscellaneous category and double click the interaction Replace token in OrderNumber with value of Field from CustOrderDetails 3 Set the parameters according to the following table then click OK Parameter Description Set ...

Страница 74: ...s ReceiverName 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 Replace multiple tokens in ReceiverName with values from Customers 3 Set the parameters according to the following table then click OK Parameter Description Set to Token Defines tokens in comma delimited st...

Страница 75: ...elements themselves 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 Drumbeat saves every change you make to the application to the project file...

Страница 76: ...k Store in the User s Guide section of this book Your feedback will help us to develop new DrumNotes The eStore DrumNotes will further demonstrate the eStore components and how they can be used to build advanced e commerce applications Send your comments and suggestions to documentation drumbeat com Overview of eStore Components The main purpose of the Building Your eStore section is to help you j...

Страница 77: ...tent using a server side element Shopping Cart site level SmartElement static content using a page level element Shopping Cart Display SmartElement and the data generated by parameters on the fly eStore ships with a five possible Data Map starter files that display the main requirements of a storefront You can choose the one you want to use based on your requirements DataMap Basic shopping cart us...

Страница 78: ...evel element while developing the storefront in Drumbeat eStore Suite of Point and Click Interactions There are currently seven eStore Contract categories that include many eStore point and click Interactions for activating the Shopping Cart as well as adding merchandising tax and shipping functions These are the components that you will be working with when building an e commerce site in Drumbeat...

Страница 79: ...hat you can follow to set up the product pages Understand that there are many ways that you can create the products pages The products pages are set up using basic Drumbeat techniques and are not unique to building an e commerce site with eStore You can find instructions and examples of different techniques by checking the index of the Drumbeat User s Guide and Help for the words in bold Before wo...

Страница 80: ...o other than your local machine Then in the ASP tab enter the Alias The Alias field takes the name of the folder you created under the wwwroot folder for the project Note that the ASP tab is only displayed when server support is set to ASP If you need step by step instruction on how to set the publish settings check the index of the Drumbeat User s Guide or Help for the words in bold After you hav...

Страница 81: ...ce 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 ...

Страница 82: ...ntent table in Content Center Choose the query name from the Content Table list The Content Table is a visual representation of the products query The figure shows the sample database populated with sample product information If you need step by step instruction on how to create a query and an ODBC Content Table check the index of the Drumbeat User s Guide or Help for the words in bold Now you are...

Страница 83: ...an add the shopping components Chapter 3 Adding Products to the Shopping Cart contains an example of adding the shopping components Two product pages are generated using DataForm Wizard Products Results Page Lists product items and links to the products detail page Products Detail Page Displays product details This page will contain the shopping cart See Chapter 3 Adding Products to the Shopping C...

Страница 84: ...roduct 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 For this example only the Results List and default Detail page will be created ...

Страница 85: ...r accept the defaults No more records 5 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 6 Navigation buttons can be used to browse through detail pages Since in this example the product result page links to its corresponding detail page the navigation button option is unchecked ...

Страница 86: ...rovide 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 records you want to show on the page ...

Страница 87: ...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 To generate the pages click Finish ...

Страница 88: ...ents as well on page elements to set up the shopping experience If you need step by step instruction on how to use DataForm Wizard and create product pages check the index of the Drumbeat User s Guide or Help for the words in bold Publish and browse your pages From the main toolbar choose Publish All Pages Publishing takes a few moments depending the number of pages and the elements on those pages...

Страница 89: ... 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 ...

Страница 90: ...Chapter 2 90 ...

Страница 91: ... the features you want in your shopping cart The Data Map CSV files can be found in the Drumbeat program files directory If you installed Drumbeat in the default location the directory path will be C Program Files Drumbeat 2000 estoreBuilder BasicShoppingCart csv Includes only required fields Does not include weight tracking or line item discount handling ShoppingCart_WeightTracking csv Includes t...

Страница 92: ...ou can customize the Data Map and storefront setup to suit your own requirements You can exchange ideas with other eStore developers and get specific assistance at community drumbeat com Configuring the Shopping Cart s Content The first step is to import the CSV file for your Data Map Then you can customize the Data Map table to suit your particular database To import the Data Map CSV File 1 In Co...

Страница 93: ...e with product information columns fields including name description price etc The source database table is represented in the first row of the Data Map table To hook up the data map to the source database 1 In the Content Center choose the Data Map table from the list 2 Double click the header on the first row Rename the row to Source Database Table You can rename it anything you want to represen...

Страница 94: ...f the Unique Key in the cell 5 The second column titled Qty which stands for Quantity has None entered by default and should not be changed The content of this column does not come from the source database but from the shopping activity This content comes from the site shopper entering a number Go to the Product column third column and double click the cell where Product Name is currently entered ...

Страница 95: ...e Hooking up the Data Map to the Destination Database Table The destination database when developing an e commerce solution is usually an orders detail table with order information columns fields including a foreign key to the products table unit price quantity etc The destination database table is represented in the second row of the Data Map table To hook up the data map to the source database 1...

Страница 96: ...e click the second cell under the column header titled Qty stands for Quantity The text editor appears Look at your orders details destination database table in your database program to find the Quantity field name Then enter the field name of the Quantity field in the cell 6 Skip the Name and Price cells This content comes from the products table 7 Double click the Total cell under and enter the ...

Страница 97: ...e cart columns anything you like and order them however you want The CSV file contains entries for this row Do not change them All columns beyond the required column should be left blank The following columns are required You change the column names as long as you do not change the entries in the columns in the third row Note Weight and TotalWeight columns are provided in the ShoppingCart_WeightTr...

Страница 98: ... Cart Display element on the page Then from the Type list choose Text In the Text Type list choose Formatted 4 Now you must enter the correct cell values for each row depending on your source and destination database tables See steps under Customizing the Data Map 5 When you add a column to the Data Map and the Data Map is bound to the Shopping Cart SmartElement the column is defaulted as not show...

Страница 99: ...Cart Data Map Columns Data Map Fourth Row Is Visible Determines the visibility of a column in the Shopping Cart Display element Columns that you want to be visible should be set to true and columns that you want to be hidden should be set to false For instance the Product ID is a required column in the cart but you may not want to clutter the cart display with a cryptic ID By setting the ID column...

Страница 100: ...cript object captures information as the site shopper browses through the site To add the Shopping Cart Basement 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 Make sure this element is on the right ...

Страница 101: ...bar open the Element Library by clicking the Element Library button Click the Element Collections tab and check the box next to the name Doing this will add the element collection to the Element Toolbar You can also change the default icon 3 Uncheck the Use Wizard checkbox if not already Click the Edit button and then click the Appearance tab Find an icon to represent the element on the toolbar Cl...

Страница 102: ...ou do not have to add a Hidden Form element or Submit Activation as the Form Button itself adds the Form object to the Document and submits to the server 2 From Element Toolbar add a Hidden SmartElement The Hidden element adds a Form to the Document object without adding any visible elements to the page 3 For Image Buttons from Asset Center drag the on state image to the element Then drag the off ...

Страница 103: ... where the contents of the shopping cart is displayed and managed To display the items in a shopping cart the page needs to have both the Shopping Cart server only visible in the Drumbeat Basement and Display SmartElements The SourceCart attribute of the display element must be set to the server element To add the Shopping Cart Display to a Page 1 From Asset Center click Locate Assets and choose S...

Страница 104: ...lement to the source and destination databases 4 Select the Shopping Cart Display SmartElement on the page not in the Basement and make sure the Source Cart attribute is set to the Shopping Cart server SmartElement The Shopping Cart Display can be on the same page where the user adds products to the cart or on a redirection page Once you have added a Shopping Cart Display SmartElement to a page th...

Страница 105: ...t 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 Here s a screenshot of how the basic Shopping Cart Display looks on a published page ...

Страница 106: ...pen the Data Map Content Table 2 Double click the column header and set the name in the Column dialog Changing the Column Visibility The Visible row the fourth row in the Data Map content table determines the visibility of a column in the Shopping Cart Display element The Columns you want to be visible on the web page should be set to True and columns you want to be hidden should be set to False T...

Страница 107: ...tton Right click and choose Possible Interactions 3 From the list of interactions you can choose to either update the shopping cart and remain on the same page or to redirect to another page Usually you would remain on the same page when updating the shopping cart and only redirect to another page when continuing shopping You can learn about the interaction parameters in the Reference section unde...

Страница 108: ...Qty column set the value to True Now the Quantity column in the Shopping Cart page element will be visible Remove Items To allow shoppers to remove items from their cart you need to make the Remove column in the Shopping Cart Display SmartElement visible on the page To allow shoppers to remove items from cart 1 In Content Center open the Data Map Content Table 2 In the cell for the IsVisible row u...

Страница 109: ...po or non existent column in the source and or destination database tables Verify each column in the Data Map paying special attention to the first two rows Be sure that any values not equal to none match the name of the corresponding database table column If it does and you still get this error make sure the recordset reflects the intend query If it does not edit the query and include the desired...

Страница 110: ...Chapter 3 110 ...

Страница 111: ...isplayed The checkout page lists the shopping cart s contents and the account information The returning shopper can decide to change the account information from this page New shoppers are directly sent to a page where they enter their account information Here are the major steps for creating checkout pages Create Login page Create New and Update User page Create order summary page The examples in...

Страница 112: ...igation Interactions Cookie Interactions can be used to customize the page to the site visitor To view an example of these interactions in a Drumbeat site file open the QuickStoreComplete Starting Point and activate the CheckoutLogin page Right click an open space on the page and choose Assigned Interactions ordered In the attic you see a long list of interactions Notice the following two interact...

Страница 113: ...d the form and recordset Basement elements In the parameters dialog you can set up the failed and successful redirection pages As well you can choose an access group learn about access groups in DrumNote 3 and additional variable to store in a Session object Make sure you apply this interaction before the applying the Submit Form Interaction to the Form Button refer to the interaction order in Qui...

Страница 114: ...ractions are applied to capture in a cookie the username and password This functionality makes the site easier to use by saving the login name and password if the site visitor decides to do so However the Cookie Interactions are not necessary for the basic login functionality For step by step instruction see the Drumbeat Login DrumNote on how to build login pages DrumNote 3 How to Password Protect...

Страница 115: ...ilt using DataForm Wizard and then enhanced with elements and interactions In DataForm Wizard select an Insert DataForm A Detail DataForm page is created by default If you don t need it you can just delete it from the site structure When the insert page is created DataForm Wizard adds a Back button Since you don t need to navigate through a set of records when adding a new user delete the Back but...

Страница 116: ...credit card selection would be inserted into the Customers database table The interaction is between an edit box the insert button and the Customers recordset Notice the Database Navigation activation on the Insert button This interaction maintains the state of the recordset after the site visitor has entered the information and wants to check out The activation on the Insert button asks you to ch...

Страница 117: ...omplete file There are some important points and tips you need to know about validation and inserting user information Some Tips Name elements appropriately so when you are applying Interactions you can easily identify which is which For insert pages make sure edit boxes submit only to the recordset and not to the page so that the recordset content does not show up on the published page To make su...

Страница 118: ...mail and payment method Shopping Cart Contents that list the product items in the shopping cart and Order Summary that summarizes the price breakdown for product items shipping and tax charges while giving the shopper the grand total Three main areas of the Checkout page Customer Information Shopping Cart Contents Order Summary Customer Information The Customer Information area includes customer n...

Страница 119: ... attribute Notice the Content attribute is set to Text Setting the Content attribute to text and adding tokens allows you to to display static and dynamic content in a single text box Notice in the screenshot below that next to billing address the city street and zip fields are within one text element Without using tokens doing this would not be possible since the multiple recordset fields cannot ...

Страница 120: ...nts is displayed using the Shopping Cart Display SmartElement As well an update button is added so that site shoppers can manager their carts at checkout You can learn how to add the Shopping Cart Display SmartElement and update buttons in Chapter 2 Adding and Updating the Shopping Cart Order Summary The order summary area breaks down the grand total into subtotal sales tax and shipping charges Th...

Страница 121: ...tion Protect individual files and folders on NT servers using the Challenge Response ASP Security Learn about the advantages of the ASP application server Credit Card Transactions There are many vendors out there that support online credit card transactions with SET Secured Electronic Transaction protocol such as CyberCash eStore offers a CyberCash SmartElement for secure online transactions For o...

Страница 122: ...o HTTPS Just enter the absolute URL e g https www chocolatemaker com in the in the URL string You can use the shopping cart or any other SmartElement on the SSL Secure Socket Layer protected page provided the page is employed on a secure server We highly recommend that you protect the check out pages Security and Databases Customer information saved in a database can be vulnerable to security atta...

Страница 123: ...step instructions See the User Registration Starting Point for more information We have some users asking us about the ASP server side code you see in a published Drumbeat page You might have noticed that within the code you can see for example the user name and password SQL query within the code Rest assured that server side code is parsed out and is not sent to the client Any code that is betwee...

Страница 124: ...Chapter 5 124 ...

Страница 125: ...ocument paying special attention to the Payment Process section The Navigating E Commerce document is installed at installation directory Drumbeat eStore Builder navigating doc Both online automatically sent and offline later sent transactions have some of the same steps Both offline and online transactions deal with the seller the buyer customer the seller s bank and the buyer s bank bank name on...

Страница 126: ...y 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 Capture means submitting a charge to the credit card and depositing funds in your bank account Payment scripts encapsulated in the CyberCash SmartElement enable both Authorization Only and Authorization ...

Страница 127: ...io button is selected and click Next 4 In the next screen you are asked to navigate to a destination directory Click Browse and navigate to Drumbeat Installation directory eStoreBuilder mck 3 2 0 4 nt 5 Next you need to enter the address of the test server YourTestServer YourCompany com 6 In the Merchant CGI environment screen select the ASP radio button 7 Accept the defaults in the next two scree...

Страница 128: ...ribute Description Name Define the name of the object for scripting purposes Cybercash configuration file Path to the Configuration File required for the CyberCash payment processing When you install the MCK you specified an install directory The install process will create a test mck subdirectory which has a mck cgi conf subdirectory containing the merchant_conf file Enter the path to this file f...

Страница 129: ...tions show the interaction and its participants To pass OrderID to the CyberCash object 1 Shift select the following elements CyberCash element in Basement Session element in Basement Submit Order button on page 2 Right click and choose Possible Interactions Mouse down to the eStore CyberCash category and double click Set CyberCash OrderID to value from Session when FormButton is clicked Parameter...

Страница 130: ...set queries must have the following fields of data To set the CyberCash Credit Card Properties 1 Shift select the following elements Submit Order button on page CyberCash in Basement Customers recordset in Basement 2 Right click and choose Possible Interactions Mouse down to the eStore CyberCash category and double click Set all CyberCash credit card properties to values from Customers when FormBu...

Страница 131: ...h 1 Shift select the following elements CyberCash element in Basement Form button on page 2 Right click and choose Possible Interactions Mouse down to the eStore CyberCash category and choose Submit CyberCashBookStore data for processing when SubmitOrder is clicked There are no parameters Parameter Set to BillingCountryCol BillingCountry BillingZipCol BillingPostalCode BillingStateCol BillingRegio...

Страница 132: ... Session element in Basement CyberCash element in Basement 2 Right click and choose Possible Interactions View the eStore CyberCash category and choose Store transaction results from CyberCashBookStore in Session when Submit Order is clicked 3 In the Parameters dialog set the parameters according to the following table then click OK Parameter Description Set to ErrMsgVarName Names the session vari...

Страница 133: ...e Possible Interactions Mouse down to the eStore CyberCash category and choose Store transaction status from CyberCashBookStore in Orders when Submit Order is clicked and redirect based on transaction outcome 3 Set the parameters according to the following table then click OK 4 Close the Interactions Center Parameter Set to Store Error Info Checked FailedRedirect Expand tree node and select the Or...

Страница 134: ... 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 For detailed information on how to set the payment process up see the document titled Navigating an E commerce site located in installation directory Drumbeat eStore Documents Navigating doc ...

Страница 135: ... a fee To calculate the discount or fee you can add or deduct a flat rate or percentage For example you might deduct a discount when a shopper buys more than a certain amount or add a fee if the delivery is out of state Currently eStore only supports discount adjustments for product items Fee adjustments are not yet supported for individual product items However both discounts and fees can be appl...

Страница 136: ...o handle line item discounts without the weight related columns ShoppingCart_Discounts_WithWeight csv Includes columns for discounts and weight to enable both line item discounts and weight based shipping Setting Up Shopping Cart Adjustments The Shopping Cart SmartElement saves the adjustment information in an array block of information of name value pairs Of the pair the name is the name you give...

Страница 137: ...y activations on the Shopping Cart SmartElement you can set up the adjustment on such order attributes as weight quantity or sub total 1 In Drumbeat open the shopping page This page has the Shopping Cart SmartElement in the Basement and the Shopping Cart Display SmartElement on the page To learn how to set up the Shopping Cart page see Chapter 3 Adding Products to the Shopping Cart ...

Страница 138: ...nd 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 set the adjustment parameters See below for parameter descriptions ...

Страница 139: ...djustments must come after any update activations interactions are applied To view assigned interactions on an element 1 Select the element right click and select Assigned Interactions ordered 2 Select and drag interactions to reorder the execution of the assigned activations on the page Parameter Description AdjustmentName Enter a name for the adjustment AdjustmentType Select the type of adjustme...

Страница 140: ...his DrumNote demonstrates how to discount the total purchase price if the total purchase price exceeds a certain amount This is accomplished by defining a threshold dollar amount that must be met for the discount to take effect In this example we set up a 5 discount if the total purchase price exceeds 300 This discount is only given to customers that spend more that 300 dollars on their purchase i...

Страница 141: ...oks and offers discounts at 5 If the customer buys more than 35 books then the discount increases to 10 This feature is complete user defined and the data is referenced from a database installation path Drumbeat 2000 eStore xxxx edf DrumNote_500 Variable Handling Fees This DrumNote builds on the previous example for Handling Fees Each Fee can be dynamically generated from a database cost calculato...

Страница 142: ...Chapter 7 142 ...

Страница 143: ...h your media and customize the database with your specific product information By going through the Quick Store tutorial you re probably familiar with the Starting Point and can begin customizing it If however you did not go through Quick Store we recommend reading the introduction of the tutorial titled Getting Familiar with the Quick Store Starting Point Before making modifications be sure to ta...

Страница 144: ...ifications 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 need to change the background on the two templates and on the Home page To change the background a template 1 In Templates Manager click on a template or page to make its layout active 2 Click the Attributes tab For Background Content make sure File is sele...

Страница 145: ...og 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 Images in Using Drumbeat ...

Страница 146: ...each button has an on and off state To change navigation images 1 In the layout right click an Image Button element and choose Attributes 2 For the Content attribute make sure File List is selected and click the ellipsis button 3 In the Multimedia Properties dialog click Select Files Navigate to the image file you want to use for the off state and click Add Do the same for the on state image file ...

Страница 147: ...s layout active 2 Click the Attributes tab For Link Styles including Visited Active and Hover choose the desired style from the dropdown lists To learn how to create your own styles see Chapter 4 Navigation under Link Styles Effects in Using Drumbeat or check the Drumbeat Help for the words in bold Change Images and Text You can change images and text such as logos and descriptions right in the la...

Страница 148: ... modifications be sure to make a copy and rename the database Customize Database Content Before making modifications be sure to make a copy and rename the database The bookstore database is located at installation directory Drumbeat 2000 Quick Store SiteAssets Databases To customize the database content 1 Open the copy of the bookstore database in Access and from the Tables tab click the Books tab...

Страница 149: ...ng product information to the table save and close the file Create New DataSource Name In Drumbeat you are going to create a new DSN that points to your customized bookstore database To create a new DataSource Name 1 From Asset Center click Add Assets and choose Queries 2 In Query Manager select the query titled BookQuery and click Edit 3 In SQL Query Manager click Data Sources 4 In the ODBC Data ...

Страница 150: ... 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 ...

Страница 151: ...lishing 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 ...

Страница 152: ...Chapter 8 152 ...

Страница 153: ... SmartElement allows you to display the contents of the Shopping Cart as an HTML table with a variety of formatting options Shopping Cart SmartElement The Shopping Cart SmartElement is a server side element that appears in the Drumbeat basement The Shopping Cart SmartElement can be added to a Drumbeat page by dragging it onto the design layout like any other element The Shopping Cart contracts all...

Страница 154: ... Expiration days Specifies the cookie expiration in days Run time properties which are available via scripting to the Shopping API methods include the following SalesTax Stores the sales tax for a given order This is typically set via contracts and can be accessed via the Shopping cart s GetSalesTax and SetSalesTax Value methods Shipping Stores the shipping for a given order This is typically set ...

Страница 155: ...reshold property to determine if an adjustment value should be calculated This can be the order weight order quantity order subtotal or the value of a session variable RateType specifies whether the adjustment will be a flat or percentage adjustment Allowed values are Flat and Percentage Rate specifies the adjustment rate For flat adjustments this will be a monetary value for percentage adjustment...

Страница 156: ...ype Rate DataType Threshold Comparison Creates an adjustment object with properties based on the parameters passed The Adjustments Array property description describes the parameters The value of the adjustment is set and updated independently using the SetAdjustmentValue method AddBinding Column Value Adds a reference in the shopping cart binding array to the name value pair represented by the pa...

Страница 157: ...sts Returns true if the adjustment name exists otherwise returns false Destroy Destroys existing references to a given shopping cart element when its data is inserted into a database If the cart is persisted as a cookie it destroys the cookie as well FindItem itemID Checks whether an item with a ProductID corresponding to the itemID parameter exists in the shopping cart Returns the row number if t...

Страница 158: ...e value of an adjustment named Discount var adjObj ShoppingCart GetAdjustmentObj Discount var value adjObj Value GetAdjustmentsTotal Returns the sum total of the adjustments currently in the shopping cart s adjustments array Note that adjustments representing discounts are treated as negative numbers whereas fees are treated as positive numbers Therefore the value returned from this method may be ...

Страница 159: ...ultiples returns the quantity for the last occurrence of the item GetOrderFromDB DbRecordset Retrieves an order from the recordset specified by the DbRecordset parameter This is useful if you want to provide the ability for shoppers to modify unshipped orders for instance This assumes that you pass the DbRecordset filtered on the OrderID already GetSalesTax Returns the current value stored in the ...

Страница 160: ...ID OrderIDCol Inserts the shopping cart data into the Drumbeat recordset specified by the DbRecordset parameter The OrderID parameter specifies a valid OrderID and the OrderIDCol specifies the column name in DbRecordset that will store the OrderID RemoveAdjustment Name Removes the adjustment referenced by the Name argument from the shopping cart Adjustments array The adjustment object which specif...

Страница 161: ...alue Sets the shipping property of the shopping cart to the value specified by the Value argument Update Updates the shopping cart to reflect changes made in the ShoppingCart display element that is changed quantities or removed items UpdateAdjustments Updates the values of adjustments in the shopping cart Adjustments array to reflect the current values of order data and subtotal This is called by...

Страница 162: ... subtotal PostServer As you might guess from the name this event is executed after the Server event Several contracts make use of the PostProcess event Line item discounts in which the discount needs to be calculated after a product is added to the cart since the calculation depends on the quantity and or total of the added item Setting the value of the shopping cart shipping and sales tax propert...

Страница 163: ...andle line item discounts without weight related columns ShoppingCart_Discounts_WithWeight csv includes columns for discounts and weight to enable both line item discounts and weight based shipping 2 Click OK and the Data Map Content Table will be created Rename each column header to match the column header names in your cart To rename columns double click the column header and enter the name in t...

Страница 164: ...on As a result you can name the cart columns anything you like and order them however you want The csv file contains entries for this row Do not change them All columns beyond the required columns should be left blank The non asterisked columns in the following table are required although you can change the column names The asterisked columns are optional and will appear only if you choose the CSV...

Страница 165: ...s database Modifying the Data Map Content Table The basic ShoppingCart CSV file provides a good starting point for your shopping cart and contains all the required columns Most likely you will have to change the names of the source and destination DB fields modify the column names to your liking and add additional columns you d like to display To change the name of a Source DB field Destination DB...

Страница 166: ... Shopping Cart The name you choose for your shopping cart must be consistent on all the pages on which it is used To deploy a functional shopping cart you will likely have a Shopping Cart element on several pages in your site For instance on any page where products can be added to the cart you will need a Shopping Cart element You will also need a Shopping Cart element on the page where the conten...

Страница 167: ...level discounts and fees shipping sales tax along with the unadjusted subtotal the adjusted subtotal after discounts and fees are included and the grand total UseCurrencySymbol toggles whether any monetary columns such as price total discount etc of the display will be formatted with a currency symbol This was formerly the UseDollarSign attribute in the original release but has been generalized to...

Страница 168: ... Grand Total but you might choose to replace it with something like Your total order comes to SourceCart name of the Shopping Cart that provides data for this display It must match with case sensitivity the name of the shopping cart you want displayed Subtotal Label the label used to identify the subtotal in the summary area of the display The default is Subtotal but you might choose to replace it...

Страница 169: ... item corresponding to the current record in the Recordset is added to the Shopping Cart With this contract the quantity for the added item is one Parameters for controlling redirection after adding are described below Parameters Redirect After Adding determines whether you want to redirect after adding the item or not NewItemRedirect specifies the target page for redirecting after an item is succ...

Страница 170: ... value contained in the Form element Parameters for controlling redirection after adding are described below Parameters Redirect After Adding 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 wehther you want to redirect to a message page ...

Страница 171: ...u can optionally redirect or add without redirecting Parameters Redirect After Adding 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 AlreadyInCar...

Страница 172: ...You can optionally redirect or add without redirecting Parameters Redirect After Adding 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 AlreadyInC...

Страница 173: ...u can optionally redirect or add without redirecting Note that the page should be submitted to itself as such there should be no action assigned to the form Parameters Redirect After Adding 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...

Страница 174: ...base The Go To Page parameter allows you to redirect to the specified page after the insert is completed Note that this contract is used for an Orders database that inserts each cart item as its own order record It is preferable to use a normalized data structure that includes separate records for orders and order details Parameters Go To Page specifies the target page for redirecting after Cart c...

Страница 175: ...ate an OrderID needed for an OrderDetails record such as the Insert order in recordset and Replace token in target with unique OrderID contracts When the button is clicked the shopping cart data is inserted into the orders database where each item is an order detail The Go To Page parameter allows you to redirect to the specified page after the insert is completed Parameters OrderIDCol is the name...

Страница 176: ...riable for instance When the button is clicked the shopping cart data is inserted into the orders database using the OrderID stored in the ASPServer where each cart item is an order detail Parameters OrderIDCol is the name of the OrderID column in the target recordset VariableName is the name of the ASP server variable that stores the OrderID for the current shopping session SuccessRedirect specif...

Страница 177: ... an order detail record using the OrderID value obtained here Note The two contracts are designed to accommodate a typical order database schema in which order records are stored in a separate table from OrderDetail records Also note that the method for retrieving the Autonumber OrderID requires a field in your database for capturing a timestamp Parameters OrderIDCol is the name of the column in t...

Страница 178: ...or an OrderDetails record such as the Insert order in recordset and Replace token in target with unique OrderID contracts This contract can be used when the cart items are inserted as order details using an OrderID stored in a Session variable for instance When the button is clicked the shopping cart data is inserted into the orders database using the OrderID stored in the ASPServer only if the Cy...

Страница 179: ...this contract Note that 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 token in target with unique OrderID contracts When the button is clicked the shopping cart data is inserted into the orders database using the OrderID stored in the Hidden Form Element only if the Cybercash tran...

Страница 180: ...pdate ShoppingCart with data from SCDisplay when button is clicked and redirect to pagename This contract extends the simple Update Cart contract by including redirection options It is 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 ...

Страница 181: ... shoppers to modify an existing order if it has not been shipped It is assumed that the reocrdset will already be filtered to the Order record of interest Parameters Go To Page specifies the target page for redirecting after Cart contents are retrieved from the database Participants ShoppingCart Recordset Button any clickable object Do not show remove column from ShoppingCart in SCDisplay This con...

Страница 182: ...any clickable object such as a button image etc Replace token in target with Total from ShoppingCart This interaction replaces a token in a text element with the value of the a order total value specified in the Total parameter This allows you to use one contract to display either the order subtotal adjusted total or grand total Parameters DoNotShowIfEmpty allows you to hide the grand total if the...

Страница 183: ...al quantity refers to the actual number of items rather than the number of disctinct line items For example if you had one line item in the cart that specified 10 items of Product X this contract would return 10 or the total quantity Parameters Token is the exact case sensitive text in the text element that will be replaced with the count of Cart items Participants Shopping Cart Target text box ed...

Страница 184: ...you to hide an element typically a button or image button if the shopping cart is empty For instance you can use this technique to hide a button that links to the check out area of an online store if the shopping cart is empty Parameters None Participants Shopping Cart Target button image text element form element etc Replace token in target with item count from ShoppingCart This interaction repla...

Страница 185: ...articipants Button form button image any clickable object Edit Box edit box or hidden form element ShoppingCart Add ListElement to bindings of ShoppingCart when button is clicked This contract allows you to add non recordset data contained in an list element 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 contract is app...

Страница 186: ...te_507 illustrates the use of related Add to bindings contracts Parameters VariableName is the name of the Session variable that contains the data to be bound to the cart Cart Column is the name of the shopping cart column that will hold the data contained in the session variable You will most likely need to add this column to your shopping cart data map See DrumNote_507 for details and precaution...

Страница 187: ...r shopping cart This is a contract between a basement Shopping Cart SmartElement a submit button and a Recordset that provides source data to the Shopping Cart When the button is clicked an item corresponding to the current record in the Recordset is added to the Shopping Cart With this contract the quantity for the added item is one Parameters for controlling redirection after adding are describe...

Страница 188: ... to the Shopping Cart When the button is clicked an item corresponding to the current record in the Recordset is added to the Shopping Cart With this contract the quantity for the added item is the value contained in the Form element If the form element is empty the quantity defaults to one Parameters for controlling redirection after adding are described below Parameters Redirect After Adding det...

Страница 189: ...em corresponding to the current record in the Recordset is added to the Shopping Cart With this contract the quantity for the added item is one Parameters for controlling redirection after adding are described below You can optionally redirect or add without redirecting Parameters Redirect After Adding determines whether you want to redirect after adding the item or not RedirectPage specifies the ...

Страница 190: ...d an item corresponding to the current record in the Recordset is added to the Shopping Cart With this contract the quantity for the added item is one Parameters for controlling redirection after adding are described below You can optionally redirect or add without redirecting Parameters Redirect After Adding determines whether you want to redirect after adding the item or not RedirectPage specifi...

Страница 191: ... work These are outlined in detail in DrumNote_511 Parameters LinkDestination page is the destination for linking from the product in the list to a detail for that product ProductIDColumn is the name of the column in the Recordset the one that contains the list of related products that contains the unique ID for the given product ProductNameColumn is the name of the column in the Recordset the one...

Страница 192: ...is important customer information It is an interaction between a recordset that contains the customer s credit card number and a text element or edit box used to display the data the result is the display of the credit card in a form such as 1234 Parameters CreditCardCol is the name of the column in the recordset that stores the credit card number Mask is the string that specifies the mask to be u...

Страница 193: ...the adjustment changes the raw order subtotal With line item adjustments discounts and or fees are applied based on the individual product or line item in the Shopping Cart without reference to the rest of the order Further the value of the adjustment is added to or subtracted from the individual item s total which are ultimately reflected in the order subtotal It is important to remember that the...

Страница 194: ...discount based on a purchase greater than a specified amount Applied adjustments can be displayed in the ShoppingCart display This contract calculates the adjustment as a percentage of 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 line items in the shopping c...

Страница 195: ...contract applies a percentage adjustment specified in the percentage parameter if the Session variable specified in the VariableName parameter matches the value specified in the Value parameter 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 line items in the shopping cart Additional contr...

Страница 196: ...ton is clicked to allow the user to change their mind This contract applies a percentage adjustment specified in the percentage parameter when the button is clicked The actual adjustment is calculated using the percentage value multiplied by the 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 r...

Страница 197: ...d amount Applied adjustments can be displayed in the Shopping Cart display This contract applies a flat adjustment specified in the Flat Adjustment parameter if the specified data parameter exceeds the threshold A related contract is available to apply percentage adjustments in this manner Note that these adjustments are global to the order and are not relevant to specific line items in the shoppi...

Страница 198: ... discount This contract applies a percentage adjustment specified in the percentage parameter if the Session variable specified in the VariableName parameter matches the value specified in the Value parameter 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 line items in the shopping cart A...

Страница 199: ... the button Be sure to use the companion contract Remove adjustment when button is clicked to allow the user to change their mind This contract applies a flat adjustment specified in the FlatAdjustment parameter when the button is clicked A related contract is available to apply percentage adjustments in this manner Note that these adjustments are global to the order and are not relevant to specif...

Страница 200: ...ional required column See DrumNote_506 for details on configuring your cart data map to enable line item discounts Note This contract should be used in conjunction with the Add item to cart contracts where this contract will determine if a discount applies based on the item that has been added The actions for this contract occur in the Cart PostServer event It is therefore important that you disab...

Страница 201: ... must be configured with additional required columns See DrumNote_506 for details on configuring your cart data map to enable line item discounts Note This contract should be used in conjunction with the Add item to cart contracts where this contract will determine if a discount applies based on the item that has been added The actions for this contract occur in the Cart PostServer event It is the...

Страница 202: ...er represents the amount to which the order data is compared to determine whether the adjustment is applied where the order data parameter can be the total purchase total weight or total quantity of the shopping cart Applied adjustments can be displayed in the ShoppingCart display This contract applies a flat adjustment A related contract is available to apply percentage adjustments in this manner...

Страница 203: ...hold parameter represents the amount to which the order data is compared to determine whether the adjustment is applied where the order data parameter can be the total purchase total weight or total quantity of the shopping cart Applied adjustments can be displayed in the Shopping Cart display This contract applies a percentage adjustment A related contract is available to apply percentage adjustm...

Страница 204: ... the currency symbol to display if the Show Currency Symbol parameter is checked Show Currency Symbol toggles whether a currency symbol will be displayed in the output Show Minus Sign toggles whether to show a minus sign for discounts Token is the case sensitive text in the text element to be replaced with the respective adjustment value Participants ShoppingCart Target text element edit box Remov...

Страница 205: ...in the text element to be replaced with the adjustment total Participants ShoppingCart Target text element edit box Replace token in target with number of adjustments from ShoppingCart This is an interaction between the ShoppingCart and a text element or edit box that replaces a token with the number of adjustments currently applied to the cart This contract simply returns a string representation ...

Страница 206: ...justments record such as the Insert order in recordset and Replace token in target with unique OrderID contracts When the button is clicked the shopping cart adjustments data is inserted into the recordset where each adjustment is a single record in an Order Adjustments recordset The Go To Page parameter allows you to redirect to the specified page after the insert is completed Note This contract ...

Страница 207: ...rt order in recordset and Replace token in target with unique OrderID contracts When the button is clicked the shopping cart adjustments data is inserted into the recordset where each adjustment is a single record in an Order Adjustments recordset The Go To Page parameter allows you to redirect to the specified page after the insert is completed Note This contract should be executed before the Ins...

Страница 208: ...sed to determine if the target will be shown Participants Shopping Cart Target image button text element etc Create target only if adjustment exists in ShoppingCart Will only 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 Car...

Страница 209: ...ference to the reorder level value If the difference exceeds the reorder level the item is considered to be in stock and an in stock message set via a parameter is used to replace the token in the element Otherwise the item is considered out of stock and an out of stock message replaces the token Parameters In stock Msg is the message displayed if the product is calculated to be in stock Out of st...

Страница 210: ...n stock and an in stock image set via a parameter is shown Otherwise the item is considered out of stock and an out of stock image is shown The paths for the images must be specified in the respective parameters relative to the application directory for instance media instock gif Parameters In stock Image is the path relative to the application path for the image to be displayed if an item is in s...

Страница 211: ...s is an interaction between the shopping cart a recordset and a button Note This contract should be executed before the Cart contents are inserted into the OrderDetails recordset a process that destroys the cart Be sure that it is assigned before the Insert ShoppingCart Ö contract with respect to the Shopping Cart element Parameters QtyOnOrderCol is the name of the column in the recordset that sto...

Страница 212: ...gets each product ID and the order quantity for that product then looks up the product in the Products recordset comparing the order quantity from the OrderDetails recordset with the UnitsInStock value from the Products recordset If the order quantity of any product in the orderDetailsRS exceeds the units in stock from the ProductsRS the target participant will not be shown Parameters OrderDetailQ...

Страница 213: ...ity for that product then looks up the product in the Products recordset comparing the order quantity from the OrderDetails recordset with the UnitsInStock value from the Products recordset If the order quantity of any product in the orderDetailsRS exceeds the units in stock from the ProductsRS the target participant will be shown Parameters OrderDetailQtyCol is the column name of the OrderDetails...

Страница 214: ...on order are then decremented by the order quantity for each product This contract should be used in conjunction with the Do not create target if the quantity of any product in OrderDetailsRS exceeds stock levels in ProductRS contract to prevent updating an order that doesn t have sufficient stock levels to fulfill it Parameters OrderDetailQtyCol is the column name of the OrderDetails recordset th...

Страница 215: ...r commerce sites before you can go live For information on the CyberCash configuration process visit CyberCash at www cybercash com cybercash merchants Most of the CyberCash element s functionality is achieved through the application of associated contracts Processing a transaction with the CyberCash SmartElement involves the following three steps 1 Setting the SmartElement s properties to data re...

Страница 216: ...in these services through CyberCash directly For a good introduction to on line credit card processing visit www cybercash com cybercash services credit_101 html Design Time Attributes There are only three design time attributes for the CyberCash SmartElement Name is the name of the element CyberCash Configuration File is the path to the Configuration File required for the CyberCash payment proces...

Страница 217: ...te is the billing state of the credit card CCZip is the billing postal code of the credit card CCCountry is the billing country of the credit card OrderID is the ID of the order being submitted for processing OrderTotal is the total cost of the order being submitted ResultStatus stores the transaction status returned by CyberCash ErrLocation stores the error location if the transaction fails Empty...

Страница 218: ...cessing when button is clicked contract 3 Capturing the results of the transaction request from the CyberCash Cash Register Note that the application order of the contracts described below is important and should follow the steps listed here In other words the Set contracts should be applied before the contract that submit the info to CyberCash which in turn should be applied before that contracts...

Страница 219: ...ash SmartElement s OrderID property to the value of a Form Element on the page containing the OrderID Set CyberCash order total to ShoppingCart grand total when button is clicked An interaction that sets the CyberCash SmartElement s OrderTotal property to the value of the ShoppingCart s subtotal Use this contract only if you do not include separate values for shipping and tax in the total cost of ...

Страница 220: ... allows you to store the transaction results in the database and redirect based on the transaction outcome Parameters SuccessRedirect specifies the destination page if the transaction was successful FailedRedirect specifies the destination page if the transaction failed Consider using the Store transaction results in ASPServer Contract which allows you to generate an error message on the FailedRed...

Страница 221: ... tables Incorporating shipping rate tables from various shipping carriers Obtaining cost calculations from UPS The strategy for managing shipping costs as well as sales tax has changed since the original eStore release to overcome some problems noted by users The Shopping Cart has been extended to include shipping and sales tax properties to hold those respective values The contracts to calculate ...

Страница 222: ...ation to be captured and manipulated within the Drumbeat page Note The ITC requires a license on the sever for the underlying ActiveX control MSINET OCX This license is given if the server machine has qualifying MS development software installed i e Visual Interdev Visual Basic etc Parameters Prompt is the string that appears at the top of the list to prompt a selection OrigCountry is the the coun...

Страница 223: ... database for both the ship method and cost in one step Note that this contract assumes you have a table or view created that includes the column for the specified zone for each of the ship methods you offer See DrumNote_510 for a detailed example Parameters Prompt is the string that appears at the top of the list to prompt a selection UsePrompt toggles whether a prompt is used in the list element...

Страница 224: ...ip methods you offer See DrumNote_510 for a detailed example Parameters Prompt is the string that appears at the top of the list to prompt a selection AlternateZone is the column name from the ship tables referring to the alternate zone to be used to calculate shipping costs for states in the state list parameter DefaultZone is the column name from the ship tables referring to the default zone use...

Страница 225: ...her weight or purchase price and the contract takes the total weight or order subtotal from the cart and finds the corresponding range in the recordset and extracts the associated shipping value Note that in order to implement shipping based on order weight ranges you will need to track item weight in your shopping cart which means you ll need to store items weights in your products database Param...

Страница 226: ...arge of 25 00 Parameters Ship Rate Per Item is the numeric value of the shipping charge for each item Token is the exact case sensitive text that will be replaced by the shipping value Participants ShoppingCart Set target to ship method when selection is made in source Set the contents of an element usually an edit box to the selected item in a list or list box that contains ship data when a selec...

Страница 227: ...lected in the recordset unless an accompanying Insert or Update contract is applied between the button and recordset Parameters ShipCostCol is the recordset s destination field for the list element s ship cost data ShipViaCol is the recordset s destination field for the list element s ship method data Typical Participants Button submit button Recordset ShipList dropdown list Replace token in targe...

Страница 228: ...t box Version 1 0 Contracts The following contracts shipped with the original version of eStore or in the interim between the original release and this release They are deprecated in favor of the contracts listed above Set value in grandtotal to sum of subtotal shipping and tax when ShipList changes This is a client side contract that calculates a grand total as the sum of subtotal shipping and ta...

Страница 229: ...ed to calculate the sum The names of all edit boxes used in the calculation are provided as comma separated values in the EditBoxes parameter This is useful for calculating the grandtotal of an order using additional or fewer component totals than the related contract which specifically sums subtotal shipping and tax For instance you may have discount info that you want to reflect in the grandtota...

Страница 230: ...hopping cart which means you ll need to store items weights in your products database Parameters Maximum Col is the column of the recordset participant that specifies the name of the column containing the maximun value of a given weight or price range Minimum Col is the column of the recordset participant that specifies the name of the column containing the minimum value of a given weight or price...

Страница 231: ...ent that contains the sales tax value Shipping Element Name is the name of the element that contains the shipping value Token is the exact case sensitive text that will be replaced by the shipping value Participants ShoppingCart Target text element edit box hidden form element Replace token in target with flat rate shipping based on total quantity from ShoppingCart This is a server side contract t...

Страница 232: ...ine Knowledge Base acknowledge several problems using the Internet Transfer Control in ASP We have encountered one particular error in our testing The ITC occasionally generates a Still Executing Last Request error This can usually be overcome by refreshing the page The contract to populate a dropdown list with available shipping options handles this error and displays a message prompting the user...

Страница 233: ...d in http www taxadmin com fta rate sales html as specified for 1999 They do not take into account additional locality sales taxes or sales taxes based for special items such as food You will have to update your database to reflect changes in the rates Parameters BillingStateCol is the name of the column in the CustomerRS that contains the customer s billing state MyStates is the comma separated l...

Страница 234: ...ing state from a customer recordset is used to find the corresponding state in the TaxRS With the TaxRS filtered to the appropriate state the sales tax rate is retrieved and formatted The formatted vlaue is then used to replace the token Parameters BillingStateCol is the name of the column in the CustomerRS that contains the cutomers billing state used to find the sales tax rate TaxStateCol is the...

Страница 235: ...x rate otherwise 0 00 will be displayed Because this is a server event you can t get the value of the state directly from a form element on the page so you have to get the value from the recordset that contains the customer s billing state The MyStates parameter represents the list of states in which you do business and for which you are responsible for paying sales tax This is a comma separated l...

Страница 236: ...Chapter 10 236 ...

Страница 237: ...18 content Shopping Cart 92 Content Center 82 cookies login 114 creating login pages 112 new update user pages 115 credit card validation 125 customizing Quick Store content 148 customizing Quick Store 143 CyberCash 126 adding 128 reference 215 test account 127 D Data Source Name 81 set up 81 database products table 79 databases security 122 DataForm wizard 79 Data Map CSV file 92 errors 99 hook u...

Страница 238: ...s 122 HTTPS protocol 122 SET payment processing 123 setting up product pages 79 settlement 125 shipping shopping cart API methods 154 shipping calculations contracts 221 Shopping Cart adding from Asset Center 100 adding to a page 100 adding to product pages 91 adjustments 135 adjustments reference 193 API methods 154 contracts 169 displaying column headers 106 displaying items on a page 103 elemen...

Отзывы: