Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Copy product to multiple categories


Recommended Posts



im sure that i have seen something on this before.

but i cant find it when i need it.


im trying to copy a product to more then one category at a time,

but i cant seem to figure out how to change the dropdown menu to a checkbox list

i tried replacing "tep_draw_pull_down_menu" in the following code to "tep_draw_checkbox_field" but i only got one check box. i think that im barking up the wrong tree.


$contents[] = array('text' => '<br>' . TEXT_CATEGORIES . '<br>' . tep_draw_pull_down_menu('categories_id', tep_get_category_tree(), $current_category_id));


any guidance would be greatly appriciated. :)



K Groner

Link to comment
Share on other sites

$contents[] = array('text' => '<br>' . TEXT_CATEGORIES . '<br>');
$category_tree = tep_get_category_tree();
for ($i = 0, $n = sizeof($category_tree); $i < $n; $i++) {
 $contents[] = array('text' => tep_draw_checkbox_field('categories_list[]', $category_tree[$i]['id'], ($category_tree[$i]['id'] == $current_category_id)) . ' ' . $category_tree[$i]['text'] . '<br>');

should at least draw multiple check boxes. You will still have to change the catching code. The original version is only designed to catch one value. You will have to modify it to scan an array of values and process them.





P.S. Please read the Forum Rules. Bumping is not allowed.

Always back up before making changes.

Link to comment
Share on other sites



Thanx Tonz!!


i got the multiple check boxes, but as you said it is only setup to catch one value.

how would i modify it to catch multiple values?

K Groner

Link to comment
Share on other sites

I have a similar issue, i was able to add the check boxes but i couldnt figure out how to change to make it catch multiple values.


any help would be greatly appriciated

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...