Jump to content
Latest News: (loading..)

mattjt83

♥Ambassador
  • Content count

    557
  • Joined

  • Last visited

  • Days Won

    22

mattjt83 last won the day on July 22 2016

mattjt83 had the most liked content!

About mattjt83

  • Birthday 12/21/1983

Profile Information

  • Real Name
    Matt T
  • Gender
    Male
  • Location
    USA
  • Interests
    Most anything related to computers, websites, and cooking

Recent Profile Visitors

49,640 profile views
  1. I have developed lots of sites and using a local server for that development made things much simpler. The setup is also quite simple and being able to see changes as you make them without having to FTP files constantly can really make a difference. When you are ready for real-world testing of payment modules you will need to be on the live server of course. To each their own though as I'm sure there are pros/cons of either style. @burt do you still use uniserver?
  2. You could use that to convert your DB for sure. If I was you I would create a subdirectory to test in or even simpler run a local server on your computer to do all of your testing / tweaking on. MAMP is good https://www.mamp.info/en/ The nice thing is that you can test and make whatever changes you want without having to worry about messing up your live site. 1. Download MAMP or an equivalent 2. Download latest BS files 3. Create a new DB and folder for your new site on your local server 4. Create a backup of your current DB and import it into the new DB you just created. 5. Run DB conversion and adjust configuration files so the site knows which DB to connect to etc 6. Figure out what customizations you need to make (SEO URLS, cross selling, etc) I think you will be surprised how much easier it is to make style changes and other alterations with a more modern framework and you will be mobile friendly out of the gate. If you get stuck google is your friend :)
  3. After taking a peak at your site it looks like it is pretty standard. I'm sure there are a few things behind the scenes that would have to be updated but I'd say overall it wouldn't be too difficult to update it to the BS version. The gains would for sure be worth the pain of the update/upgrade.
  4. OK cool. Glad it's working for you
  5. Just so I'm clear, you tried my code or just reverted to the old code?
  6. Maybe this? I haven't tested it but it should work I think <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ class ht_grid_list_view { var $code = 'ht_grid_list_view'; var $group = 'footer_scripts'; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->title = MODULE_HEADER_TAGS_GRID_LIST_VIEW_TITLE; $this->description = MODULE_HEADER_TAGS_GRID_LIST_VIEW_DESCRIPTION; if ( defined('MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS') ) { $this->sort_order = MODULE_HEADER_TAGS_GRID_LIST_VIEW_SORT_ORDER; $this->enabled = (MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS == 'True'); } } function execute() { global $PHP_SELF, $oscTemplate; if (tep_not_null(MODULE_HEADER_TAGS_GRID_LIST_VIEW_PAGES)) { $pages_array = array(); foreach (explode(';', MODULE_HEADER_TAGS_GRID_LIST_VIEW_PAGES) as $page) { $page = trim($page); if (!empty($page)) { $pages_array[] = $page; } } if (in_array(basename($PHP_SELF), $pages_array)) { $grid_list_js = <<<EOD <script> $(function() { if (window.localStorage) { let cc = localStorage['list_grid']; if (cc == 'list') { $('#products .item').removeClass('grid-group-item').addClass('list-group-item'); } else { $('#products .item').removeClass('list-group-item').addClass('grid-group-item'); } $('#list').click(function(event){ event.preventDefault(); $('#products .item').addClass('list-group-item').removeClass('grid-group-item'); localStorage['list_grid'] = 'list'; }); $('#grid').click(function(event){ event.preventDefault(); $('#products .item').removeClass('list-group-item').addClass('grid-group-item'); localStorage['list_grid'] = 'grid'; }); }else{ //cookie fallback $('head').append('<script src="ext/jquery/cookie.js"><\/script>'); try { let cc = $.cookie('list_grid'); if (cc == 'list') { $('#products .item').removeClass('grid-group-item').addClass('list-group-item'); }else{ $('#products .item').removeClass('list-group-item').addClass('grid-group-item'); } $('#list').click(function(event){ event.preventDefault(); $('#products .item').addClass('list-group-item').removeClass('grid-group-item'); $.cookie('list_grid', 'list'); }); $('#grid').click(function(event){ event.preventDefault(); $('#products .item').removeClass('list-group-item').addClass('grid-group-item'); $.cookie('list_grid', 'grid'); }); }catch(error){ console.log(error); } } }); </script> EOD; $oscTemplate->addBlock($grid_list_js . PHP_EOL, $this->group); } } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Grid List javascript', 'MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS', 'True', 'Do you want to enable the Grid/List Javascript module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Pages', 'MODULE_HEADER_TAGS_GRID_LIST_VIEW_PAGES', '" . implode(';', $this->get_default_pages()) . "', 'The pages to add the Grid List JS Scripts to.', '6', '4', 'ht_grid_list_view_show_pages', 'ht_grid_list_view_edit_pages(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_HEADER_TAGS_GRID_LIST_VIEW_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '5', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS', 'MODULE_HEADER_TAGS_GRID_LIST_VIEW_PAGES', 'MODULE_HEADER_TAGS_GRID_LIST_VIEW_SORT_ORDER'); } function get_default_pages() { return array('advanced_search_result.php', 'index.php', 'products_new.php', 'specials.php'); } } function ht_grid_list_view_show_pages($text) { return nl2br(implode("\n", explode(';', $text))); } function ht_grid_list_view_edit_pages($values, $key) { global $PHP_SELF; $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); $files_array = array(); if ($dir = @dir(DIR_FS_CATALOG)) { while ($file = $dir->read()) { if (!is_dir(DIR_FS_CATALOG . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $files_array[] = $file; } } } sort($files_array); $dir->close(); } $values_array = explode(';', $values); $output = ''; foreach ($files_array as $file) { $output .= tep_draw_checkbox_field('ht_grid_list_view_file[]', $file, in_array($file, $values_array)) . '&nbsp;' . tep_output_string($file) . '<br />'; } if (!empty($output)) { $output = '<br />' . substr($output, 0, -6); } $output .= tep_draw_hidden_field('configuration[' . $key . ']', '', 'id="htrn_files"'); $output .= '<script> function htrn_update_cfg_value() { var htrn_selected_files = \'\'; if ($(\'input[name="ht_grid_list_view_file[]"]\').length > 0) { $(\'input[name="ht_grid_list_view_file[]"]:checked\').each(function() { htrn_selected_files += $(this).attr(\'value\') + \';\'; }); if (htrn_selected_files.length > 0) { htrn_selected_files = htrn_selected_files.substring(0, htrn_selected_files.length - 1); } } $(\'#htrn_files\').val(htrn_selected_files); } $(function() { htrn_update_cfg_value(); if ($(\'input[name="ht_grid_list_view_file[]"]\').length > 0) { $(\'input[name="ht_grid_list_view_file[]"]\').change(function() { htrn_update_cfg_value(); }); } }); </script>'; return $output; }
  7. Also found this https://developer.mozilla.org/en-US/docs/Web/API/Storage/LocalStorage which could be used as a cookie patch for users who can't/don't use localStorage in their browser. if (!window.localStorage) { Object.defineProperty(window, "localStorage", new (function () { var aKeys = [], oStorage = {}; Object.defineProperty(oStorage, "getItem", { value: function (sKey) { return sKey ? this[sKey] : null; }, writable: false, configurable: false, enumerable: false }); Object.defineProperty(oStorage, "key", { value: function (nKeyId) { return aKeys[nKeyId]; }, writable: false, configurable: false, enumerable: false }); Object.defineProperty(oStorage, "setItem", { value: function (sKey, sValue) { if(!sKey) { return; } document.cookie = escape(sKey) + "=" + escape(sValue) + "; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"; }, writable: false, configurable: false, enumerable: false }); Object.defineProperty(oStorage, "length", { get: function () { return aKeys.length; }, configurable: false, enumerable: false }); Object.defineProperty(oStorage, "removeItem", { value: function (sKey) { if(!sKey) { return; } document.cookie = escape(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; }, writable: false, configurable: false, enumerable: false }); Object.defineProperty(oStorage, "clear", { value: function () { if(!aKeys.length) { return; } for (var sKey in aKeys) { document.cookie = escape(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; } }, writable: false, configurable: false, enumerable: false }); this.get = function () { var iThisIndx; for (var sKey in oStorage) { iThisIndx = aKeys.indexOf(sKey); if (iThisIndx === -1) { oStorage.setItem(sKey, oStorage[sKey]); } else { aKeys.splice(iThisIndx, 1); } delete oStorage[sKey]; } for (aKeys; aKeys.length > 0; aKeys.splice(0, 1)) { oStorage.removeItem(aKeys[0]); } for (var aCouple, iKey, nIdx = 0, aCouples = document.cookie.split(/\s*;\s*/); nIdx < aCouples.length; nIdx++) { aCouple = aCouples[nIdx].split(/\s*=\s*/); if (aCouple.length > 1) { oStorage[iKey = unescape(aCouple[0])] = unescape(aCouple[1]); aKeys.push(iKey); } } return oStorage; }; this.configurable = false; this.enumerable = true; })()); }
  8. @burt Because everyone doesn't use localstorage you might want to check if it's enabled first and use the old code as a backup if it's not. if (window.localStorage) { // use localStorage script }else{ //fallback to cookies here }
  9. [Contribution] Customer Support Portal

    @GLWalker That would be awesome. If you need some incentive just PM me the details :)
  10. Even better use google analytics to track the banner clicks/history
  11. [Contribution] Customer Support Portal

    Typo in includes/modules/header_tags/customer_service/modules/bstour/dashboard.js { element: ".tour-step.dashboard-outro", orphan: true, backdrop: true, title: "Dashboard Complete!", content: "Congratulations! You finished the dashboard tour. Perform any action to take another tour and learn about it. When you complete all the tours, ask an adminstrtor to switch it off for your account." } Should be { element: ".tour-step.dashboard-outro", orphan: true, backdrop: true, title: "Dashboard Complete!", content: "Congratulations! You finished the dashboard tour. Perform any action to take another tour and learn about it. When you complete all the tours, ask an administrator to switch it off for your account." }
  12. [Contribution] Customer Support Portal

    Found a typo in includes/modules/header_tags/customer_service/template_top.php <div class="alert-message alert-message-succss"> Assuming it should be <div class="alert-message alert-message-success">
  13. [Contribution] Customer Support Portal

    Just noting a couple of errors... in #scModal <input type="email" name="user_email" required aria-required="true" placeholder="Search..." class="form-control" class="form-control"/> In #osModal <input type="text" name="oID" required aria-required="true" placeholder="Search..." class="form-control" class="form-control"/> in #csModal <input type="text" name="search" required aria-required="true" placeholder="Search..." class="form-control" class="form-control"/> All pages are missing (includes/modules/header_tags/customer_service/template_top.php) <!DOCTYPE html>
  14. [Contribution] Customer Support Portal

    @GLWalker Is there a way to edit existing orders? I'm giving this a spin but I didn't see that option.
  15. Admin to Bootstrap NO HTML changes

    My only additions to my template_top were for the attributes manager but I don't think it is interfering with your code. It displays better on other pages but not perfectly. I'm sure there is something lurking in there that's causing me issues but like I said before I don't have the time to go poking around for that right now. Also, it's never bad to point out obvious things. I do lots of coding but we are all human and we all make mistakes :)
×