Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2006
    Location
    Durham, UK
    Posts
    84
    Plugin Contributions
    0

    Default [Done 1.3.5] zone_name Bug - e.g. London & Londonderry

    PROBLEM:
    Create 2 zones for a country with zone_name as one word (no spaces) where the first characters of the zone_name are identical e.g. London and Londonderry.

    In my case:
    zone_name = Londonderry, zone_id = 329
    zone_name = London, zone_id = 332

    Now, try to create an account with zone_name London. The account will be created but the zone_name entered will be Londonderry - the first on the list in zone_id order.

    Now try to edit the address book entry to London. This works OK in Admin, but trying to do it from the customer's end returns the error:

    Please select a County/State from the County/State drop-down menu below.

    BUG APPLIES TO:
    1.2.7d certainly, but a previous report of the same bug by profitshock http://www.zen-cart.com/forum/showthread.php?t=33138 suggests it's also in the 1.3 series.

    PARTIAL SOLUTION:
    In Admin, insert a space into one of the zone_names e.g. change London to London Town.

    Trouble is that London is one of the biggest customer bases in the UK, so any discouragement to registering an account is quite a problem. Any comments or ideas for fixes would be much appreciated.

  2. #2
    Join Date
    Mar 2006
    Location
    Durham, UK
    Posts
    84
    Plugin Contributions
    0

    Default Re: zone_name Bug - e.g. London & Londonderry

    Well then...

    I've checked out 1.3.0.2 and it has exactly the same bug. What's more surprising is so does osCommerce

    On the oscCommerce forum I found this post from Thomas Steven:
    http://forums.oscommerce.com/index.p...9&#entry536359

    Apparently, the SQL $zone_query -

    $zone_query = tep_db_query("select distinct zone_id
    from " . TABLE_ZONES . "
    where zone_country_id = '" . (int)$country . "'
    and (zone_name like '" . tep_db_input($state) . "%'
    or zone_code like '%" . tep_db_input($state) . "%')");

    - is actually looking for a zone_name that has the same first characters as the input. So it's no surprise that when it finds 2 (London and Londonderry) it gets its nickers in a right old twist.

    Thomas suggests changing this line:
    and (zone_name like '" . zen_db_input($state) . "%'
    to:
    and (zone_name = '" . zen_db_input($state) . "'
    or zone_name like '" . zen_db_input($state) . "'

    I've searched the Zen 1.3.0.2 code and there seem to be 3 files using $zone_query = "select distinct zone_id ...

    includes\modules\create_account.php
    includes\modules\pages\address_book_process\header_php.php
    includes\modules\checkout_new_address.php

    I tried changing one of these files: includes\modules\create_account.php
    That seems to solve the problem - but I don't know what repercussions that could have on the rest of Zen Cart operations.

    I don't know exactly what the other 2 files do and if they need changing or not. But whilst sorting this out I noticed another issue with addresses in 1.3.0.2 which is currently ongoing on: http://www.zen-cart.com/forum/showth...ng+address+tax

    Upshot is that I won't be attempting to change the other 2 files until the tax issue has been resolved and I have a stable base to experiment on.

  3. #3
    Join Date
    Oct 2004
    Location
    England
    Posts
    114
    Plugin Contributions
    0

    Default Re: zone_name Bug - e.g. London & Londonderry

    I am affected by this bug can the core team please advise. The website I have this issue with is www.skintightrubber.com.

    Regards
    Mark.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: zone_name Bug - e.g. London & Londonderry

    There are a number of files involved with this fix. It will be included in the next release.
    .

    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. [Not a Bug] USPS ® ™ characters
    By numinix in forum Bug Reports
    Replies: 3
    Last Post: 4 Oct 2011, 07:34 PM
  2. [Done v1.5.0] Bug: PRODUCTS_VIRTUAL_DEFAULT
    By RodG in forum Bug Reports
    Replies: 1
    Last Post: 30 Mar 2011, 04:16 AM
  3. [Done] Breadcrumb Bug
    By Neon Phoenix in forum Bug Reports
    Replies: 0
    Last Post: 1 Aug 2008, 05:45 AM
  4. [Done v1.3.9] Linkpoint bug?
    By yellow1912 in forum Bug Reports
    Replies: 3
    Last Post: 19 Jan 2008, 07:42 PM
  5. [DONE] My Account bug
    By kuroi in forum Bug Reports
    Replies: 3
    Last Post: 8 Jul 2006, 09:55 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR