View Single Post
  #5  
Old 07-20-2015, 01:12 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Different Checkout Fields On Change Country Event

Hello Aneel,

You can do both the points through a custom module only. X-Cart 5 has no such settings/services that you need.

Quote:
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

The checkout page is made of separate widgets and it is possible to trigger an AJAX widget reload through JavaScript. So, you may use the same technique that is used to reload the widget with shipping methods upon changing address fields. I'm not sure if I can name you exact files as there are many files used in that process.

Quote:
[I want to keep the shipping/payment/review section hidden until the shipping/billing address fields are completely validated

You may do this by assigning a CSS class to the container HTML tag and adding CSS that hides the sections if the container doesn't have the class.

Or you can go deeper and do the changes on the template level.

The base widget that renders the checkout pane is \XLite\View\Checkout
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote