Sitefinity Ecommerce Custom Checkout

Sitefinity Ecommerce Custom Checkout

Posted on April 13, 2012 0 Comments

The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

This example is part of several series that I will be releasing in the near future showing how to use the Sitefinity Ecommerce API. This example shows you how to work within the checkout API to create a custom checkout widget. Please note that these are just examples of which certain features may not exist or function properly. It is not my intention to create sample widgets to use in a production environment, but instead provide you with examples (source code) giving you a better understanding of our API.

One Page Checkoutimage

The one page checkout is a custom checkout widget that can be used in combination with the donation and buy now widgets from my previous posts.   Like donations, customizing a checkout process is something many ecommerce applications struggle with.   Allowing the visitor to checkout as quickly as possible is ideal.  However, if the visitor wants to give a donation or purchase an online gift certificate, you may want the customer to bypass any tax or shipping calculations which are usually found on standard checkout pages.  With Sitefinity Ecommerce, you can create many custom checkout pages allowing for specific products (EX: ticket) to use a particular checkout page.  This one page checkout consists of the billing/shipping addresses, real-time shipping rates, payment information and cart preview.

Getting Started

To begin, download the project source code from GitHub.com (https://github.com/esitefinity/Sitefinity-Custom-Checkout) and add the project to your existing Visual Studio Sitefinity project. Once the project has been added to Sitefinity, you will need to log into the backend of Sitefinity and create a custom checkout page, dragging-dropping the custom checkout widget onto this page.  Edit the properties of the widget, selecting a “receipt page” to link the checkout process then publish this page.  This is all you need to do to use this custom checkout widget. 

Features

  • Real time credit card processing using the first payment method defined
  • Uses-real time shipping rates as defined in store settings based on the logged in customer.
  • Sends out email to customer
  • Creates order in Sitefinity backend

Limitations

This example is a work in progress and I want to make sure people understand this   I have placed this project on GitHub.com so that other developers can contribute to it.   Below are some of the current limitations of this widget

  1. You need to be logged in to checkout.   The reason for this is there is a call to get real time shipping rates that needs the ship-to zip code in the user profile.
  2. Uses the first payment method defined in the payment methods of the Ecommerce store settings.
  3. The LUHN check does not exist therefore doesn’t check to validate the credit card.
  4. JavaScript for Countries and State/Province does not exist.

Code Examples

Much of the code for this project exists in the folder called “Helpers”.  This includes the file OrderHelper.cs which contains many of methods and calls for this project.  The OrderHelper.cs file is a good example showing you some of the calls to the API.   

Again, look for updates on GitHub.com for this project as I know others will likely contribute to it.  

Much appreciation goes to Venkata Koppaka who helped in creating this example. Smile

progress-logo

The Progress Team

View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.

Comments

Comments are disabled in preview mode.
Topics

Sitefinity Training and Certification Now Available.

Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.

Learn More
Latest Stories
in Your Inbox

Subscribe to get all the news, info and tutorials you need to build better business apps and sites

Loading animation