Jump to content

mattjt83

♥Ambassador
  • Content count

    557
  • Joined

  • Last visited

  • Days Won

    24

Reputation Activity

  1. Like
    mattjt83 got a reaction from valquiria23 in Please Review my Website - comments are welcome   
    OK, you've done all the hard work of getting the products loaded and the site features implemented. Good job on that
    My issues are:
    1. The site looks very generic. A professional looking template would make a HUGE difference. What it will come down to is that people are scared to shop on non-professional looking sites. If you are only selling items to well established customers your site would probably be fine but otherwise it would be a wise investment to get a proper template setup. Some very simple style adjustments could present your hard work in a much better way.
    2. The images do look pixelated (stretched). I'm not sure if you can help this if the images are coming from the manufacturer that way.
  2. Like
    mattjt83 got a reaction from valquiria23 in Support thread for JcM Adaptive Images addon   
    The stray </form> tag could cause unforeseen issues and invalidates the html. Not relevant though since you updated the module to a header_tag.
    I can appreciate what you are doing and I think it's great you're giving back to the community. I have edited your header_tag module so that it is coded according to the proper standards and hopefully doesn't cause issues for users.
    <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2018 osCommerce Released under the GNU General Public License V1.0 JcM Adaptive Images 16-7-2018 Adaptive Images by Matt Wilcox is licensed under a Creative Commons Attribution 3.0 Unported License. This addon uses the code by MattWilcox/Adaptive-Images from GitHub It is used as supplied and all credit is with original author. All this add-on does is allow you to install in as a module you can turn on and off. */ class ht_jcm_adaptive_images { var $code = 'ht_jcm_adaptive_images'; var $group = 'header_tags'; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->title = MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_TITLE; $this->description = MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_DESCRIPTION; if ( defined('MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_STATUS') ) { $this->sort_order = MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_SORT_ORDER; $this->enabled = (MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_STATUS == 'True'); } } function execute() { global $oscTemplate; $output = <<<EOD <script>document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/';</script> EOD; $oscTemplate->addBlock($output, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_STATUS'); } function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable JcM Adaptive Images Module', 'MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_STATUS', 'True', 'Do you want to allow images script to be added to the page header?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Adaptive Images for OcS', 'MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_DESCRIPTION_STATUS', 'True', 'adaptive images', '6', '0', 'tep_cfg_select_option(array(\'True\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_STATUS', 'MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_DESCRIPTION_STATUS', 'MODULE_HEADER_TAGS_JCM_ADAPTIVE_IMAGES_SORT_ORDER'); } } ?>  
  3. Like
    mattjt83 reacted to burt in Support thread for JcM Adaptive Images addon   
    Sounds like you know best 
  4. Sad
    mattjt83 got a reaction from leatherdealer in [Contribution] Customer Support Portal   
    @GLWalker That would be awesome. If you need some incentive just PM me the details :)
  5. Like
    mattjt83 reacted to beerbee in Grid List - Cookie   
    Yes tried your code.
    Best regards
    Christoph
  6. Like
    mattjt83 reacted to beerbee in Grid List - Cookie   
    Hi reverted, cleaned cache and cookies works,  also tried in private FF window works, thanks a lot!
    Best regards
    Christoph
  7. Thanks
    mattjt83 got a reaction from burt in Grid List - Cookie   
    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; }  
  8. Thanks
    mattjt83 got a reaction from burt in Grid List - Cookie   
    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; }  
  9. Thanks
    mattjt83 got a reaction from burt in Grid List - Cookie   
    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; }  
  10. Like
    mattjt83 got a reaction from burt in Grid List - Cookie   
    @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 }  
  11. Like
    mattjt83 reacted to kymation in USPS Rate V4, Intl Rate V2 (official support thread)   
    The USPS has just released the notes for their January update. Other than the usual price increases, they are changing some of the unusual classes, mostly adding more information in the response. I don't see anything that we need to be concerned about, but there could be something lurking in there that I missed.
    I don't see a link on their website for the January release notes, so I'll attach my copy.
    Regards
    Jim
    00000261.Web_Tools_Release_Notes_-_January_2018_-_EXTERNALv1.1.pdf
  12. Like
    mattjt83 reacted to bruyndoncx in html5 input types   
    fyi
    https://mobiforge.com/design-development/html5-mobile-web-forms-and-input-types
    this triggers the appropriate mobile keyboard
  13. Like
    mattjt83 got a reaction from ArtcoInc in UK shipping module needed for 2.3.4 BS and works on PHP7   
    @burt I thought you had also partially merged into the Matrix? :)
  14. Like
    mattjt83 got a reaction from ArtcoInc in One-Page / Guest Checkout   
    Here's a good article: https://www.smashingmagazine.com/2017/05/better-form-design-one-thing-per-page/
    I might actually rework my checkout with this in mind.
  15. Like
    mattjt83 got a reaction from ArtcoInc in One-Page / Guest Checkout   
    Here's a good article: https://www.smashingmagazine.com/2017/05/better-form-design-one-thing-per-page/
    I might actually rework my checkout with this in mind.
  16. Like
    mattjt83 reacted to greasemonkey in One-Page / Guest Checkout   
    Hey guys, enjoying this discussion.... 
    Just wanted to point out, if you think it's relevant to OsC, Amazon (the largest ecom retailer in the world by far) doesn't use one page checkout. 
    4 super simple clean steps  
     
  17. Like
    mattjt83 got a reaction from douglaswalker in One-Page / Guest Checkout   
    I had a one page checkout on my site and it led to all sorts of issues. It was inherently glitchy and confused customers.
    After that I decided to code and sell Better Checkout. I still use it on my site but I do not sell it anymore because I don't like all the changes required to make payment modules work properly. Basically, your customers can checkout with or without an account and it's seamless. It splits the checkout up into manageable chunks for customers and is easier to maintain code-wise. You are welcome to check it out on my site and see what you think maybe just to get some ideas. Mine is highly customized.
    The more that I read on the topic it seems that people in general do better with small simple checkout pages and don't mind having to complete 3 or 4 SIMPLE steps (pages).
  18. Like
    mattjt83 reacted to John W in 17 Years Young!   
    Pretty soon it will be asking to borrow the car for dates, going out drinking, etc... 
  19. Like
    mattjt83 reacted to Harald Ponce de Leon in 17 Years Young!   
    We're 17 today! 17 years working on Open Source. 17 years working with you. Trusting us for 17 years.
     
    Thank you!
     
    We're not only celebrating just today, but this whole month! New releases coming soon. New websites coming soon.
     
    #celebratingwithyou
     
    Happy Birthday osCommerce!
  20. Like
    mattjt83 reacted to Dan Cole in [Addon] iBar Dashboard Modules   
    @@mattjt83
     
     
    I don't actually have the script but have a look at this post and the one by Gary that follows it in the iBar development thread.   If your interested google imap_open and it should give a good idea about coding it.  Frank will likely share his code too, if you ask him nicely. 
     
    Dan
  21. Like
    mattjt83 reacted to Dan Cole in [Addon] iBar Dashboard Modules   
    @@mattjt83  I really like the concept of dashboards and I think this has a ton of potential...Frank has a script to read from Gmail and I can think of another 4 or 5 modules I want to add so it should be a good way to keep an eye on what's important to shop owners.   Glad you like it so far.  :thumbsup:
     
    Dan
  22. Like
    mattjt83 got a reaction from Dan Cole in [Addon] iBar Dashboard Modules   
    @@Dan Cole
     
    On a standard setup you can't get the icon modules to be in a nice little row like in the screenshots. I decided to code up a hook and display the iBar modules on their own at the top of the page instead of altering my index page to accommodate them.
     
    on admin/index.php under this:
    $adm_array = explode(';', MODULE_ADMIN_DASHBOARD_INSTALLED); I added this:
    //BOF iBar echo $OSCOM_Hooks->call('index', 'indexiBarOutput'); //EOF iBar Then I created a hook file catalog/includes/hooks/admin/index/iBar.php
    <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2017 osCommerce Released under the GNU General Public License */ class hook_admin_index_iBar { function listen_indexiBarOutput() { global $adm_array, $language; if ( is_array( $adm_array ) && sizeof( $adm_array ) > 0 ){ $iBar_array = array(); $new_adm_array = array(); foreach ( $adm_array as $key => $value ){ if ( strpos( $value, 'iBar' ) !== false ) { $iBar_array[] = $value; }else{ $new_adm_array[] = $value; } }//eof foreach //set new $adm_array without iBar modules included if ( sizeof( $new_adm_array ) > 0 ){ $adm_array = $new_adm_array; } //build iBar modules output here if ( sizeof( $iBar_array ) > 0 ){ $iBar_output = '<!-- BOF iBar additions --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script> <link rel="stylesheet" type="text/css" href="includes/iBar.css"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- EOF iBar additions -->'; $iBar_output .= '<tr><td colspan="2"><div class="row">'; for ( $i=0, $n=sizeof($iBar_array); $i<$n; $i++ ) { $adm = $iBar_array[$i]; $class = substr($adm, 0, strrpos($adm, '.')); if ( !class_exists($class) ) { include(DIR_WS_LANGUAGES . $language . '/modules/dashboard/' . $adm); include(DIR_WS_MODULES . 'dashboard/' . $class . '.php'); } $ad = new $class(); if ( $ad->isEnabled() ) { $iBar_output .= $ad->getOutput(); } } $iBar_output .= '</td></tr></div>'; } return $iBar_output; } } } ?> Also don't forget to call the index page hooks with this before the output of the hook:
    $OSCOM_Hooks->register('index');
  23. Like
    mattjt83 got a reaction from JaumeUbach in Ajax attribute manager load index page in categories.php   
    @@JaumeUbach
     
    Look here: http://forums.oscommerce.com/topic/195959-ajax-attribute-manager-support/page-67#entry1714879
     
    And here: http://forums.oscommerce.com/topic/195959-ajax-attribute-manager-support/page-67#entry1729091
  24. Like
    mattjt83 got a reaction from katapofatico in Problem: Header Tag Module including multiple Javascript files   
    @@katapofatico
     
    You can paste your modules code here so we can look at it but you could also do something like....
    $output = '<script type="text/javascript" src="ext/modules/validation/jquery.validate.min.js" />'; $output .= '<script type="text/javascript" src="ext/modules/validation/localization/messages_es.min.js" />'; $oscTemplate->addBlock($output, $this->group); Also make sure inside your function you include
    global $oscTemplate;
  25. Like
    mattjt83 reacted to bruyndoncx in Bootstrap Home Page Carousel Banner Slider Module Plugin Complete - Testing Welcome   
    Google this
    best practice sliders carousel for mobile
     
    Find this
    http://baymard.com/blog/homepage-carousel
     
    and find this
    http://shouldiuseacarousel.com/
×