Developer forum

Forum » Development » Custom Checkout

Custom Checkout

Per Ljung
Reply
Hi!

I have created a custom checkout handler and placed in the dw server, but dw still uses the default handerl

I have written this in the class header:

 [Dynamicweb.Extensibility.AddInName("MyHandler")]
    [Dynamicweb.Extensibility.AddInActive(true)]
    public class MyHandlerCheckOut : Dynamicweb.Ecom7.Cart.CheckoutHandler

And I'm able to select this in paymethods, I've added a pay method Test, but then I don't know where to setup 
Cart v2 to use my custom handler.
Best regards,
P


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Per

I'm not sure I understand the scope of your question, but if you need information about creating a custom CheckoutHandler, then please read this document describing the process: http://developer.dynamicweb-cms.com/Admin/Public/DWSDownload.aspx?File=%2fFiles%2fFiler%2fDocumentation%2fDevelopment%2feCommerce%2f(en-US)+Checkout+Handlers%2c+Shopping+Cart+v2.pdf.

Once you've created the CheckoutHandler and added it to your bin folder, then you need to create a Payment Method using this Handler. You do that by going to Management Center -> eCommerce -> Orders -> Payment -> New payment. In the "Method" section, fill in the relevant information. Under "Cart type", select Checkout Handler (Shopping Cart v2). From the "Checkout Handler" dropdown, select your custom Checkout Handler. If any parameters are needed, set them in the section.
One last thing you need to do is to specify which countries this Payment Method should be available for. Do this under the "Country fees" tab by simply checking them on the list.

Your Payment Method based on your custom Checkout Handler is now available for use.

Hope this helps :)

- Jeppe

 
Per Ljung
Reply
Hi!

I have done this except selecting country because there is no option to select Sweden when I use Swedish as a language, but I guess Sweden then is default?

Still DW uses the default checkout handler.

Best regards,
Per
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

You still need to have Sweden as a delivery country in the Management Center -> eCommerce -> Internationalization -> Country. If you don't select any country for the Payment Method; it will never be used.

- Jeppe

 
Per Ljung
Reply

Hi!

Then there is something wrong in the database because Sweden is not in this list and If I try to create it I get a message that this country code already exists. As I said, this country were connected to the Danish language I and I removed it from that I tried o connect it to Swedish, but then I got this error message.

Best regards,
Per
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Can you mail me a link to the site?
jea@dynamicweb.dk

- Jeppe
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Maybe you need to switch to a different language first to translate the country in the selected language? You may not see the country if it hasn't been localized yet....

Imar
 

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

I have sent you a response. Please let me know if this did not fix your issue.

- Jeppe

 
Per Ljung
Reply

Hi!

For some reason I can't make it work, do you think you can take a look at the settings in admin?

Best regards,
Per
 
Per Ljung
Reply


Hi!

I think I solved it (almost), I saw that you had to specifiy the payment method step 2 of the cart + the country.

But I get an error:

Order <No order>: Error: Unexpected exception with the message: Method not found: 'Void Dynamicweb.Ecom7.Cart.CheckoutHandler.CheckoutDone(Dynamicweb.eCommerce.Orders.Order)'.
See error log for details.

I have extended CheckOutHandler and called base.CheckoutDone, but it seems that this method cannot be found inte the base class.

Best regards,
Per

 

You must be logged in to post in the forum