frontend.checkout.postcoderequired CSS Fix

Posted By jcosmo Sat 28 Nov 2015
Rated 5 stars based on 1 vote.
Add to Favorites0
Author Message
jcosmo
 Posted Sat 28 Nov 2015
Supreme Being

Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)

Group: Forum Members
Last Active: Tue 16 Feb 2016
Posts: 19, Visits: 117
When setting the frontend.checkout.postcoderequired configuration setting to require the Postal Code, Kartris correctly requires that an entry is made but doesn't update the label to visually indicate it is a required field...

I'd suggest changing the CustomerAddress.ascx.vb file, at line 72 to the following:
If KartSettingsManager.GetKartConfig("frontend.checkout.postcoderequired") = "y" AndAlso value = True Then
valZipCodeRequired.Enabled = True
lblPostcode.CssClass = "requiredfield"
Else
valZipCodeRequired.Enabled = False
lblPostcode.CssClass = ""
End If


This fixes the issue so that the label visually indicates it as a required field based on the configuration setting.
Paul Marked As Answer
 Posted Fri 1 Jan 2016
große Käse

große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
Thanks, have added to the latest code, will be in the v2.9002 release.

--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
jcosmo
 Posted Sat 16 Jan 2016
Supreme Being

Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)Supreme Being - (10,485 reputation)

Group: Forum Members
Last Active: Tue 16 Feb 2016
Posts: 19, Visits: 117
I ended up having to make a change to this fix. I had implemented the check in the EnableValidation property, but I was seeing the postcode not get the required styling on the Shipping Address...

I found that the EnabledValidation property isn't toggled until the form tries to submit and was being initialized as false. So I moved the check to the PageLoad function at line 257:
If KartSettingsManager.GetKartConfig("frontend.checkout.postcoderequired") = "y" Then
lblPostcode.CssClass = "requiredfield"
Else
lblPostcode.CssClass = ""
End If


This correctly and reliably sets the styling on postcode for both Billing and Shipping addresses.
Paul Marked As Answer
 Posted Mon 8 Feb 2016
große Käse

große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)große Käse - (509,208 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
Ok, have done the same in the core code.

--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top