Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    995
    Plugin Contributions
    5

    red flag I need to create a set of sub categories for each top level category

    Hi I need to create a set of sub categories for each top level category like this.

    Category 1 - Sub Category 1 - 250, 500, 750, 1250, 2500, 5000, 10000

    Category 1 - Sub Category 1 - 250, 500, 750, 1250, 2500, 5000, 10000

    Category 1 - Sub Category 1 - 250, 500, 750, 1250, 2500, 5000, 10000

    Category 1 - Sub Category 1 - 250, 500, 750, 1250, 2500, 5000, 10000

    Category 1 - Sub Category 2 - 250, 500, 750, 1250, 2500, 5000, 10000

    Category 1 - Sub Category 2 - 250, 500, 750, 1250, 2500, 5000, 10000

    Category 1 - Sub Category 2 - 250, 500, 750, 1250, 2500, 5000, 10000

    Category 1 - Sub Category 2 - 250, 500, 750, 1250, 2500, 5000, 10000

    etc

    I have quite alot of categories so ideally I would like to create these sub categories easily inside the database to save me alot of time.

    Also I have products inside Sub Category 1 and Sub Category 2. 250, 500, 750, 1250, 2500, 5000, 10000 are category names that refer to the quantities of the products previously in Sub Category 1 and Sub Category 2.

    So I need to move products from Sub Category 1 and Sub Category 2 inside the quantity categories as I realise you cannot have categories and products together inside the same category.

    So I need to move products from Sub Category 1 inside the 250 category and duplicate those products across all quantity categories.

    After that I need to update each individual products quantity.

    So ideally I need a way to do this inside the database quickly and easily.

    Also I would like to know if there's a way that I could easily add the quantity to my product name across all products. Each product already has a name so I just need to add the quantity inside the names. The above is more important though for now.


    Thanks

    Nick
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #2
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    10,285
    Plugin Contributions
    3

    Default Re: I need to create a set of sub categories for each top level category

    To do this with a SQL query will not be easy. The "parent ID <-> Category ID" relationship is a complex one in zencart. (A "child" category (sub-category) becomes a "parent" category as well, when a sub-sub-category is added to it.)

    Writing this to the two tables involved is not going to be easy - and moreso in your case where the sub-cats are identically named in a lot of instances.

    It can be done... but will take some very detailed planning.
    We host with Terranetwork.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 19 May 2015, 10:38 AM
  2. Display sub categories in top level category
    By Nick1973 in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 19 Dec 2011, 10:06 PM
  3. Show Top level Categories and 1st sub level categories in side box
    By airtime in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 3 Mar 2011, 06:03 PM
  4. Display Products and Sub-Categories in Top Level Category Page
    By numinix in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 27 Oct 2008, 04:04 AM
  5. Top level category - display products + sub categories
    By anduril3019 in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 28 Mar 2007, 12:19 AM

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