How to add e-commerce functionality to an aspx templates site

Mark Russell asked on January 1, 2017 22:42

We have an existing site that has been created using the aspx templates rather than the portal engine. There is now a requirement to add e-commerce features to this site. After doing some research of the documentation it seems that the e-commerce features can only be implemented using the portal engine.

My question is basically, what is the best way of implementing these features on our site? How I see it there are a couple of ways to do this:

  1. Implement this using the portal engine, My question here is, is it possible to add in some portal engine pages to a site that already uses aspx templates? I think this would work, but is not a good idea, with the problems of having to manage two master pages and would be very messy. I would rather not rebuild the whole site using the portal engine as there simply isn't time.
  2. The second option would be to implement it all ourselves using aspx templates and the api. Has anyone done this? Do you lose out on much/any functionality doing it this way?

I am leaning towards option 2 because I think we would still use all the management in the admin panel, we would just have to make api calls in the templates for managing the shopping cart and payment etc. If anyone can shed any light on the questions above that would be great, or even just some advice if you have had this problem before would be much appreciated.

Correct Answer

Zdeněk Cetkovský answered on January 2, 2017 13:55

Hi Mark,

Your assumptions are mostly correct. The documentation says that "the ASPX templates are not supported as well as if you use Portal engine sections on pages based on the ASPX templates". With the first discussed option, you would need to create complete portal engine master page for the checkout section, which in many cases means you'd basically rebuild the significant part of the whole site. Managing two different implementations of the master page isn't great, of course. Depending on the master page complexity, it could take less time than complete remake of the site and the main advantage here would be allowing flexible and faster checkout process design.

As for the second option, there actually is a solution implemented. The obsolete "Shopping cart" web part should run fine in mixed templates (ASPX + portal engine zones) or even in pure ASPX. It offers checkout process based on dynamically loaded step controls, located in ~\CMSModules\Ecommerce\Controls\ShoppingCart\ folder. The obsolete Shopping cart web part is based on the ShoppingCart.ascx control in this folder. The individual step controls are also used in the administration (namely in Orders application).
With this approach, you loose the aforementioned flexibility and simplicity with designing the checkout steps, but as you're used to ASPX templates, it may not be a big deal for you.
To configure the checkout process for the obsolete Shopping cart web part, you could follow the steps from upgrade 7.0 -> 8.0 instructions (search for sentence "The Checkout process settings were hidden"), as the configuration page of this checkout was hidden from the UI (because the new preferred way of configuring checkout through wizard manager and individual web parts was introduced). The configuration even allows to point the shopping cart web part to custom step controls, that can be based on the default ones... this way you could at least to some extent customize the behavior and appearance of the checkout.

You can also try to implement the checkout in your ASPX templates on your own, e.g. with using inspiration from the step controls. However, for most of the scenarios, it should be faster to reuse the already implemented functionality.

Another possible option starting with Kentico 10 could be MVC, but as you're using ASPX templates, I suppose it's not currently applicable to this project...

Should you need any additional details about the obsolete checkout process or API, please feel free to ask.


1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.