Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > How to make custom single page check out process? View modes: 
User avatar
Member
Member
matt-awg - 12/5/2012 3:50:25 PM
   
How to make custom single page check out process?
I am trying to make a custom single page check out process for a kentico 7 ecommerce site. Basically I just need cart contents, shipping address, shipping method and totals with a place order button. This site requires NO payment information.

I can't find much in searching devnet. I found this old post related to version 5:
http://devnet.kentico.com/Forums.aspx?forumid=45&threadid=22142
But it just says create a custom step and add all the controls onto that step... it does not explain how to do that and it references a link to documentation that just loads a blank page. I found this in the ecommerce 7 documentation:

http://devnet.kentico.com/docs/ecommerceguide/index.html?creating_custom_checkout_process_steps.htm

I followed that information and added a new custom step but I am trying to figure out how to add the existing controls, such as "ShoppingCartContent.ascx" onto this single step (this custom user control I created as a cart step). I add this to the .ascx page:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="EconCheckOut.ascx.cs" Inherits="CMSModules_Ecommerce_Controls_ShoppingCart_EconCheckOut" %>
<%@ Register Src="~/CMSModules/Ecommerce/Controls/ShoppingCart/ShoppingCartContent.ascx" TagName="CartContents" TagPrefix="cms" %>
<%@ Register Src="~/CMSModules/Ecommerce/Controls/ShoppingCart/ShoppingCartOrderAddresses.ascx" TagName="CartAddresses" TagPrefix="cms" %>
<cms:CartContents runat="server" ID="econCartContents" />
<cms:CartAddresses runat="server" ID="econCartAddresses" />


I added this in the code behind:
    protected void Page_Load(object sender, EventArgs e)
{
econCartContents.ShoppingCartControl = ShoppingCartControl;
econCartContents.ShoppingCart = ShoppingCart;

econCartAddresses.ShoppingCartControl = ShoppingCartControl;
econCartAddresses.ShoppingCart = ShoppingCart;
}


I made this custom check out step the first step in the check out process via CMS desk and this sort of works... the cart page loads and both the contents and addresses steps are there on a single page but each seems to act independently of the other. and causes a page refresh.. like if I check "My shipping address is different from the billing address. " - the page reloads and the cart items don't load properly - the price and tax and subtotals are all gone. It seems the post back from checking the box reloads the page and something is not loading properly in the cart contents control on post back. Maybe I need to convert the individual controls to AJAX so they don't interfere with each other? Has anyone ever done something like this and can point me in the right direction? Is this even possible? Do I have to right my own cart from scratch to achieve something like this?

Thanks,
Matt

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/9/2012 2:51:19 AM
   
RE:How to make custom single page check out process?
Hi,

the 5.5 forum is right and the documentation you found for v7 is also the right one. However, you need to realize that you need to merge the logic of the existing steps into one. Each step is represented by a separate control with separate logic. It is not enough just to put them all to one page - they are trying to redirect to the next step/control.

You need to take a look in each step's control code behind, extract the necessary code (logic) and paste it into your step's control so all the actions are processed at once.

Best regards,
Juraj Ondrus