LeeFoster 219 Posted April 2, 2019 I have this installed and am getting the below error. Quote Warning: Invalid argument supplied for foreach() in admin\administrator_groups.php on line 156 Share this post Link to post Share on other sites
LeeFoster 219 Posted April 3, 2019 @codoffer Any thoughts on this? It appears to not be bringing the list of boxes through using - $cl_box_groups Share this post Link to post Share on other sites
codoffer 1 Posted April 3, 2019 I am not maintaing this plugin with latest version of osc. I will have to check the code again. Can you put your osc version and photo version here? Share this post Link to post Share on other sites
ArtcoInc 379 Posted April 3, 2019 @LeeFoster By chance, are you running PHP v7.x ? M Share this post Link to post Share on other sites
LeeFoster 219 Posted April 3, 2019 3 hours ago, ArtcoInc said: @LeeFoster By chance, are you running PHP v7.x ? M Yeah, 7.2.5 Share this post Link to post Share on other sites
LeeFoster 219 Posted April 3, 2019 3 hours ago, codoffer said: I am not maintaing this plugin with latest version of osc. I will have to check the code again. Can you put your osc version and photo version here? osc version is burts bs4 and php is 7.2.5 Share this post Link to post Share on other sites
ArtcoInc 379 Posted April 3, 2019 @LeeFoster That is a PHP Warning, not an Error. As I've said before, newer versions of PHP are becoming more strict. You could just ignore the warning, but it would be better to update the code to the current PHP structure. Do a search here in the forum for foreach(). It's been discussed before. M Share this post Link to post Share on other sites
Omar_one 154 Posted April 3, 2019 (edited) @LeeFoster I have Easy admin group osc 2.3 working under php7.2 without any error Edited April 3, 2019 by Omar_one Get the latest Responsive osCommerce CE (community edition) here . Share this post Link to post Share on other sites
LeeFoster 219 Posted April 3, 2019 24 minutes ago, ArtcoInc said: @LeeFoster That is a PHP Warning, not an Error. As I've said before, newer versions of PHP are becoming more strict. You could just ignore the warning, but it would be better to update the code to the current PHP structure. Do a search here in the forum for foreach(). It's been discussed before. M No it's an error because it's also not showing the list of boxes that it should. Share this post Link to post Share on other sites
LeeFoster 219 Posted April 3, 2019 5 minutes ago, Omar_one said: @LeeFoster I have Easy admin group osc 2.3 and I have php7.2 without any error Can you send me a screen shot of your admin groups page when you are editing or adding a new group? Share this post Link to post Share on other sites
Omar_one 154 Posted April 3, 2019 (edited) @LeeFoster screenshot sent Edited April 3, 2019 by Omar_one Get the latest Responsive osCommerce CE (community edition) here . Share this post Link to post Share on other sites
LeeFoster 219 Posted April 3, 2019 1 minute ago, Omar_one said: @LeeFoster screenshot sent Yeah I'm not getting the list of boxes down the right. Share this post Link to post Share on other sites
Omar_one 154 Posted April 3, 2019 @LeeFoster can you try to change this line foreach ($cl_box_groups as $groups) { to foreach ((array)$cl_box_groups as $groups) { Get the latest Responsive osCommerce CE (community edition) here . Share this post Link to post Share on other sites
LeeFoster 219 Posted April 3, 2019 9 minutes ago, Omar_one said: @LeeFoster can you try to change this line foreach ($cl_box_groups as $groups) { to foreach ((array)$cl_box_groups as $groups) { This got rid of the warning but I am still not seeing the list of boxes. Share this post Link to post Share on other sites
Omar_one 154 Posted April 3, 2019 22 minutes ago, LeeFoster said: Yeah I'm not getting the list of boxes down the right. did you replaced (admin/includes/column_left.php) <?php foreach ($cl_box_groups as $groups) { echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } ?> with this one <?php foreach ($cl_box_groups as $groups) { if(display_block_to_admin_group($groups['heading'])){ echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { if(check_admin_group($app['code']))echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } } ?> Get the latest Responsive osCommerce CE (community edition) here . Share this post Link to post Share on other sites
LeeFoster 219 Posted April 3, 2019 2 minutes ago, Omar_one said: did you replaced (admin/includes/column_left.php) <?php foreach ($cl_box_groups as $groups) { echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } ?> with this one <?php foreach ($cl_box_groups as $groups) { if(display_block_to_admin_group($groups['heading'])){ echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { if(check_admin_group($app['code']))echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } } ?> Yeah I did. If I add this from the top of the column_left.php file into the administrators_group.php file I get the list on the right but the left column doesn't show. if (tep_session_is_registered('admin')) { $cl_box_groups = array(); if ($dir = @dir(DIR_FS_ADMIN . 'includes/boxes')) { $files = array(); while ($file = $dir->read()) { if (!is_dir($dir->path . '/' . $file)) { if (substr($file, strrpos($file, '.')) == '.php') { $files[] = $file; } } } $dir->close(); natcasesort($files); foreach ( $files as $file ) { if ( file_exists(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/boxes/' . $file) ) { include(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/boxes/' . $file); } include($dir->path . '/' . $file); } } function tep_sort_admin_boxes($a, $b) { return strcasecmp($a['heading'], $b['heading']); } usort($cl_box_groups, 'tep_sort_admin_boxes'); function tep_sort_admin_boxes_links($a, $b) { return strcasecmp($a['title'], $b['title']); } foreach ( $cl_box_groups as &$group ) { usort($group['apps'], 'tep_sort_admin_boxes_links'); } Share this post Link to post Share on other sites
LeeFoster 219 Posted April 4, 2019 I suspect this is an issue with the bs4 admin I am using, not anything else as I did a fresh install without it and it works. Share this post Link to post Share on other sites
moldbody 0 Posted June 11, 2019 (edited) @LeeFoster I got exactly the same problem like yours, my version is os v2.3.4.1. Even i reinstall it, the same problem happen (left column disappear) when i replace the codes in column_left.php Edited June 11, 2019 by moldbody Share this post Link to post Share on other sites
LeeFoster 219 Posted June 11, 2019 1 hour ago, moldbody said: @LeeFoster I got exactly the same problem like yours, my version is os v2.3.4.1. Even i reinstall it, the same problem happen (left column disappear) when i replace the codes in column_left.php I managed to fix it but can't remember how right now. Share this post Link to post Share on other sites
Fredi 104 Posted February 7, 2020 Has anyone tried this add-on for Phoenix? I changed this for Phoenix, but the problem with the display of boxing remained. Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Share this post Link to post Share on other sites
LeeFoster 219 Posted February 7, 2020 6 minutes ago, Fredi said: Has anyone tried this add-on for Phoenix? I changed this for Phoenix, but the problem with the display of boxing remained. Do you mean the error I was having? Share this post Link to post Share on other sites
Fredi 104 Posted February 7, 2020 There is no boxing for choosing admin groups the right Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Share this post Link to post Share on other sites
LeeFoster 219 Posted February 7, 2020 Just now, Fredi said: There is no boxing for choosing admin groups the right Can you send a screen shot? And if you send me the updated file I'll have a look. Share this post Link to post Share on other sites
Fredi 104 Posted February 7, 2020 Sorry, Screen in Russian ... I have not made language files in English yet. Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Share this post Link to post Share on other sites