LeeFoster Posted February 8, 2020 Share Posted February 8, 2020 8 minutes ago, hungryfrank said: spoke too soon.it works better. now I get multiple checkboxes but they are all configuration It is progress though. Quote Link to comment Share on other sites More sharing options...
hungryfrank Posted February 8, 2020 Share Posted February 8, 2020 It seems that I probably changed everything back. I have to look at exactly what I did but now at least it displays correctly. Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted February 8, 2020 Share Posted February 8, 2020 (edited) it seems to work. I haven't tested functionality but seems to work. just include column_left.php directly. if you guys want to test it Edited February 8, 2020 by hungryfrank Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
LeeFoster Posted February 8, 2020 Share Posted February 8, 2020 15 minutes ago, hungryfrank said: it seems to work. I haven't tested functionality but seems to work. just include column_left.php directly. if you guys want to test it Yeah that works, but @burt must have changed it to a hook call for a reason, so how do we get it working with the hook? Quote Link to comment Share on other sites More sharing options...
hungryfrank Posted February 8, 2020 Share Posted February 8, 2020 1 hour ago, Fredi said: I do not understand why column_left is called. Column_left works differently. This is probably an outdated way. A lot has changed in the Phoenix core, so this function probably needs to be adjusted. I don’t know how to do this. This has something to do with calling categories / files for visualization. Maybe you need an analogy with a call to security_checks.php or similar? the code is not changed a lot. it is just moved around. and filename and table defenitions are gone. for good or bad I don't judge Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted February 8, 2020 Share Posted February 8, 2020 (edited) 6 minutes ago, LeeFoster said: Yeah that works, but @burt must have changed it to a hook call for a reason, so how do we get it working with the hook? he is probably trying to moduleize it at some point. if you want to keep it like that you might be able to just include some parts of it. and then use the hook also. as it is the output of the hook is the only thing that it is returned. but here we need the value of array Edited February 8, 2020 by hungryfrank Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
LeeFoster Posted February 8, 2020 Share Posted February 8, 2020 27 minutes ago, hungryfrank said: he is probably trying to moduleize it at some point. if you want to keep it like that you might be able to just include some parts of it. and then use the hook also. I'd rather not make changes to the core code as they'll need to be done every time a release overwrites one of those files. Quote Link to comment Share on other sites More sharing options...
hungryfrank Posted February 8, 2020 Share Posted February 8, 2020 (edited) maybe someone. can. come up with a better solution. splitting the column-left might be a solution. Edited February 8, 2020 by hungryfrank Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted February 8, 2020 Share Posted February 8, 2020 3 hours ago, LeeFoster said: I'd rather not make changes to the core code as they'll need to be done every time a release overwrites one of those files. you can do that - PayPal app <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ if (tep_session_is_registered('admin')) { $cl_box_groups = array(); $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); } } usort($cl_box_groups, 'tep_sort_admin_boxes'); foreach ( $cl_box_groups as &$group ) { usort($group['apps'], 'tep_sort_admin_boxes_links'); } } ?> and include this file in the top of the administrator_group.php this will give you an error about PayPal. you have to take the paypal box out or another code change in PayPal.php which is very easy and harmless include(DIR_FS_CATALOG . 'includes/apps/paypal/admin/functions/boxes.php'); to include_once(DIR_FS_CATALOG . 'includes/apps/paypal/admin/functions/boxes.php'); then it works Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted February 8, 2020 Share Posted February 8, 2020 or maybe you can add a code that solves the paypaln problem Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted February 8, 2020 Share Posted February 8, 2020 (edited) inn code above change $files[] = $file; to if (strpos($file, 'paypal') === false) $files[] = $file; this will give u everything except PayPal in admin groups control but no core change Edited February 8, 2020 by hungryfrank Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
LeeFoster Posted February 8, 2020 Share Posted February 8, 2020 1 hour ago, hungryfrank said: inn code above change $files[] = $file; to if (strpos($file, 'paypal') === false) $files[] = $file; this will give u everything except PayPal in admin groups control but no core change I'll test this tomorrow. Thanks Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted February 9, 2020 Share Posted February 9, 2020 @hungryfrank Those both worked. No it's time to make it into a no core code add-on with the rest of the changes. Quote Link to comment Share on other sites More sharing options...
hungryfrank Posted February 9, 2020 Share Posted February 9, 2020 by all means go-ahead and make the add-on. you can ask Burt to make. a change to the core which dose not effect anything. include(DIR_FS_CATALOG . 'includes/apps/paypal/admin/functions/boxes.php'); to include_once(DIR_FS_CATALOG . 'includes/apps/paypal/admin/functions/boxes.php'); in PayPal.php and everything would work flawlessly. or he might have a better idea. Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
Fredi Posted February 17, 2020 Share Posted February 17, 2020 Good morning everybody! Did you manage to solve this or did it stop? Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
hungryfrank Posted February 17, 2020 Share Posted February 17, 2020 yes. one way with simple code change, and one that works with all boxes except the PayPal without 14 minutes ago, Fredi said: Good morning everybody! Did you manage to solve this or did it stop? Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
Fredi Posted February 17, 2020 Share Posted February 17, 2020 On 2/9/2020 at 3:09 PM, hungryfrank said: include(DIR_FS_CATALOG . 'includes/apps/paypal/admin/functions/boxes.php'); to include_once(DIR_FS_CATALOG . 'includes/apps/paypal/admin/functions/boxes.php'); Thise Code? Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
hungryfrank Posted February 17, 2020 Share Posted February 17, 2020 On 2/8/2020 at 10:42 PM, hungryfrank said: you can do that - PayPal app <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ if (tep_session_is_registered('admin')) { $cl_box_groups = array(); $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); } } usort($cl_box_groups, 'tep_sort_admin_boxes'); foreach ( $cl_box_groups as &$group ) { usort($group['apps'], 'tep_sort_admin_boxes_links'); } } ?> and include this file in the top of the administrator_group.php this will give you an error about PayPal. you have to take the paypal box out or another code change in PayPal.php which is very easy and harmless include(DIR_FS_CATALOG . 'includes/apps/paypal/admin/functions/boxes.php'); to include_once(DIR_FS_CATALOG . 'includes/apps/paypal/admin/functions/boxes.php'); then it works this is what you have to do and considering that you have to make core changes any way is the best option. Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
Fredi Posted February 17, 2020 Share Posted February 17, 2020 Thank You Frank! Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
Fredi Posted May 7, 2020 Share Posted May 7, 2020 In version 1.0.6.0 this does not work. Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
hungryfrank Posted May 11, 2020 Share Posted May 11, 2020 On 5/7/2020 at 9:06 PM, Fredi said: In version 1.0.6.0 this does not work. what dosen't work? what have u done? I am working on the same thing, maybe we can figure it out Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted May 11, 2020 Share Posted May 11, 2020 almost working. I got everything working with the exception of the heading of each group. I can't get the headings to hide Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted May 11, 2020 Share Posted May 11, 2020 function display_block_to_admin_group($administrator_group_block){ global $admin; $display_block_to_admin_group = false; $administrator_group_id = (int)$admin['user_group_id']; if($administrator_group_id <= 0){ $display_block_to_admin_group = true; } if($administrator_group_block != '' && $administrator_group_id > 0){ $check_file_access = tep_db_query("select ag.administrator_group_id from " . TABLE_ADMINISTRATOR_GROUPS . " ag, " . TABLE_ADMINISTRATOR_GROUP_ACCESS . " aga where aga.administrator_group_id = ag.administrator_group_id and ag.administrator_group_id = '" . (int)$administrator_group_id . "' and aga.administrator_group_block = '" . $administrator_group_block . "'"); if(tep_db_num_rows($check_file_access))$display_block_to_admin_group = true; } return $display_block_to_admin_group; } this is not working. Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted May 11, 2020 Share Posted May 11, 2020 (edited) I have tried to investigate. i have an older style box insalled and that one works. for the old box I have the value of administrator_group_block set as <i class="fa fa-gavel" aria-hidden="true"></i> Ebay and for the new boxes i have <i title="Catalog" data-toggle="tooltip" data-placement="right" class="fas fa-cart-plus fa-fw mr-1"> and in the hMenue.php I have foreach ( $cl_box_groups as &$group ) { usort($group['apps'], 'tep_sort_h_boxes_links'); } $n = 1; $mr = null; foreach ($cl_box_groups as $groups) { $mr .= '<li class="nav-item dropdown">'; if(display_block_to_admin_group($groups['heading'])) $mr .= '<a class="nav-link dropdown-toggle" href="#" id="navbar_' . $n . '" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">' . $groups['heading'] . '</a>'; $al = ($n > 6) ? ' dropdown-menu-right' : ''; $mr .= '<div class="dropdown-menu' . $al . '" aria-labelledby="navbar_' . $n . '">'; foreach ($groups['apps'] as $app) { if(check_admin_group($app['code'])) $mr .= '<a class="dropdown-item" href="' . $app['link'] . '">' . $app['title'] . '</a>'; } $mr .= '</div>'; $mr .= '</li>' . PHP_EOL; $n++; } I guess I need to change the sql below, but can't figure it out $check_file_access = tep_db_query("select ag.administrator_group_id from " . TABLE_ADMINISTRATOR_GROUPS . " ag, " . TABLE_ADMINISTRATOR_GROUP_ACCESS . " aga where aga.administrator_group_id = ag.administrator_group_id and ag.administrator_group_id = '" . (int)$administrator_group_id . "' and aga.administrator_group_block = '" . $administrator_group_block . "'"); if(tep_db_num_rows($check_file_access))$display_block_to_admin_group = true; Edited May 11, 2020 by hungryfrank Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted May 12, 2020 Share Posted May 12, 2020 ok I got it working. I had to change the database because the title its now more than 100 character. I don't think it can be done without core changes. I am thinking about it. unfortunately the nav bar is a hook and can not be turned off so it must be edited. Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout login pop up modal 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.