Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > Customise the Purchase Process View modes: 
User avatar
Member
Member
ROBERT.FIELD-PRIDEICT - 5/25/2009 9:16:44 AM
   
Customise the Purchase Process
Very frustrated with the developer documentation. I have the following requirement.

I want to create an online system for a canvas printing system, how needs a very specific product ordering and checkout process.

For example:-
Step 1) Upload an image
Step 2) Identify image resolution and create a list of size options on the fly based on the source image.
Step 3) Offer the user the option of Sepia or Greyscale
Step 4) Offer Image Depth options and bleed.
Step 5) Confirm and add to basket.

Now. I am a very experienced C# programmer and I can handle all of the above with my own code. The problem is that this customer wants full CMS functionality as well, hence the choice to use Kentico.

So I am lost as to where I can find some real meaning full documentation that will help me understand how I can add my product to the basket.

I have tried to debug an e-commerce template example to find out what is going on but everything is virtual and I think the code I want to debug resides in a transformation, which I can checkout and view but can not debug.

Having purchased a full Social lic I am frustrated at the lack of documentation and most of all some working examples (Visual Studio projects) to show how to do some of the more tricky items. I am the developers at Kentico have all the answers but we need them on paper and in downloads.

This product is excellent and generally I have no issues, other than how to do some real code customising within the e-commerce.

Regards





User avatar
Kentico Support
Kentico Support
kentico_jurajo - 5/26/2009 2:30:37 AM
   
RE:Customise the Purchase Process
Hi,

You can find some helpful information in our API manual. Also, the controls used in the check out process are stored in\CMSModules\Ecommerce\Controls\ShoppingCart. You can click right on the frame on the web site and display its info to see which page/control is used. For example, you can find the sample of adding products to cart in \CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartContent.ascx.cs - AddProducts method and btnAddProduct_Click event.

Also, you can customize the checkout process by developing custom steps. I hope it will help.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
ROBERT.FIELD-PRIDEICT - 6/2/2009 4:26:06 PM
   
RE:Customise the Purchase Process
Ok, Firstly thanks for the help and quick response.

I have been looking at the items your suggested and they have help me understand alot more about how it works. I must say I am used to working within the ASP.NET Web Application model, which is much more structured and easier to debug/understand what the developers have done.

I have a couple of questions if that is all right.

I discovered the ECommerceContext static class with some very usefull information and I think I can pose my question in a simpler fashion now.

I am building some WebParts to enable the customers to customise the product (not with options).

I am creating additional tables within the CMS database to hold the values of the options. The main reason for doing this is that one of the options is the customers choice of photo to print on the product, which will be uploaded.

Now in order to main the same functionality as the ecommerce cart I need to do the following in my WebPart

1) allow user to upload the image at step1.
2) When image is loaded manually add a product to the shopping cart with a known product id (1000)
3) after this is complete I need to read back the CartItemID and then write the uploaded image into my new table and link it by CartItemID to your COM_ShoppingCartSKU table. so that when the checkout process is complete I will have an order in your table and the associated image in my table with a relationship between the two tables.

It is very important that I recieve the image at the first step of the process and do not loose it when the browser is closed (returning users will baskets will be intack). I will be creating more webparts to manipulate the image before completing the checkout process.

I think I can dig and dig and dig, but as the developer's I am sure you can point me in the right direction (ECommerceContext?)

I looked at your suggested ShoppingCartContent.ascx.cs - AddProducts, but this would mean adding it to the page and my Webpart would not be able to scope to it. I have tried loading ShoppingCartContent.ascx as a usercontrol on the fly and then executing the AddProducts method but this is too messy and I am sure there is a simple way.

User avatar
Member
Member
ROBERT.FIELD-PRIDEICT - 6/2/2009 5:06:13 PM
   
RE:Customise the Purchase Process
Just a quick extra note. I found this function, which allmost does it all.

ECommerceContext.CurrentShoppingCart.AddShoppingCartItem(156, 1,new int[] {159});


This WORKS!!, however the Item that is added is not committed to the database as it is when added using your control. I am simply missing the plot here!!! Pulling my hair out now!!!

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 6/16/2009 9:00:53 AM
   
RE:Customise the Purchase Process
Hello,

Could you please try to use sample code for adding items to shopping cart using API that you can find in 'How to add products to shopping cart using API' article.

Best Regards,

Martin Dobsicek