View Single Post
  #1  
Old 07-11-2015, 10:28 PM
  aneel13's Avatar 
aneel13 aneel13 is offline
 

Senior Member
  
Join Date: Jul 2015
Location: Dubai
Posts: 148
 

Default Different Checkout Fields On Change Country Event

I am looking into developing a new shipping module. But I am stucked in 2 initial areas of its developments:

1) I want the checkout fields (billing/shipping) change based on country selected. And the criteria for each country I am going to get from a service/API which will include which fields to show/hide and which fields are required/non-required. Meaning this has to be achieved in a way that as soon as the country changes, the service/API is called and based on its response the checkout fields against that country are shown in the checkout page along with a different validation rules. Please help me out, that how it could be achieved in X-Cart?

2) Another issue is that I want to keep the shipping/payment/review section hidden until the shipping/billing address fields are completely validated against my service/API. So what I am looking for is adding a next/continue button just below the checkout fields and only if the address is successfully validated against my service then only showing the right area which includes the shipping/payment/review section. The thing is I can't get the shipping charges for my shipping module until I validate my address fields against the service/API thatswhy, I am planning to keep it hidden until some charges are populated. Please let me know how this can be achieved aswell?


Regards,
Aneel
__________________
Regards,
Aneel Sarwar
X-Cart version: 5.2.10
Windows: 7
Modules: Free version modules
Reply With Quote