Guest Posted June 27, 2007 Share Posted June 27, 2007 Hello, I know you can assign multiple categories to a product, is it possible to assign multiple parents to a sub category? I have thousands of products im importing and some sub categories have the same parent. Just wondering the best way to achieve this other then importing it twice. Thanks! example: Parent1 sub1 sub2 Parent2 sub2 Parent3 sub1 sub2 parent4 sub2 (sub2 gets assigned to all 4 parents) -Tony Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 27, 2007 Share Posted June 27, 2007 Is it possible to assign multiple parents to a sub category? Some sub categories have the same parent. Do you actually mean to say that some subs have multiple parents in your source data? The table column _category.cat_father_id is an integer value (0 = top-level category). To have multiple parents, you would need to change the datatype of this column to... well, I'm not an expert on MySQL, so I don't know if there's a column datatype of array, or if it needs to be text. Then, there's line 52 in viewCat.inc.php that has a SELECT statement that's looking for a single value, not an array or comma separated list. On the category page that lists all products in that category, at the top, there's a "breadcrumb" feature. This is built by code in the functions.inc.php file, getCatDir(). I haven't figured out that function but I'm sure that having multiple parents is going to break this. I suppose you could comment out line 235 in viewCat.inc.php to inhibit this function. You might also need to do something about line 19 in viewCat.tpl. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.