Ecommerce customization Petr Vozak Technical Leader Ecommerce customization

  • Slides: 16
Download presentation
E-commerce customization Petr Vozak, Technical Leader

E-commerce customization Petr Vozak, Technical Leader

E-commerce customization Agenda 1) Using custom e-commerce providers 2) Developing custom dialog for the

E-commerce customization Agenda 1) Using custom e-commerce providers 2) Developing custom dialog for the checkout process 3) Developing custom payment gateway

E-commerce customization 1) Using custom e-commerce providers

E-commerce customization 1) Using custom e-commerce providers

Using custom e-commerce providers How doest it work?

Using custom e-commerce providers How doest it work?

Using custom e-commerce providers • • Assembly: CMS. Ecommerce Namespace: CMS. Ecommerce Provider: Shipping.

Using custom e-commerce providers • • Assembly: CMS. Ecommerce Namespace: CMS. Ecommerce Provider: Shipping. Option. Info. Provider Method: Calculate. Shipping(…) Wrapper public static double Calculate. Shipping(Shopping. Cart. Info cart. Obj, string site. Name) { Are custom e-commerce providers enabled? if (ECommerce. Helper. Use. Custom. Handlers()) YES → Run custom code { return ECommerce. Helper. Get. Shipping. Option. Info. Provider(). Calculate. Shipping(cart. Obj, site. Name); } NO → Run Kentico code else { return CMSEcommerce. Shipping. Option. Info. Provider. Calculate. Shipping(cart. Obj, site. Name); } }

Using custom e-commerce providers • • Assembly: CMS. Ecommerce Namespace: CMSEcommerce Provider: Shipping. Option.

Using custom e-commerce providers • • Assembly: CMS. Ecommerce Namespace: CMSEcommerce Provider: Shipping. Option. Info. Provider Method: Calculate. Shipping(…) Kentico code public static double Calculate. Shipping(Shopping. Cart. Info cart. Obj, string site. Name) { Here is Kentico logic for shipping calculation, something like: // if shipping free limit is reached -> return zero (shipping is free) // else -> return shipping option value }

Using custom e-commerce providers • • Assembly: CMS. Custom. ECommerce. Provider Namespace: CMS. Custom.

Using custom e-commerce providers • • Assembly: CMS. Custom. ECommerce. Provider Namespace: CMS. Custom. ECommerce. Provider: Custom. Shipping. Option. Info. Provider Method: Calculate. Shipping(…) Custom code public double Calculate. Shipping(object cart. Obj, string site. Name) { Kentico method is called by default return CMSEcommerce. Shipping. Option. Info. Provider. Calculate. Shipping( (CMS. Ecommerce. Shopping. Cart. Info)cart. Obj, site. Name); }

Using custom e-commerce providers 1) Open Visual Studio and add Custom. ECommerce. Provider project

Using custom e-commerce providers 1) Open Visual Studio and add Custom. ECommerce. Provider 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=“CMSUse. Custom. Ecommerce. Providers” value=“true”>

Using custom e-commerce providers DEMO 1) How to customize shipping calculation – customize Calculate.

Using custom e-commerce providers DEMO 1) How to customize shipping calculation – customize Calculate. Shipping() 2) How to automatically set some credit to a new customer – Customize Set. Customer. Info()

E-commerce customization 2) Developing custom dialog for the checkout process

E-commerce customization 2) Developing custom dialog for the checkout process

Developing custom dialog for the checkout process

Developing custom dialog for the checkout process

Developing custom dialog for the checkout process DEMO 1) Create checkout process step user

Developing custom dialog for the checkout process DEMO 1) Create checkout process step user control (*. ascx) • • • inherit from Shopping. Cart. Step override bool Is. Valid() override bool Process. Step() 2) Register checkout process step

E-commerce customization 3) Developing custom payment gateway

E-commerce customization 3) Developing custom payment gateway

Developing custom payment gateway

Developing custom payment gateway

Developing custom payment gateway DEMO 1) Create payment gateway form • • • inherit

Developing custom payment gateway DEMO 1) Create payment gateway form • • • inherit from CMSPayment. Gateway. Form override bool Validate. Data() override bool Process. Data() 2) Create payment gateway provider • • • inherit from CMSPayment. Gateway. Provider override void Get. Payment. Data. Form() override bool Process. Payment() 3) Register payment gateway

E-commerce customization Summary 1) Using custom e-commerce providers 2) Developing custom dialog for the

E-commerce customization Summary 1) Using custom e-commerce providers 2) Developing custom dialog for the checkout process 3) Developing custom payment gateway