BUG: Always Display State as a Pulldown in Zen Cart 1.5.5

There’s a bug in Zen Cart 1.5.5 that causes the State dropdown not to be correctly populated when you set Configuration->Customer Details->State - Always display as pulldownto true in Admin->Configuration->Customer Details.  It causes your State dropdown menu to look like this:

Zen Cart State dropdown without state set

even though the value of State has been set.

You can see the root cause of this error in the Chrome Javascript debugger.  Right click and select Inspect, then click the Console tab, and you’ll see the traceback for the error.

Traceback in Zen Cart for no state error in 1.5.5

The root cause of the error was that the stText element id was removed from the default template Zen Cart 1.5.5, an attempt to modify that DOM element failed, and stopped JavaScript processing.  The fix was straightforward; just check for this element’s existence before updating it.  You can pull the fix from Github and apply it to your Zen Cart 1.5.5 site, or hire me to do it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.