Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Scrolling to the error message in Checkout - SCA (Elbrus) for SiteBuilder
Something has been bugging me since Reference Checkout days: if someone neglects to put in a security number for the CC and hits Continue it looks like nothing happens -- as the page does not scroll up to show the useful error message and now red-bordered input box.
I really needed to fix that for a client and did so this afternoon by adding the following line of code to an extended version of OrderWizard.Module.PaymentMethod.Creditcard.js inside the error.errorCode === 'ERR_CHK_INCOMPLETE_SECURITY_NUMBER' if statement:
$(window).scrollTop($('.creditcard-section').offset().top);
Now if they don't input a security number, the page scrolls up and shows the error to them. I scroll up to the top of the cc info module as it looked better than just scrolling up to the security number input. That fixed this clients specific needs.