Categories do not save correctly in group edit mode
In version 2.72, if products are edited through the group edit mode:
Products -> Advanced Item Search -> Edit Mode = Edit Items in Groups (10 Max)
only categories set at the end level will save. If an item has a category in a main category level, it will clear that category.
This has been changed in version 2.81. For now, open the itemlist.php page in the /storeadmin/ area and change the following code (around line 689):
";
echo "";
$getcatquery = "SELECT ID, Category FROM " .SB_DB_PREFIX ."_categories WHERE Parent='0' ORDER BY Category";
$getcatresult = mysql_query($getcatquery, $dblink) or die("Could not select categories");
for ($getcatcount = 1; $getcatrow = mysql_fetch_row($getcatresult); ++$getcatcount)
{
$smallgetcat = substr($getcatrow[1], 0, $sclimit);
// Are there subcategories?
$subcatquery = "SELECT ID, Category FROM " .SB_DB_PREFIX ."_categories WHERE Parent = '$getcatrow[0]' ORDER BY Category";
$subcatresult = mysql_query($subcatquery, $dblink) or die ("Could not show categories. Try again later.");
$subcatnum = mysql_num_rows($subcatresult);
// No there are no subcats so display the parent only
if ($subcatnum == 0)
{
echo "";
}
// Yes there are subcats - go through loop and display them
else
{
while ($subcatrow = mysql_fetch_row($subcatresult))
{
$smallsubcat = substr($subcatrow[1], 0, $sclimit);
// Are there end categories?
$endcatquery = "SELECT ID, Category FROM " .SB_DB_PREFIX ."_categories WHERE Parent = '$subcatrow[0]' ORDER BY Category";
$endcatresult = mysql_query($endcatquery, $dblink) or die ("Could not show categories. Try again later.");
// No there are no endcats so display the parent and subcat only
if (mysql_num_rows($endcatresult) == 0)
{
echo "";
}
else
{
while ($endcatrow = mysql_fetch_row($endcatresult))
{
echo "";
}
}
}
}
}
echo "";
?>
to:
"; echo ""; setcategories(0, 0, $itemrow[6], " ", "- ", "", "catitem", 0, 0, "", "yes", "no", "no"); echo ""; ?>
And save the file. Now, even main or mid level categories should save properly in group edit mode.