Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Display sub categories in top level category

    I need a way to display all sub category products in a top level category. So how would I do this?

    The reason for this is because of a postage problem and basically products have to be broken down into First Class Post and Track and Trace Post. The cart has been set up so that people ordering track and trace only get the option to select track and trace at the cart. People ordering first class get both postage options. This relies on the categories being broken in two, however I don't want the customer to know about the First Class and Track and Trace sub categories which is why I need all sub category products listed in the top level category.

    This is how the category tree is built

    Chemicals
    - First Class
    - Track and Trace

    So basically I need all products which are inside the 'First Class' and 'Track and Trace' categories to be listed in the Chemicals category on the site, but in the admin listed in 'First Class' and 'Track and Trace'.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display sub categories in top level category

    Before you address the first question, there may be better ways to solve your underlying issue.

    How are you going to decide which customers get to see which set of options before adding to cart? Are certain products track & trace only? Are certain customers limited to what method they can use?

  3. #3
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Re: Display sub categories in top level category

    certain products are track and trace only and when a customer adds a product to the cart they only see that option. Other products give the customer the option of First Class and Track and trace.

    I know I could manually code shipping options so track and trace shows as the only option but because this cart is not for me it has to be coded according to which category a customer selects a product from.

    However when on the site a customer must not see the categories First Class and Track and Trace.

    They must only see the top level category with no sub categories beneath. And all products listed in sub categories must show on the site in a top level category.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display sub categories in top level category

    If your client can place new products in the correct "track & trace" subcategory, surely they could select a switch somewhere in admin (maybe on the product editing page) which would set a "track" flag for the product. If you are coding for which shipping option to present anyway, distinguishing on a product field level shouldn't be so different from using a product's category, and the client won't see any of that logic anyway. What happens if there are both kinds of products in the cart? Does the whole shipment have to be tracked, or can it be broken into two shipments (presumably saving money in shipping)?

    I think making the required custom back-end coding do the whole job is better than also requiring custom front-end coding.

  5. #5
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Re: Display sub categories in top level category

    I've looked at backend coding and creating some kind of switch to select whichever postage method a product will go at but wouldn't know where to start on the backend to do that.

    If the cart contains a first class item and a track and trace item then the whole shipment goes track and trace.

    What your saying about creating a switch to select the correct postage would get around my problem so if you can shed some light on what I would need to do then I would be really greatful.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display sub categories in top level category

    There is a mod in Free Addons for "product extra fields" which will let you add a new field to the product editing page. Then there are various wiki articles, possibly tutorials and certainly forum threads about modifying cart or checkout actions based on a product (or a product with a certain field value) being in the cart.

  7. #7
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Re: Display sub categories in top level category

    ok, well I know about the product extra fields mod but not sure if it will do the job. will have a look though.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display sub categories in top level category

    It will definitely add a field to the db and the possibility to enter something in the admin product page. What you do with that is the subject of the articles/threads/etc. A db field can be tested for and retrieved with the right SQL statement.

  9. #9
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Re: Display sub categories in top level category

    ok well I've just had a look and it adds extra fields but they are text boxes and I would need to have a dropdown, radio buttons or tickboxes and then they would have to select the correct postage table (I'm using two table rates for first class and track and trace).
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display sub categories in top level category

    The essential function of the field would be to distinguish between tracked products and general products. Without modifying the field code, you could set it up so that any entry in that field is interpreted as "track me" and null as "general".

    The support thread for that mod may have some discussion of changing the field type.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 1 Jul 2015, 06:51 PM
  2. I need to create a set of sub categories for each top level category
    By Nick1973 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 22 Feb 2013, 06:04 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