Results 1 to 9 of 9
  1. #1

    Default Proper Case Support for 1.3.x

    Hi Everyone,

    Just updated the code from SpeedyG's old case sensitivity modification (http://www.zen-cart.com/forum/showth...ght=propercase) to 1.3.x in case anyone is interested.

    Tested against a vanilla 1.3.0.2.

    Any comments, requests, updates should be posted here -- as the old thread is now archived.

    Paul
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Re: Proper Case Support for 1.3.x

    When adding the propercase code to your files you need to fix a typo
    Where it specifies the lastname at the end of that line in brackets it says firstname

    It should say lastname

    Basically the code should look like this

    /****** Begin: CONVERT TO PROPERCASE ******/
    $firstname = propercase_input($firstname, 1);
    $lastname = propercase_input($lastname, 1);
    $street_address = propercase_input($street_address, 0);
    $suburb = propercase_input($suburb, 0);
    $city = propercase_input($city, 0);
    $state = propercase_input($state, 0);
    $postcode = strtoupper ($postcode);
    $company = propercase_input($company, 1);
    /******* End: CONVERT TO PROPERCASE *******/

    You will notice that I have added support for the comapny name and post code for us guys and gals in the UK
    UK based Zen Cart Web Designer here www.handcoded.co.uk

  3. #3
    Join Date
    Jul 2004
    Location
    UK
    Posts
    182
    Plugin Contributions
    0

    Default Re: Proper Case Support for 1.3.x

    Anyone managed to get this working for 1.3.5 yet?

  4. #4

    Default Re: Proper Case Support for 1.3.x

    Quote Originally Posted by profitshock
    Anyone managed to get this working for 1.3.5 yet?
    I'll attempt to do this today, having just installed a test version of 1.3.5 myself.

    Paul

  5. #5

    Default Re: Proper Case Support for 1.3.x

    The following version works with a vanilla 1.3.5 installation based on the 09042006 release.

    It doesn't have any of the UK specific modifications (which i'd like to turn into country-based workarounds -- like uppercasing the country name for postal services that require it -- at some point in the future), but those are easily implemented following the reply above.

    Paul
    Attached Files Attached Files

  6. #6
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Proper Case Support for 1.3.x

    Can anyone confirm if "ProperCase" has been updated to work with Zen Cart v.1.36 or if the latest ProperCase 1.35 version works fine with Zen Cart v.1.36?

    Specifically does the latest version of ProperCase integrate well when the new state drop down code in Zen Cart v.1.36 is enabled? With the new state drop down code built into the 1.36 core, ProperCase need no longer apply to the Zones field, but rather just apply to the other data manually entered when a customer creates an account or updates their addressbook.

    Woody

  7. #7

    Default Re: Proper Case Support for 1.3.x

    Quote Originally Posted by Woodymon View Post
    Can anyone confirm if "ProperCase" has been updated to work with Zen Cart v.1.36 or if the latest ProperCase 1.35 version works fine with Zen Cart v.1.36?

    Specifically does the latest version of ProperCase integrate well when the new state drop down code in Zen Cart v.1.36 is enabled? With the new state drop down code built into the 1.36 core, ProperCase need no longer apply to the Zones field, but rather just apply to the other data manually entered when a customer creates an account or updates their addressbook.

    Woody
    I'll check it and let you know :)

  8. #8
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Proper Case Support for 1.3.x

    I manually merged into ZC 1.36, the ProperCase customizations previously suggested in this thread (see below) and everything appears to works well. I also applied the customization to the $state string. As such it appears the propercase_input function only impacts the state string when the long form of the state is manually entered. Does not appear to have any impact when the state abbreviation is called from zone definitions. I need to take a close look at the function logic to understand why, but at any rate, this is good.

    If a state abbreviation is manually entered, for example when there is no zone definitions set-up for a specific country, then I suspect the manually entered abbreviation will be converted by propercase and will then not appear in all UPPERCASE as would be the desired effect (that is the propercase_input function would convert "NY" to "Ny"). Or maybe it is improper to abbreviate state addresses in most of the world and this is not an issue? In the US abbreviation of the state address is recommended.

    The ProperCase functionality could possibly be updated to include a test for the number of characters entered in the state field. If the manual state entry is short (two characters, for example) then apply strtoupper. Similar idea could apply to short company names and any single character fields (e.g. if customer supplies only first initial for first name, and the store allows a single character for this field). Or maybe the propercase function logic has already been designed to adapt to such situations?

    I don't think this would be an issue for country addresses since the country input/selection process always calls the country abbreviation from the zone definitions. At least this appears to be the case. No pun intended.

    $firstname = propercase_input($firstname, 1);
    $lastname = propercase_input($lastname, 1);
    $street_address = propercase_input($street_address, 0);
    $suburb = propercase_input($suburb, 0);
    $city = propercase_input($city, 0);
    $state = propercase_input($state, 0);
    $postcode = strtoupper ($postcode);
    $company = propercase_input($company, 1);

  9. #9

    Default Re: Proper Case Support for 1.3.x

    I have easy populate advanced on my site. I was actually hoping that this mod would work with it but it doesn't seem to. Is their away to get this mod to work with it?
    Rich People scream, Wealthy people whisper

    www.cooltechcentral.com

 

 

Similar Threads

  1. Add a quantity per case/master case
    By Bigpehr in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 Dec 2010, 09:40 PM
  2. Customer details - Proper case
    By cjeb456 in forum Managing Customers and Orders
    Replies: 5
    Last Post: 15 Feb 2009, 11:14 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