E-commerce customization

5,178 views

Published on

KENTICO CONNECTION SESSION
In this session, we will show you the basics of the E-commerce customization. You will see E-commerce customization model and you will learn how to use custom e-commerce providers, how to customize ordering steps, how to create new payment gateway, what’s new in E-commerce 6.0 and more.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,178
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
40
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

E-commerce customization

  1. 1. E-commerce customization Petr Vozak, Technical Leader
  2. 2. E-commerce customization Agenda 1) Using custom e-commerce providers 2) Developing custom dialog for the checkout process 3) Developing custom payment gateway
  3. 3. E-commerce customization 1) Using custom e-commerce providers
  4. 4. Using custom e-commerce providers How doest it work?
  5. 5. Using custom e-commerce providers • Assembly: CMS.Ecommerce • Namespace: CMS.Ecommerce • Provider: ShippingOptionInfoProvider • Method: CalculateShipping(…) public static double CalculateShipping(ShoppingCartInfo cartObj, string siteName) { if (ECommerceHelper.UseCustomHandlers()) { return ECommerceHelper.GetShippingOptionInfoProvider().CalculateShipping(cartObj, siteName); } else { return CMS.CMSEcommerce.ShippingOptionInfoProvider.CalculateShipping(cartObj, siteName); } } Are custom e-commerce providers enabled? YES → Run custom code NO → Run Kentico code Wrapper
  6. 6. Using custom e-commerce providers • Assembly: CMS.Ecommerce • Namespace: CMS.CMSEcommerce • Provider: ShippingOptionInfoProvider • Method: CalculateShipping(…) public static double CalculateShipping(ShoppingCartInfo cartObj, string siteName) { // if shipping free limit is reached -> return zero (shipping is free) // else -> return shipping option value } Here is Kentico logic for shipping calculation, something like: Kentico code
  7. 7. Using custom e-commerce providers • Assembly: CMS.CustomECommerceProvider • Namespace: CMS.CustomECommerceProvider • Provider: CustomShippingOptionInfoProvider • Method: CalculateShipping(…) public double CalculateShipping(object cartObj, string siteName) { return CMS.CMSEcommerce.ShippingOptionInfoProvider.CalculateShipping( (CMS.Ecommerce.ShoppingCartInfo)cartObj, siteName); } Kentico method is called by default Custom code
  8. 8. Using custom e-commerce providers 1) Open Visual Studio and add CustomECommerceProvider project from code samples to your CMS solution 2) Modify code of the custom e-commerce providers to reach your requirements 3) Add the following key to your web.config file to enable custom e-commerce providers: <add key=“CMSUseCustomEcommerceProviders” value=“true”>
  9. 9. Using custom e-commerce providers DEMO 1) How to customize shipping calculation – customize CalculateShipping() 2) How to automatically set some credit to a new customer – Customize SetCustomerInfo()
  10. 10. E-commerce customization 2) Developing custom dialog for the checkout process
  11. 11. Developing custom dialog for the checkout process
  12. 12. Developing custom dialog for the checkout process DEMO 1) Create checkout process step user control (*.ascx) • inherit from ShoppingCartStep • override bool IsValid() • override bool ProcessStep() 2) Register checkout process step
  13. 13. E-commerce customization 3) Developing custom payment gateway
  14. 14. Developing custom payment gateway
  15. 15. Developing custom payment gateway DEMO 1) Create payment gateway form • inherit from CMSPaymentGatewayForm • override bool ValidateData() • override bool ProcessData() 2) Create payment gateway provider • inherit from CMSPaymentGatewayProvider • override void GetPaymentDataForm() • override bool ProcessPayment() 3) Register payment gateway
  16. 16. E-commerce customization Summary 1) Using custom e-commerce providers 2) Developing custom dialog for the checkout process 3) Developing custom payment gateway

×