Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2007
    Posts
    19
    Plugin Contributions
    0

    Default Looking up part category code

    I am working on a store into which we've imported almost 20,000 products.

    We also imported an industry standard category list (BOSSF)

    This is set out in a hierarchial way in the following fashion

    • Widgets (code 11)
      Specific widget type 1 (code 111)
      Even more specific type 1 (code 1111)
      Even more specific type 2 (code 1112)
    Specific widget type 2 (code 112)
    Even more specific type 1 (code 1121)
    • Bobbles (code 12)
      Specific bobble type 1 (code 121)
    And so on and so forth....

    Now a product might be linked to a category 4 layers deep, and if I wanted to look at a product which is linked to code 1121 then I have to click through many categories.

    What I'd like to do is that when I look at the category widgets, I'd like to see all the products in all levels below it (i.e with category codes starting 11xx).

    In SQL I know this would be done along the lines of WHERE code LIKE '11%' but I usually work in Perl and can't get my head around how to do this from a practical point of view in zen-cart.

    I like having the links on the top which narrow down the choices, but I don't want them to restrict the products that are displayed entirely.

    Any help grately appreciated

    Thanks

    Richard

  2. #2
    Join Date
    Jul 2006
    Location
    Johannesburg
    Posts
    447
    Plugin Contributions
    1

    Default Re: Looking up part category code

    Look at my site. (link in sig below.) Is this what you are looking for?

    If so, just create another high level category in each category and link all sub-cat products to this. You now have a "list all products" faciity whilst maintainig the shop by cat/sub-cat as well.

  3. #3
    Join Date
    Feb 2007
    Posts
    19
    Plugin Contributions
    0

    Default Re: Looking up part category code

    Thanks for the reply, but I don't think that's quite what I'm after.

    I think I was far too complicated in my first post!

    I basically want to have it so that if I click to view a category, I want to not only have it's subcategories listed but the products contained within these subcategories as if they were in the master category.

    I'm going to edit my original post to be a little more specific, ah can't do that.

    Well lets say I had a category called 'Paper' and then paper had 2 sub categories, White and Coloured and each of these had the option of A4, A3, A2 and A1. If someone wants some normal A4 white paper they first have to click on 'Paper' than 'White' than 'A4'.

    In this case you could say that if the code for 'Paper' was 01, the code for white paper might be 0101 and white A3 010102. So doing an SQL search for code '01%' would return all the subcategories of paper (which will all start 01)

    I'd like to have it that when they click on 'Paper' as well as listing the sub categories to help narrow it down it also lists all the products as if they were directly in paper rather then in the sub categories.

    Now as
    Last edited by rpguk; 20 Mar 2007 at 05:09 PM.

  4. #4
    Join Date
    Jul 2006
    Location
    Johannesburg
    Posts
    447
    Plugin Contributions
    1

    Default Re: Looking up part category code

    The site log shows me that from the pages you visited on the site I do not think you saw what I intended. Have a look at http://shop.technopro.co.za/index.ph...=index&cPath=7

    As far as I could see in my research this is the only way you can do what you want to do.

    You cannot have products AND sub-categories under a category entry. ONLY products OR sub-categories. The way ZENCART was designed.

  5. #5
    Join Date
    Feb 2007
    Posts
    19
    Plugin Contributions
    0

    Default Re: Looking up part category code

    Bugger

    Well I'm using ultimate SEO so might just write my own code for browsing through categories and use htaccess to direct any category listing to my code.

    The only problem is I'm a perl programmer so won't be able to write anything of use to the community.

    Many thanks for your help Louis though and impressive detective skills too

 

 

Similar Threads

  1. Use sidebox search code in other part of website
    By DigitalShadow in forum Basic Configuration
    Replies: 2
    Last Post: 23 Nov 2009, 09:41 AM
  2. Custom code for a complete kit consisting of other part #'s
    By edwardtilbury in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Nov 2008, 03:19 AM
  3. Hiding part of code
    By gibbyky2 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 Aug 2008, 08:26 AM
  4. Help with code for bottom part of product info page please!
    By Decostyle in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 May 2008, 07:17 PM
  5. Which part of the code need to change for PRICE $xxx fonts size
    By oavs in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 13 Nov 2007, 08:34 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