Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Alphabetical Listing...without a, an, the ?

    Is there a way to set up the alphabetical listing so that in the product name the alphabeticalization would ignore the initial a, an or the of the name.

    In other words if I have products with these actual names:

    A Top in the Night
    An Apple on the Ground
    The Moon is Red

    instead of the alphabetical listing shown as above, it would show as:

    An Apple on the Ground
    The Moon is Red
    A Top in the Night

    Obviously, I could put the a, an or the at the end of the product....but that would mean adjusting several hundred names that I would prefer not to do.

    Thanks for any help.

  2. #2

    Default Re: Alphabetical Listing...without a, an, the ?

    Have you tried adjusting each product's sort order in Admin-->Catalogue-->Categories/Products?
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  3. #3
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Re: Alphabetical Listing...without a, an, the ?

    Thanks for the suggestion...but that is not going to work. Essentially all of my products (movies) will be in one category (though some will be in multiple categories). There will be about 1500 to start with more to be added gradually. For the most part customers will expect to find an alphabetical sort and that is already available since under the default settings, once you open a category you are then shown a drop down box at the top with the letters, A,B,C, D, etc. where you can choose to find the items in each lettered group. So if someone clicks the "C" they will find the item "Cats and Dogs"....but if the item is named "The Cats and Dogs" they won't find it under "C"...unless I change the name to "Cats and Dogs, The". I would prefer not to make the change in the titles if I can avoid it so I was hoping there was some kind of way (as I have seen in some other websites) where the alphabetical sort will ignore initial words such as "A", "An", and "The."

  4. #4

    Default Re: Alphabetical Listing...without a, an, the ?

    It would work. You can do a LOT with sort order - especially when you combine category sort order and product sort order. With sort order, YOU decide what order products appear in. If you want them to sort alphabetically when they are not truly alpha because of words like "The" and "An", using product sort order allows you to control that.

    But with as many products as you'll have, it will be a labor intensive process done manually through the admin. It's a lot of work to set it up initially, but it's the only thing that comes to mind because I don't know of a way to make them sort alphabetically automatically.

    If you find that's your only option, keep in mind that to avoid having to redo the sort order every time you add a new product, you'd want to set the product order as follows:

    ABC's & 123's = sort order 10
    Bears & Beanies = sort order 20
    Cats & Dogs = sort order 30

    This way, if you get a new product in called....Bubble Gum Squad, for example, you could set that sort order to 21 to put it between Bears & Cats and keep it as an alpha sort.

    You may even want to leave as many as 50 increments between numbers to allow room for product expansion.

    Once it's set up, it wouldn't be something you have to repeat again.

    True, it would be a major pain to do it that way, but it's all I can think of. Perhaps there's an easier answer that is known by someone who has more experience with ZC than I do.

    I don't know if there's a Mod for this either, have you looked through the Mods to find out?
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  5. #5
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Re: Alphabetical Listing...without a, an, the ?

    Right...I should not have said it would not work....but it would be a big PIA as you pointed out. My simpler option would be to change those that have "The" at the front to move it to the end with a comma.

    Meanwhile I was looking online generally to see if there was any other information I could find. I did run across an item here which includes some script dealing with a way to do this in some ways...but I really wouldn't know how to apply it to this situation...or where since I don't really know how to write this kind of script.

    Anyway if anyone is looking at this here is the kind of thing they are doing:

    PHP Code:
    bundle « Set return values
    local
    pageTitle 
    html.getPagePref"title"entryAdr )
    ignoreLeadingWords = {"the""an""a"}
    firstWord string.firstWordpageTitle )
    « Entry (pageaddress
    returnTable
    .entryAdr entryAdr
    « Entry name 
    (for sort order)
    if ( 
    ignoreLeadingWords contains string.lowerfirstWord ) )
    returnTable.entryName string.midpageTitlestring.lengthfirstWord ) + 1infinity ) + ", " firstWord
    else
    returnTable.entryName pageTitle
    « Remove any extra spaces that followed the first word
    while ( returnTable.entryName beginsWith " " )
    returnTable.entryName string.deletereturnTable.entryName1)
    « KeywordsInitial character of entry name
    returnTable
    .keywords string.upperstring.midreturnTable.entryName1) )
    return ( 
    returnTable 
    There is more script on the link I provided...but this at least gives an idea of the concept of ignoring certain lead words when filtering product results that might be able to do the trick.

  6. #6
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Re: Alphabetical Listing...without a, an, the ?

    Actually, I now realize that we are probably talking about two different things as my initial post may not have made clear what I was trying to do. There are really two issues here.

    One is the product sort order in terms of what the automatic sort is when one goes to the category. If someone is browsing the items then I would want them to be easily able to browse alphabetcally...without regard for the initial article that appears at the beginning of the product name. So your solution would work for that purpose...though it would be very time consuming as you point out.

    However, even if I got the product sort order to work using your suggestion, when a customer clicks on the filtering box at the top of the page and chooses to look for all products starting with a particular letter, then even if the product sort is correct, the filtered result would not be.

  7. #7

    Default Re: Alphabetical Listing...without a, an, the ?

    hmmm yeah you're right, that is another problem with the "all products".

    If all of your products are in a single category, you could add a sub category of "All" and then link the products to that sub-cat and give them a sort order within that sub-cat...but that would mean going through that PIA process not once, but twice.

    Ugh! Not a good solution!

    There HAS to be a better way. I think you're on to something with the ignore text code you posted. Although that was for page titles, in the right file with the right coding, I assume it would work.

    But it's going to take someone who knows a WHOLE lot more than I do to help you with it.

    Keep searching, lots of good folks here on the boards that can help out.

    If you end up figuring it out and get some code written, you may one day want to consider having someone show you how to package it as a mod (if you don't already know how to do so).

    Lots of folks would be interested in that one I'm sure.

    Good luck!
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  8. #8
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Re: Alphabetical Listing...without a, an, the ?

    I am a complete novice regarding scripts...so doubt that I will be the one coming up with a solution...particularly since this would need to affect two different things...the alpha sort in the products listings as well as the way that the filtered results box works each time you click on a letter.

    Since I need a more immediate solution that will deal with both issues, I will simply move the leading article to the end of the name...that way the sort will work for the products and will alsow result in proper filtered results.

 

 

Similar Threads

  1. Manufacturer Alphabetical Listing
    By Delion in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 25 Aug 2011, 03:19 AM
  2. Alphabetical Listing of Products
    By iddy in forum General Questions
    Replies: 1
    Last Post: 5 Feb 2010, 07:56 PM
  3. Alphabetical Product Listing
    By Ultfanboycomics in forum General Questions
    Replies: 0
    Last Post: 2 Dec 2009, 03:10 AM
  4. alphabetical listing
    By dannyd in forum Basic Configuration
    Replies: 8
    Last Post: 29 Jan 2008, 09:28 PM
  5. Alphabetical Product listing
    By rxalex in forum Basic Configuration
    Replies: 0
    Last Post: 10 Jan 2007, 05:36 AM

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