Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Dec 2012
    Posts
    66
    Plugin Contributions
    0

    Default Alphabetizing Glitches

    Not a problem, really,

    just an aggravation. I have my global product sort set to alphabetize product lists by product names. Unless I have a compelling reason to sort products with individual Sort Orders (hardly ever), I just give all products in a particular category the same Sort Order, then let the system present them alphabetically. Almost always this process works like a charm, but occasionally I encounter cases where the system alphabetizing appears to fail, that is, a product appears in lists out of proper alphabetical order.

    Here's an example that I've just run into:

    http://lunekeltkar.com/catalog/index...&cPath=159_167

    This page shows a list of oil painting reproductions based on originals by William-Adolphe Bouguereau. Each product name begins with the artist's last name followed immediately by a colon and a space, then the name of the painting. In this list, "Bouguereau: Premier Deuil" should properly come between "Bouguereau: Les remords d'Oreste" and "Bouguereau: Psyché et L'Amour". Instead, it appears out of order between "Bouguereau: La jeunesse de Bacchus" and "Bouguereau: Le ravissement de Psyché".

    I've tried re-entering the product name letter by letter, previewing and updating the product description after entering each letter. As I enter the name letter by letter, the system properly alphabetizes *until* I enter the P, at which point the product suddenly appears in its old unalphabetical place. I also entirely deleted the product and re-entered it from scratch, but I got the same unalphabetical result.

    I know of course that the system isn't really making an error in alphabetizing the list; it just appears so. *Clearly* I'm making some error when I enter the product name, but danged if I can find it. If anyone has a solution, I would be much obliged.

    Ken Baker

  2. #2
    Join Date
    Dec 2012
    Posts
    66
    Plugin Contributions
    0

    Default Re: Alphabetizing Glitches

    Resolved.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Alphabetizing Glitches

    What was the cause of this issue and the solution that you used to fix it?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Dec 2012
    Posts
    66
    Plugin Contributions
    0

    Default Re: Alphabetizing Glitches

    Quote Originally Posted by Ajeh View Post
    What was the cause of this issue and the solution that you used to fix it?
    Ajeh,

    I wish that I knew. I didn't really resolve the error, because I never discovered exactly what it was. I'm afraid that I rather stupidly let dumb luck solve the problem, and I have no idea how dumb luck solved it. The alphabetizing error disappeared when I did this:

    1. I copied the name of another product ("Bouguereau: L'Idylle") then pasted it into the name block for the product ("Bouguereau: Premier Deuil") that wasn't alphabetizing properly. With this copied/pasted name, the offending product alphabetized correctly according to its (now incorrect) name.

    2. I then typed the correct product name *within* the copied/pasted name, to yield this hybrid: "BougueBouguereau: Premier Deuilreau: L'Idylle". The product continued to alphabetize correctly with this hybrid name.

    3. I then deleted the unneeded parts of the hybrid name to leave only the correct product name ("Bouguereau: Premier Deuil"), and saints be praised the product now correctly alphabetized under its correct name.

    I wish now that I hadn't carried out this unwieldy experiment, as I didn't really get to the cause of the alphabetizing problem. I've run into this same aggravation three or four times over the past year, and clearly it's not a big issue, but I just wonder what's going astray. I *absolutely understand* that the alphabetizing function in ZenCart isn't making the errors, nor are gremlins giving me hell to pay. Quite clearly, I'm somehow getting characters into my product names that have some sort of disjoint between the letter displayed and the underlying character code. When I encounter the problem again, I'll try to resolve it without the help of dumb luck; if so, I'll post the solution. It's likely a problem unique to my system, as I've not been able to find any other ZenCart users who have posted about the same problem.

    Ken Baker

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Alphabetizing Glitches

    It is kinda weird ... but should you trip on a replicated issues of this and solution do let us know ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,498
    Plugin Contributions
    88

    Default Re: Alphabetizing Glitches

    It sure sounds like a collation-related issue. A couple of data-points might narrow the issue down:
    1. Using phpMyAdmin, select your products_description table then click the 'Structure' tab at the top of the page. What collation shows for the products_description field?
    2. What is the value for DB_CHARSET in /includes/configure.php and /YOUR_ADMIN/includes/configure.php?
    3. What value is used in the setlocale function call in /includes/languages/YOUR_TEMPLATE/english.php, /includes/languages/english.php and /YOUR_ADMIN/includes/languages/english.php?
    4. What is the value for CHARSET in /includes/languages/YOUR_TEMPLATE/english.php and /YOUR_ADMIN/includes/languages/english.php?

  7. #7
    Join Date
    Dec 2012
    Posts
    66
    Plugin Contributions
    0

    Default Re: Alphabetizing Glitches

    lat9

    It's decent of you to give this matter any thought, as it's really just something that piqued my curiosity: Why is my system causing this little glitch from time to time? I really thought that the error had to be with my input (typing), but once I traced the data to answer your questions, I'm now not so sure. I discovered some discrepancies in the settings which may or may not have some bearing on the matter (I don't have sufficient knowledge at present to tell one way or the other).

    1. The collations for both my products_name and products_description tables are set to utf-8. The products_name table, however, is set to type varchar(64) and No to Null, while the products_description table is set to type text and Yes to Null.

    2. The DB_CHARSET in both my /includes/configure.php and my /MY_ADMIN/includes/configure.php is set to utf-8.

    3. The setlocale function call varies somewhat among the three files that you listed, as follows:

    /includes/languages/MY_TEMPLATE/english.php
    @setlocale(LC_TIME, 'en_US.ISO_8859-1');

    /includes/languages/english.php
    @setlocale(LC_TIME, 'en_US');

    /MY_ADMIN/includes/languages/english.php
    setlocale(LC_TIME, 'en_US');

    (In the last file, the @ isn't present; I don't know if that has any bearing.)

    4. The CHARSET also varies among the two files that you listed, as follows:

    /includes/languages/MY_TEMPLATE/english.php
    define('CHARSET', 'iso-8859-1');

    /MY_ADMIN/includes/languages/english.php
    define('CHARSET', 'utf-8');

    I still think that I'm making input errors to cause the alphabetizing glitches, because — if the glitches came from faulty settings — surely I would have gotten a lot more glitches than I have (just a handful). Still, all these differences among the config files et al. make me wonder if I haven't inadvertently introduced confusion by making changes that I didn't fully understand. I don't *recall* making any changes to these settings, and I can't *find* any reference to such changes in my ZenCart notes, but if changes were made, I must have made them.

    Any thoughts on this additional data would be most appreciated.

    Ken Baker

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,498
    Plugin Contributions
    88

    Default Re: Alphabetizing Glitches

    Ken, I'm guessing that what happens "occasionally" is that you're copying/pasting text from a website to your admin during the product definition and the text contains an accented character (like the accented e in the product name you gave as an example). The settings in your english.php files are inconsistent with the collation (utf-8) in your database.

    You'll need to change three files:
    1. /includes/languages/english.php: @setlocale(LC_TIME, 'en_US.UTF-8');
    2. /includes/languages/YOUR_TEMPLATE/english.php: define('CHARSET', 'utf-8');
    3. /YOUR_ADMIN/includes/languages/english.php: setlocale(LC_TIME, 'en_US.UTF-8');

    Please note that the capitalization (or not) of utf-8 does matter!

  9. #9
    Join Date
    Dec 2012
    Posts
    66
    Plugin Contributions
    0

    Default Re: Alphabetizing Glitches

    lat9,

    As luck (bad luck, maybe) would have it, I just had another alphabetizing glitch appear. I know that it's not from my copying and pasting from some other source into my product names, because I absolutely avoid that (I do sometimes copy and paste, but only if I entered the original typing, such as copying from one of my products to paste into another). Also, whenever I need a non-US character (such as acute and grave vowels, cedillas, etc.), I always enter the character codes for the particular characters.

    Bottom line, before I try to fix this latest alphabetizing glitch, I'll make the corrections in my settings that you just pointed out. If that solves this present alphabetizing problem, then I can be fairly assured that the confused settings caused the glitches all along. I'll let you know the outcome.

    Thanks,

    Ken Baker

  10. #10
    Join Date
    Dec 2012
    Posts
    66
    Plugin Contributions
    0

    Default Re: Alphabetizing Glitches

    lat9 (and Ateh for status),

    I made the changes that you suggested, because they were needed no matter what, but tidying up the english.php files didn't solve my latest alphabetizing glitch. Not to belabor the point, I have a product named "Bouguereau: Tobias" that was showing up in my alphabetized product list between "Bouguereau: L'Amour mouille" and "Bouguereau: L'Idylle" (everything else in the list was properly alphabetized). I deleted the name "Bouguereau: Tobias" and typed in several pseudo names, and *each time* the name properly alphabetized. If, however, I re-typed in the correct name ("Bouguereau: Tobias"), the product would leap back to the same incorrect spot in the alphabetized list.

    I went to the table in phpMyAdmin, and when I sorted the products_description table by products_name, poor old "Bouguereau: Tobias" also appeared out of alphabetical order in the table sort (between L'Amour mouille and L'Idylle). When, however, I deleted the product name from the table field and re-typed it directly into the field, the alphabetizing glitch disappeared, and "Bouguereau: Tobias" now takes its proper place in the alphabetized list.

    Upshot, I still don't know what I'm doing to cause these occasional alphabetizing glitches, but at least I've found a quick and easy way to fix them.

    Thanks again,

    Ken baker

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Glitches
    By Ravedragon in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 30 Apr 2015, 04:13 PM
  2. v151 Alphabetizing Glitches
    By KenBaker in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 28 Oct 2013, 11:27 AM
  3. Alphabetizing / price change / giving designer credit
    By swimmer35 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 8 Jan 2010, 06:23 PM
  4. WHY is this not alphabetizing correctly?
    By toddie in forum General Questions
    Replies: 3
    Last Post: 11 Sep 2006, 10:53 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