Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2008
    Posts
    15
    Plugin Contributions
    0

    Default $flag_show_pulldown_states set to true

    Greetings,

    The following relates to ZenCart version 1.3.8a.

    I believe I found a small bug in modules/create_account.php near the bottom at about line 440.

    My system is configured with Configure->Customer Details->State Always Display as pulldown set to false

    and

    Configure->Customer Details->State set to true

    My interpretation of the above it that my store front should never display a pull down menu for states. However, I found it does when someone is setting up a new account and does not enter anything in the state box. The next screen shows a state pulldown and input text box for state. This behavior also happens even though I select a country like Antarctica which has no state zones set up in the configuration.

    In troubleshooting the issue, I found that the following line in modules/create_account.php (near the bottom at about line 440) is not setting value of $flag_show_pulldown_states to false. When I replace the line with $flag_show_pulldown_states = false;
    everything works fine. Of course this is not an ideal solution as if I later want to re-configure system to show the state pulldown I have to remember I made this change and then reverse it. In any case, here is what I think is the offending line of code:

    $flag_show_pulldown_states = ((($process == true || $entry_state_has_zones == true) && $zone_name == '') || ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true' || $error_state_input) ? true : false;

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: $flag_show_pulldown_states set to true

    It's not a bug. It's intended behavior. In the case where the customer cannot correctly type a valid entry, the pulldown appears to allow them to quickly choose a valid option. The Always Display Pulldown switch specifically affects the first visit to the page.

    If that's not the desired behavior for you and your customers, you're certainly free to make changes to the code similar to what you posted above.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v150 Featured Products stops working when SSL is set to True
    By sw1138lr in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 10 Jun 2012, 03:01 AM
  2. Replies: 0
    Last Post: 10 Aug 2009, 10:56 AM
  3. Why would I want to set ENABLE_SSL_CATALOG = 'true' ?
    By zcnb in forum General Questions
    Replies: 3
    Last Post: 10 Jun 2008, 11:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg