AdmiralRedBeard Posted November 21, 2014 Share Posted November 21, 2014 Hi, I added the Dynamic Template System on my oscommerce 2.3.4 shop. In the admin portal the module boxes do not include the option to select what pages to display on. There is one update that I do not know where to place the code. The code is from the 2.2 update addon by Gyakutsuki.Can someone help me with this install? Quote Link to comment Share on other sites More sharing options...
AdmiralRedBeard Posted November 21, 2014 Author Share Posted November 21, 2014 Here is a correction to my earlier posting: Some module boxes have the page selection capability and some do not. The ones that I have active do not have the functionality. However they do display correctly on each page just as they did prior to the install. Still do not know where to apply the code change for V2.2. Any help would be greatly appreciated. Thank You. Quote Link to comment Share on other sites More sharing options...
♥Gyakutsuki Posted November 22, 2014 Share Posted November 22, 2014 This is script pb, try this. // Alias function for module [boxes] configuration value // template system function tep_cfg_select_pages($key_value, $key = '') { $name = ((tep_not_null($key)) ? 'configuration[' . $key . '][]' : 'configuration_value'); $select_array = tep_list_catalog_files(); sort($select_array); $selected_array = explode(';', $key_value); if($key_value === 'all') { $checkall = "CHECKED"; } else { $checkall = "UNCHECKED"; } $string = '<fieldset>'; $string .= '<input type="radio" class="AllPages" name="' . $name . '" value="all" ' . $checkall . ' />' . ALL_PAGES . '<br />'; $string .= '<p><strong> ' . ONE_BY_ONE . '</strong><br />'; $string .= '<input type="checkbox" id="CheckAll" class="CheckAll" name="CheckAll" /><label id="CheckAllLabel" for="CheckAll">' . CHECK_ALL . '</label></p>'; for ($i=0, $n=sizeof($select_array); $i<$n; $i++) { $string .= ' <input type="checkbox" id="file_' . $i . '" class="ThisPage" name="' . $name . '" value="' . $select_array[$i] . ';"'; if ( isset($selected_array) ) { foreach($selected_array as $value) { if ($select_array[$i] == $value) $string .= ' CHECKED'; } } $string .= '><label class="ThisPage" for="file_' . $i . '">' . $select_array[$i] . '</label><br />'; } $string .= '</fieldset>'; $string .= "<script type=\"text/javascript\"> jQuery(document).ready(function () { $('.AllPages').click( function() { $('.ThisPage').prop('checked', false); $('.CheckAll').prop('checked', false); $('#CheckAllLabel').text('" . CHECK_ALL . "'); } ); $('.CheckAll').click( function () { $(this).parents('fieldset:eq(0)').find(':checkbox').prop('checked', this.checked); $('.AllPages').prop('checked', (!this.checked)); if (this.checked) { $('#CheckAllLabel').text('" . DESELECT_ALL . "'); } else { $('#CheckAllLabel').text('" . CHECK_ALL . "'); } } ); $('.ThisPage').click( function() { var n = $( \"input.ThisPage:checked\" ).length; if (n >0) { $('.AllPages').prop('checked', false); } else { $('.AllPages').prop('checked', true); } } ); }); </script>"; return $string; } Quote Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum Link to comment Share on other sites More sharing options...
ce7 Posted April 30, 2015 Share Posted April 30, 2015 hi, there is a mistyping on 20131209 download install.txt $exclude = array(edirect.php', However when I tried this, i have an fatal error message as below: Call to undefined function tep_cfg_select_pages() in /modules.php(261) : eval()'d code on line 1 module.php line 261 code is as below: eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');"); then I tried the script you post on this thread Posted 23 November 2014 - 00:06 this time the error message is as below: Fatal error: Call to undefined function tep_list_catalog_files() in admin/includes/functions/general.php on line 1570 general.php line 1570 code as below: $select_array = tep_list_catalog_files(); any suggestion? Thanks Lyn Quote Link to comment Share on other sites More sharing options...
tgely Posted April 30, 2015 Share Posted April 30, 2015 tep_list_catalog_files() function need to add into general.php. You should find it in the full package or an earlier zip. Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. 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.