Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Error can not add product wrong product type

    You should only have product_type_to_category records for categories that have restrictions on them.

    So ... fastest way to fix ....
    1. truncate the product_type_to_category table
    ..... actually, check the table structure in your database vs the original in the mysql_zencart.sql file in the zc_install folder. Perhaps even drop and recreate it.

    2. Now go and rebuild all your product-type restrictions on each of your categories.

    3. Be sure to do good backups.

    4. Go back and look at all your code-customizations to find out if anything you've changed could affect that table in any way.
    .

    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.

  2. #12
    Join Date
    Mar 2005
    Posts
    372
    Plugin Contributions
    0

    Default Re: Error can not add product wrong product type

    Quote Originally Posted by DrByte View Post
    You should only have product_type_to_category records for categories that have restrictions on them.

    So ... fastest way to fix ....
    1. truncate the product_type_to_category table
    ..... actually, check the table structure in your database vs the original in the mysql_zencart.sql file in the zc_install folder. Perhaps even drop and recreate it.

    2. Now go and rebuild all your product-type restrictions on each of your categories.

    3. Be sure to do good backups.

    4. Go back and look at all your code-customizations to find out if anything you've changed could affect that table in any way.
    Lost my DSL last night so am just getting back to this today.

    Where do I rebuild the product-type restrictions? Are you saying if the product uses the default template when there is no category in the table for them???

    If the category document product has a special template then the two categories I have using that template SHOULD be in the product_type to categories table??? and all others not???

    Thanks for the help.

    C

  3. #13
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Error can not add product wrong product type

    I think there needs to be some clarification on functionality.


    Category "restrictions" ONLY restrict which product-types you can use to CREATE NEW products within said category.


    Whatever product type you use to create a product ... is what will be used to display that product. It has NOTHING to do with the restrictions in the admin related to a given category.

    Categories can contain products of any product type. But the restrictions affect creation of NEW products.
    .

    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. #14
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Error can not add product wrong product type

    This is how you set up restrictions related to creating new products in a given category:

    Quote Originally Posted by DrByte View Post
    2. Admin->Catalog->Categories/Products ... edit the category you're getting the error with. t bottom of category edit details you see the product types which this category has been restricted to create?
    .

    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.

  5. #15
    Join Date
    Mar 2005
    Posts
    372
    Plugin Contributions
    0

    Default Re: Error can not add product wrong product type

    Success --- dumped the table and put the new data in and voila things are working again.

    Thanks for the help.

    C

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Add a new product type in 1.5, or not...
    By jeffiec in forum Code Collaboration
    Replies: 9
    Last Post: 20 Feb 2013, 04:14 AM
  2. Replies: 4
    Last Post: 8 Oct 2012, 04:07 PM
  3. How can I add Bilingual additional Product-Type fields for our books?
    By kamy in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 1 May 2010, 03:26 PM
  4. Auction Product Type: Can't add a product of the type.
    By sw0rdz in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Sep 2009, 02:11 AM
  5. If you turn off add to cart in product type price does not show
    By fweb in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 3 Jul 2006, 01:07 PM

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