Developer forum

Forum » Ecommerce - Standard features » Payment and Shipping get erased on checkout

Payment and Shipping get erased on checkout

Gaëtan Di Caro
Reply

Hello,

 

I have an issue with one of my solutions. That solution only has one payment method and one shipping method, which are irrelevant and hidden to the user (in a one-step checkout). These 2 methods are available and set as default for the website's country.

If I add products to my basket and go see it in the backend, I can see that the payment and shipping method are set correctly. Once in the basket, when i complete the checkout, the order in the backend suddenly doesn't have any shipping or payment selected. It is not a big problem because this solution is 9.3.13. But I need to update to the latest 9.4 and when I do that I cannot complete the chackout because I get an error message "The payment method is not set". If I downgrade the error disappears.

I tried to have the methods displayed in the basket for testing, and it confirms my findings : when I arrive in the basket, they are shown and set correctly, but as soon as I proceed, they disappear. By that I mean that not only the ids for selected payment and shipping methods have been voided, but I cannot see these methods at all, they have disappears from the loops (which are now empty). I have tried adding a hidden field with the payment id hard-coded, but I have the same issue.

I don't have any custom code acting at that moment of the checkout process (and none which does anything to the shipping and payment methods).

 

Do you have any idea where that could come from ?


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Gaëtan,

 

We did have a similar issue a few versions back when using Shipping and/or Payment methods with no Providers would void the values after checkout, but that has been fixed in a 9.4 hotfix. We haven't seen that issue for a few months now.

 

Are you sure you upgraded to the latest 9.4? Or something after 9.4.11?

 

Best Regards,

Nuno Aguiar

 
Gaëtan Di Caro
Reply

Yes I was on 9.4.12. I upgraded to 9.4.14 just to be sure and I have the same issue

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Gaëtan

Could you please post and URL for the website on support@dynamicweb.dk 
We would like to see the setup as this is not an general error

Notice you are able to set the default Payments and Shipping methods here:
Settings -> Ecommerce -> Internationalization -> Countries (Select country)

Also you can choose the available methods on the Cart.

https://www.screencast.com/t/0PlJiqtnS

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Gaëtan Di Caro
Reply

Hi Kristian,

I have already contacted the support, Lars Britz actually asked me to post on the forum as we couldn't find a solution ;)

 

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Gaëtan,

Can you check if the customer/delivery country provided during checkout (or on the user profile) is different from the country selected on the website?

The first time you arrive at the cart it will use the default country you have selected on the website as payment/shipping country.
During checkout the address provided by the customer will be used as payment/shipping country.
If the currently selected payment/shipping method is not available for the current country then the payment/shipping method will be cleared from the cart.
See payment countries and shipping countries.

Best regards,
Morten

 
Gaëtan Di Caro
Reply

Interesting. Which field is it exactly ? In the backend I can see that my user has a country in the text field "Country" (imported from the erp) but no country is selected in the list "Billing / Shipping country". On the basket template, the tag Ecom:Order.Delivery.Country is empty

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

It is the "Billing / Shipping country" field on the user profile which is used by the cart.

I have no other suggestions but to look for values submitted in front end...

CountryCode
EcomOrderCustomerCountry
EcomOrderDeliveryCountry
EcomCartPayMethodID
EcomCartShippingMethodID

 

 

 
Gaëtan Di Caro
Reply

Interesting. I checked my template and EcomOrderCustomerCountry and EcomOrderDeliveryCountry are set as read-only input fields (the content is imported from the erp) that contain the customer's country (in my case here, "DANMARK"). Could that be the issue, if the text doesn't map to a country defined in the backend, or if the country code isn't set ?

The other values are not present in my template.

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Yes, I think the imported values are causing this problem, because they don't map to a valid ISO country code in Dynamicweb.

If you are using Data Integration to import from the ERP...

AccessUserCountryCode should contain a two letter ISO country code, e.g. "DK".
AccessUserCountry should contain the name of the country, e.g. "Danmark".

Best regards,
Morten

Votes for this answer: 1
 
Gaëtan Di Caro
Reply

Thanks Morten, I managed to fix the issue now. I simply removed the name and id of my country field so that it doesn't map to anything on checkout, but the field is still displayed. The order goes through fine now :)

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I am running into the same issue. I removed the read only fields but I kept having the same issue. It turned out I had to pick a default payment method under Internationalization | Countries for it to work.

Is that by design? Is a payment method always a required setting? That seems to be different from how it was in 8.

Thanks for any insights you can provide.

Imar

 

You must be logged in to post in the forum