|
||
The standard purchase (checkout) process looks like this:
1.The user browses the website and adds the products to the shopping cart. They can modify the number of items in the cart. They can also insert a discount coupon.
2.The user clicks the Checkout button. They can choose from three options:
- Sign in using an existing account - if they already have a user account
- Create a new account
- Continue as anonymous customer - this option doesn't require the user to create a user account, but they need to enter their details with every purchase. You can enable/disable this option at CMS Desk -> Tools -> E-commerce -> Configuration -> Store Settings -> Allow anonymous customers.
3.The user enters/updates customer data, including first name, last name, e-mail and company name.
4.The customer enters billing/shipping address or chooses from the list of previously used addresses. The use can also choose to enter an additional company headquarters address that can be enabled at CMS Desk -> Tools -> E-commerce -> Configuration -> Store Settings -> Use an extra company address.
5.The user chooses the payment and shipping method.
6.The user previews the order.
7.The user completes the order or continues with on-line payment. The order status is set to New. The order notification e-mail is sent to store owner and to the customer if it's configured in CMS Desk -> Tools -> E-commerce -> Configuration -> Store Settings dialog.
8.The payment is processed by the payment gateway. If the payment succeeds/fails, the order status is set to values specified at CMS Desk -> Tools -> E-commerce -> Configuration -> Payment methods -> <select some payment method> -> Order status when payment succeeds/fails. A payment notification e-mail is sent to store owner and to the customer if it's configured in CMS Desk -> Tools -> E-commerce -> Configuration -> Store Settings dialog and if the payment is successfully completed.
9.The user is redirected to the page configured in the properties of the Shopping cart web part, in the Default URL after purchase value.
The shopping cart content is stored in the database and it's bound to the current user name. If the user is anonymous, the cart ID is stored in a browser cookie. It ensures that the cart content is preserved even if the session is lost during application restart. You can find more details on how the shopping cart is retrieved in Figure D - Shopping cart retrieval.
When the checkout process is completed (regardless if the payment succeeds or fails), a new order is created and the shopping cart content is moved to the order. The cart is empty then.
The cart content is accessible in your code using the ShoppingCartInfoObj class in the checkout process steps.