Presentation is loading. Please wait.

Presentation is loading. Please wait.

E-commerce customization Petr Vozak, Technical Leader.

Similar presentations


Presentation on theme: "E-commerce customization Petr Vozak, Technical Leader."— Presentation transcript:

1 E-commerce customization Petr Vozak, Technical Leader

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 E-commerce customization 1) Using custom e-commerce providers

4 Using custom e-commerce providers How doest it work?

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 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 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 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:

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 E-commerce customization 2) Developing custom dialog for the checkout process

11 Developing custom dialog for the checkout process

12 DEMO 1)Create checkout process step user control (*.ascx) inherit from ShoppingCartStep override bool IsValid() override bool ProcessStep() 2)Register checkout process step

13 E-commerce customization 3) Developing custom payment gateway

14 Developing custom payment gateway

15 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 E-commerce customization Summary 1)Using custom e-commerce providers 2)Developing custom dialog for the checkout process 3)Developing custom payment gateway


Download ppt "E-commerce customization Petr Vozak, Technical Leader."

Similar presentations


Ads by Google