kentico_zdenekc
-
8/27/2009 11:04:19 AM
RE:E-commerce - one click add to cart
Hi,
The order needs to be created in the step just before going to PayPal. So in the PayPalStep.ascx.cs (code behind of your step control), you will need to add a code to create new Order (OrderInfo object) before the ProcessPayment() is triggered.
In default checkout process, this action is performed in ShoppingCartPreview step. The complete code used in 4.0 version can be found in ~\CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartPreview.ascx.cs in ProcessStep() method. You could use this code in your step with some modifications (e.g. addresses, customer names, etc...).
One fresh note (information) is that in the future KenticoCMS version should be an API method for the new order code implemented...however in 4.0 and 4.1 you need to use the itemized code.
Anyway, this whole information is apparently not included in the mentioned KB article (nor the sample files). I'm sorry for any difficulties it has brought to you.
Regards, Zdenek C.
|