Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2009
    Posts
    15
    Plugin Contributions
    0

    help question Product Category Based Upon Product Types

    Hello,

    Not sure if this has been answered elsewhere but I couldn't find it.

    Lets say you had a store that sold music and you had organised your categories on the left by band. So each band has its own category with different albums in each category. Then the decision was made to sell t-shirts for various bands but you wanted to keep both entities separate.

    Question: Could you have a category sidebox for music and another for t-shirts if you have created the different product types and differentiated the category in the admin area by product type?

    This is probably a really simple one but I'm struggling to find a solution.

    Thanks

  2. #2
    Join Date
    Aug 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: Product Category Based Upon Product Types

    I find it hard to believe that there is no way of doing this. Any help would be greatly appreciated.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Product Category Based Upon Product Types

    Yes, you could do that. The documents_category sidebox is an example of limiting its content based on product type. You could use that as inspiration for your custom coding.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Product Category Based Upon Product Types

    Well, the Zencart default demo products include three different product types (Product - General, Document - General and Music General), and each has its own 'categories' sidebox, so I guess it would be possible using those, with the tshirts under Products - General and the music under Music - General.

    The bad news is that, so far as I know, you can't change the product type once the product is created, so you would need to re-enter all your music, or leave the music as Product - General and rename Documents - General for the tshirts.

  5. #5
    Join Date
    Aug 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: Product Category Based Upon Product Types

    Thanks so much for taking the time to reply. I will definitely read up on those avenues and hopefully get this sorted!

    Thanks GUYS!!!

  6. #6
    Join Date
    Aug 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: Product Category Based Upon Product Types

    Right I have noticed an issue with the way Product Types are handled. Thought I'd post here just in case any body have the same issue.

    I tried to get another sidebox working based upon what DrByte said above.

    When I enabled the sidebox and changed the id for my new product type I got a Non-Object error from the category_tree class. This was actually relating to the database object within the class. It appears to have been being caused due to an error in SQL query on Line 25

    PHP Code:
    $sql "select type_master_type from " TABLE_PRODUCT_TYPES " where type_master_type = " $product_type ""
    Changing the SQL query to this resolves the issue:

    PHP Code:
    $sql "select type_id from " TABLE_PRODUCT_TYPES " where type_master_type = " $product_type ""
    Oh and also change the following:

    PHP Code:
    $master_type $master_type_result->fields['type_master_type']; 
    For:

    PHP Code:
    $master_type $master_type_result->fields['type_id']; 
    This appears to have resolved the issue for me!

 

 

Similar Threads

  1. Shipping based upon Category
    By Stumpy74 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 20 Jan 2010, 05:52 PM
  2. SwapChange Product Photo based upon Attribute
    By HelenSama in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 2 Dec 2008, 08:06 PM
  3. Product Cost Based Upon Zip Code
    By themainlobby in forum General Questions
    Replies: 5
    Last Post: 21 Sep 2008, 01:00 AM
  4. How to apply different discounts based upon the product's attributes?
    By yldziner in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 9 Aug 2008, 11:02 PM
  5. more product types based on general layout
    By longstockings in forum General Questions
    Replies: 1
    Last Post: 3 May 2008, 10:26 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