1 / 16

E-commerce customization

E-commerce customization. Petr Vozak, Technical Leader. E-commerce customization. Agenda Using custom e-commerce providers Developing custom dialog for the checkout process Developing custom payment gateway. E-commerce customization. 1) Using custom e-commerce providers.

thina
Download Presentation

E-commerce customization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. E-commerce customization Petr Vozak, Technical Leader

  2. E-commerce customization Agenda • Using custom e-commerce providers • Developing custom dialog for the checkout process • Developing custom payment gateway

  3. E-commercecustomization 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 doubleCalculateShipping(ShoppingCartInfocartObj, stringsiteName) { if (ECommerceHelper.UseCustomHandlers()) { returnECommerceHelper.GetShippingOptionInfoProvider().CalculateShipping(cartObj, siteName); } else { returnCMS.CMSEcommerce.ShippingOptionInfoProvider.CalculateShipping(cartObj, siteName); } } Wrapper Are custom e-commerce providers enabled? YES → Run custom code NO→ Run Kentico code

  6. Using custom e-commerce providers • Assembly: CMS.Ecommerce • Namespace: CMS.CMSEcommerce • Provider: ShippingOptionInfoProvider • Method: CalculateShipping(…) public static doubleCalculateShipping(ShoppingCartInfocartObj, stringsiteName) { // if shipping free limit is reached -> return zero (shipping is free) // else -> return shipping option value } Kentico code Here is Kentico logic for shipping calculation, something like:

  7. Using custom e-commerce providers • Assembly: CMS.CustomECommerceProvider • Namespace: CMS.CustomECommerceProvider • Provider: CustomShippingOptionInfoProvider • Method: CalculateShipping(…) public doubleCalculateShipping(objectcartObj, stringsiteName) { returnCMS.CMSEcommerce.ShippingOptionInfoProvider.CalculateShipping( (CMS.Ecommerce.ShoppingCartInfo)cartObj, siteName); } Custom code Kentico methodis called by default

  8. Using custom e-commerce providers • Open Visual Studio and add CustomECommerceProviderproject from code samples to your CMS solution • Modify code of the custom e-commerce providers to reach your requirements • Add the following key to your web.config file to enable custom e-commerce providers: <add key=“CMSUseCustomEcommerceProviders” value=“true”>

  9. Using custom e-commerce providers DEMO • How to customize shipping calculation • customize CalculateShipping() • 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. Developing custom dialog for the checkout process DEMO • Create checkout process step user control (*.ascx) • inherit from ShoppingCartStep • override boolIsValid() • override boolProcessStep() • Register checkout process step

  13. E-commerce customization 3) Developing custom payment gateway

  14. Developing custom payment gateway

  15. Developing custom payment gateway DEMO • Create payment gateway form • inherit from CMSPaymentGatewayForm • override boolValidateData() • override boolProcessData() • Create payment gateway provider • inherit from CMSPaymentGatewayProvider • override void GetPaymentDataForm() • override boolProcessPayment() • Register payment gateway

  16. E-commerce customization Summary • Using custom e-commerce providers • Developing custom dialog for the checkout process • Developing custom payment gateway

More Related