Jump to content
Latest News: (loading..)

Leaderboard


Popular Content

Showing most liked content since 12/22/2017 in all areas

  1. 9 points
    wHiTeHaT

    Admin to Bootstrap NO HTML changes

    Convert via jQuery your osCommerce admin to bootstrap the easy way, tutorial below the video. Video updated to V8 https://youtu.be/7v7LvPLyRYQ admin/includes/stylesheet.css (back-up & Replace): /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ /* body { font-family: Verdana, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.7em; } */ body { display: none; } /* links */ a { color: #000000; font-weight: normal; text-decoration: none; } a:hover { text-decoration: underline; } a.headerLink { color: #ffffff; font-weight: bold; text-decoration: none; } a.headerLink:hover { text-decoration: underline; } a.menuBoxHeadingLink { color: #616060; font-weight: bold; text-decoration: none; } a.menuBoxHeadingLink:hover { } a.menuBoxContentLink { color: #616060; font-weight: normal; text-decoration: none; } a.menuBoxContentLink:hover { text-decoration: underline; } a.splitPageLink { color: #0000FF; font-weight: normal; text-decoration: none; } a.splitPageLink:hover { text-decoration: underline; background-color: #FFFF33; } /* menu box */ .menuBoxHeading { color: #616060; background-color: #ffffff; } .menuBoxContent { color: #616060; } /* page */ /*body { background-color: #ffffff; color: #000000; margin: 0px; }*/ /*.headerBar { background-color: #B3BAC5; }*/ /*.headerBarContent { color: #ffffff; font-weight: bold; padding: 2px; }*/ /*.columnLeft { background-color: #F0F1F1; border-color: #999999; border-width: 1px; border-style: solid; padding: 2px; }*/ /*.pageHeading { font-size: 1.5em; color: #727272; font-weight: bold; }*/ /* data table .dataTableHeadingRow { background-color: #C9C9C9; } .dataTableHeadingContent { color: #ffffff; font-weight: bold; } .dataTableRow { background-color: #F0F1F1; } .dataTableRowSelected { background-color: #DEE4E8; } .dataTableRowOver { background-color: #FFFFFF; cursor: pointer; cursor: hand; } .dataTableContent { color: #000000; } */ /* info box .infoBoxHeading { color: #ffffff; background-color: #B3BAC5; } .infoBoxContent { color: #000000; background-color: #DEE4E8; } */ /* message box */ .messageBox { } .messageStackError, .messageStackWarning { background-color: #ffb3b5; } .messageStackSuccess { background-color: #99ff00; } /* forms CHECKBOX, INPUT, RADIO, SELECT, TEXTAREA, FILE { font-family: Verdana, "Helvetica Neue", Helvetica, Arial, sans-serif; } FORM { display: inline; } */ /* account .formArea { background-color: #f1f9fe; border-color: #7b9ebd; border-style: solid; border-width: 1px; } .formAreaTitle { font-family: Tahoma, Helveticy, Verdana, Arial, sans-serif; font-weight: bold; } */ /* attributes */ /*.attributes-odd { background-color: #f4f7fd; }*/ /*.attributes-even { background-color: #ffffff; }*/ /* miscellaneous */ .specialPrice { color: #ff0000; } .oldPrice { text-decoration: line-through; } .fieldRequired { color: #ff0000; } .errorText { color: #ff0000; } /* new messageStack styles .secInfo, .secSuccess, .secWarning, .secError { border: 1px solid; margin: 10px 0px; padding: 5px 10px 5px 50px; background-repeat: no-repeat; background-position: 10px center; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; } .secInfo { border-color: #00529B; background-image: url('../images/ms_info.png'); background: url('../images/ms_info.png') no-repeat 10px center, url('../images/ms_info_bg.png') repeat-x; background-color: #BDE5F8; } .secSuccess { border-color: #4F8A10; background-image: url('../images/ms_success.png'); background: url('../images/ms_success.png') no-repeat 10px center, url('../images/ms_success_bg.png') repeat-x; background-color: #DFF2BF; } .secWarning { border-color: #9F6000; background-color: #FEEFB3; background-image: url('../images/ms_warning.png'); background: url('../images/ms_warning.png') no-repeat 10px center, url('../images/ms_warning_bg.png') repeat-x; background-color: #FEEFB3; } .secError { border-color: #D8000C; background-image: url('../images/ms_error.png'); background: url('../images/ms_error.png') no-repeat 10px center, url('../images/ms_error_bg.png') repeat-x; background-color: #FFBABA; } .secInfo p, .secSuccess p, .secWarning p, .secError p { padding: 2px; } #adminAppMenu { float: left; width: 190px; padding: 5px; } #adminAppMenu h3 { } #adminAppMenu ul { list-style: none; margin: -5px 0 -5px -10px; padding: 0; } #contentText { margin-left: 200px; }*/ /* Custom jQuery UI */ .ui-widget { } .ui-dialog { min-width: 500px; } /* buttons .tdbLink a { } .tdbLink button { } */ .selectwidthauto{ width:auto !important; } in admin/includes/template_top.php : [Viewport] DIRECTLY AFTER: <head> ADD: <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> [bootstrap css] BEFORE: <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> ADD: <link href="../ext/bootstrap/css/bootstrap.min.css" rel="stylesheet"> [Font-awesome css] BEFORE: <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.min.js', '', 'SSL'); ?>"></script> ADD: <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> [Flot chart resize fix] AFTER: <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.time.min.js', '', 'SSL'); ?>"></script> ADD: <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.resize.min.js', '', 'SSL'); ?>"></script> OPTIONAL SUMMERNOTE WYSIWYG DIRECTLY ABOVE </head> ADD: <!-- include summernote css/js--> <link href="//cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote.css" rel="stylesheet"> <script src="//cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote.js"></script> admin/includes/template_bottom.php BEFORE: </body> ADD: <script> $(function() { //Prepare the DOM $(document).on("click", ".menu", function(){ osCMenu(this); }); $('body').prepend( "<div id='container-wrapper' class='container-fluid'><div class='row'></div></div>" ); columnLeft = $("<div class='col-md-2 menu-col'/>"); columnCenter = $("<div class='col-md-10 body-content-col'/>"); $('body .row').append(columnLeft, columnCenter); //Administrator Header Bar $('body').css('padding-top', '70px'); $('#adminAppMenu').appendTo('.menu-col'); //prepare table conversion $('table tbody tr.headerBar').parent().parent().addClass('table-2-nav'); //Convert logo to brand $('.table-2-nav a:first').addClass('navbar-brand'); $('.table-2-nav img:first').addClass('img-responsive').css('margin-top','-15px'); //wrap the logo and build the default nav $('.table-2-nav a:first').wrap( "<nav class='navbar navbar-default navbar-fixed-top'><div class='container-fluid'><div class='navbar-header'></div></nav>" ); //extend nav with toggle bar-button $('.navbar-header').prepend( "<button type='button' class='navbar-toggle collapsed' data-toggle='collapse' data-target='#bs-example-navbar-collapse-1' aria-expanded='false'><span class='sr-only'>Toggle navigation</span><span class='icon-bar'></span><span class='icon-bar'></span><span class='icon-bar'></span></button> "); //create the visible navigation menu $('nav div:first').append("<div class='collapse navbar-collapse' id='bs-example-navbar-collapse-1'><ul class='nav navbar-nav navbar-nav-left'></ul><ul class='nav navbar-nav navbar-nav-right pull-right'></ul></div>"); //collect links var navLeftLinks = $('#bs-example-navbar-collapse-1 ul.navbar-nav-left'); var navRightLinks = $('#bs-example-navbar-collapse-1 ul.navbar-nav-right'); $('.table-2-nav .headerBarContent:first a').each(function () { var $this = $(this); var list = $("<li/>"); list.append( $this ); navLeftLinks.append(list); }); navLeftLinks.prepend('<li><a href="#" class="menu"><i class="fa fa-caret-square-o-left" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Show/Hide menu"></i></a></li>'); var str = "<?php echo HEADER_TITLE_ADMINISTRATION; ?>"; var newhtml = $('ul.navbar-nav-left').html().replace(str, '<i class="fa fa-home" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="'+str+'"></i>'); $('ul.navbar-nav-left').html(newhtml); var str = "<?php echo HEADER_TITLE_ONLINE_CATALOG; ?>"; var newhtml = $('ul.navbar-nav-left').html().replace(str, '<i class="fa fa-cart-arrow-down" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="'+str+'"></i>'); $('ul.navbar-nav-left').html(newhtml); var str = "<?php echo HEADER_TITLE_SUPPORT_SITE; ?>"; var newhtml = $('ul.navbar-nav-left').html().replace(str, '<i class="fa fa-life-ring" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="'+str+'"></i>'); $('ul.navbar-nav-left').html(newhtml); $('[data-toggle="tooltip"]').tooltip(); navLeftLinks.css('font-size','20px') //Collect log-in/-off link with Administrator name NavText = $('.table-2-nav .headerBarContent:nth-child(2)').html(); NavTextPlaceHolder = $("<p class='navbar-text navbar-right'>"); NavTextPlaceHolder.append( NavText ); navRightLinks.prepend(NavTextPlaceHolder); $('.navbar-text a:first').addClass('navbar-link'); //Show the Bootstrapped navigation bar $( "nav" ).insertBefore( $( ".table-2-nav" ) ); //Admin Language in navbar $("form[name=adminlanguage]").addClass('navbar-form navbar-right').prepend( "<div class='input-group language'></div>" ); $('select[name=language]').appendTo('.input-group.language'); $( "form[name=adminlanguage]" ).insertBefore( "nav ul.navbar-nav-right" ); //Convert osCommerce's page-headers to bootstrap $('table .pageHeading:first').contents().unwrap().wrap( "<div class='page-header'><h1></h1></div>"); $('.page-header').prependTo('.body-content-col').css('padding-bottom','0').css('margin','0'); //Search field in navbar $("form[name=search]").addClass('navbar-form navbar-search-form navbar-left').prepend( "<div class='input-group search'></div>" ); $('input[name=search]').before(function () { return $('<span class="input-group-addon search"/>', { for: this.name }).addClass('selectwidthauto').append(this.previousSibling); }).addClass('form-control selectwidthauto'); $("span.search").prependTo('.input-group.search'); $('input[name=search]').appendTo('.input-group.search'); $( "form[name=search]" ).insertAfter( "nav ul.navbar-nav-left" ); //Categories GoTo select in navbar $("form[name=goto]").addClass('navbar-form navbar-left').prepend( "<div class='input-group goto'></div>" ); $('select[name=cPath]').before(function () { return $('<span class="input-group-addon goto"/>', { for: this.name }).addClass('selectwidthauto').append(this.previousSibling); }).addClass('form-control selectwidthauto'); $("span.goto").prependTo('.input-group.goto'); $('select[name=cPath]').appendTo('.input-group.goto'); $( "form[name=goto]" ).insertAfter( "nav .navbar-search-form" ); //Orders Search field in navbar $("form[name=orders]").addClass('navbar-form navbar-search-form navbar-left').prepend( "<div class='input-group orders'></div>" ); $('input[name=oID]').before(function () { return $('<span class="input-group-addon orders"/>', { for: this.name }).addClass('selectwidthauto').append(this.previousSibling); }).addClass('form-control selectwidthauto'); $("span.orders").prependTo('.input-group.orders'); $('input[name=oID]').appendTo('.input-group.orders'); $( "form[name=orders]" ).append('<input type="hidden" name="action" value="edit">').insertAfter( "nav ul.navbar-nav-left" ); //Categories GoTo select in navbar $("form[name=status]").addClass('navbar-form navbar-left').prepend( "<div class='input-group status'></div>" ); $('select[name=status]').before(function () { return $('<span class="input-group-addon status"/>', { for: this.name }).addClass('selectwidthauto').append(this.previousSibling); }).addClass('form-control selectwidthauto'); $("span.status").prependTo('.input-group.status'); $('select[name=status]').appendTo('.input-group.status'); $( "form[name=status]" ).insertAfter( "nav .navbar-search-form" ); //Remove osCommerce's table-based navigation $('.table-2-nav').remove(); //Bootstrap the osCommerce's primary content table (center table) $('table tbody tr.dataTableHeadingRow').parent().parent().addClass('bootstrapped-table table table-responsive table-condensed table-hover table-striped table-bordered'); $('table tbody tr.dataTableRowSelected').addClass('warning') //Bootstrap the osCommerce's right table (edit data) $('table tbody tr.infoBoxHeading').parent().parent().addClass('infoBox-table info-table table table-responsive table-condensed table-bordered'); $('.info-table').next("table").addClass('infoBoxContent-table table table-responsive table-condensed table-bordered'); $('.info-table').next("form").addClass('form-table'); $('.form-table').children("table").addClass('info-table table table-responsive table-condensed table-bordered '); //Bootstrap the osCommerce's formArea tables (Customers edit) $( ".formArea table" ).addClass('table table-responsive table-condensed table-hover table-striped table-bordered') //Bootstrap jQuery-ui buttons $( "a.ui-button" ).removeAttr('class').addClass('btn btn-default').css({'margin-right': '4px'}); $( "button.ui-button" ).removeAttr('class').addClass('btn btn-primary').css({'margin-right': '4px'}); $( "#filters .btn" ).addClass('btn-sm') //jQuiry-UI button icons $( "span.ui-icon" ).addClass('pull-left'); //bootstrap pageNavigation links $( "form[name=pages]" ).addClass( "form-inline" ); $( ".splitPageLink" ).addClass('btn btn-default'); $( "select" ).addClass('form-control selectwidthauto'); //$( "input[type=radio]" ).wrap( "<div class='radio'><label></label></div>" ); //$( "input[type=checkbox]" ).wrap( "<div class='checkbox-inline'></div>" ); //build table headings $('.bootstrapped-table').each(function(){ $(this).prepend('<thead></thead>') $(this).find('thead').append($(this).find("tr:eq(0)")); }); $(".dataTableHeadingRow td").each(function() { $(this).replaceWith('<th>' + $(this).html() + '</th>'); }); $('.infoBox-table').each(function(){ $(this).prepend('<thead></thead>') $(this).find('thead').append($(this).find("tr:eq(0)")); }); //convert message tables to bootstrap //old message styles $('table tbody tr.messageStackSuccess').parent().parent().addClass('message-table table').insertAfter('.page-header'); $('table tbody tr.messageStackError').parent().parent().addClass('message-table table').insertAfter('.page-header'); $('table tbody tr.messageStackWarning').parent().parent().addClass('message-table table').insertAfter('.page-header'); //new message styles $('.secInfo').toggleClass('secInfo alert alert-info'); $('.secSuccess').toggleClass('secSuccess alert alert-success'); $('.secWarning').toggleClass('secWarning alert alert-warning'); $('.secError').toggleClass('secError alert alert-danger'); //add colspan to fist th on the orders section_products_content tab $('#section_products_content table tr th:first').attr('colspan', '2'); $('#section_products_content table').removeClass('table-bordered table-striped table-hover'); //Convert New Product to Bootstrap $("form[name=new_product] table table").addClass('table table-responsive table-condensed table-bordered'); //$("form[name=new_product] table table tr").removeAttr('bgcolor'); //Convert BannerManager to Bootstrap $("input[name=banners_title]").closest('table').addClass('table table-responsive table-condensed table-bordered'); //Convert osCommerce's footer to bootstrap $('table:last td').wrapInner( "<footer class='footer'><div class='container'><p class='text-muted text-center'></p></div></footer>" ); $('footer').insertAfter('body #container-wrapper'); //Put osCommerce's content to bootstrap column $('#contentText').appendTo('.body-content-col'); //clean-up tables $('.table') .removeAttr('border') .removeAttr('width') .removeAttr('height') .removeAttr('cellspacing') .removeAttr('cellpadding'); $("img[src='images/pixel_trans.gif']").remove(); $('td.pageHeading').remove(); $('fieldset').removeAttr('style'); $('legend').removeAttr('style'); $('tr').removeAttr('onmouseover').removeAttr('onmouseout'); $('table:last').remove(); //Convert inputs and textarea's $("input[type=text]").addClass('form-control selectwidthauto'); $("textarea").addClass('form-control'); //load summernote wysiwyg $("textarea[name^=categories_description]").addClass('summernote'); $("textarea[name^=products_description]").addClass('summernote'); $("textarea[name=comments]").addClass('summernote'); $("textarea[name=banners_html_text]").addClass('summernote'); //replace oscommerce's images with font-icons $("img[src='images/icon_up.gif']").replaceWith("<i class='fa fa-long-arrow-up' aria-hidden='true'></i>"); $("img[src='images/icon_down.gif']").replaceWith("<i class='fa fa-long-arrow-down' aria-hidden='true'></i>"); if (localStorage.getItem("adminToggleAppMenu") === null) { localStorage.setItem('adminToggleAppMenu', 1) } if (localStorage.getItem("adminToggleAppMenu") == 0) { $(".menu i").removeClass('fa-caret-square-o-left').addClass('fa-caret-square-o-right'); $(".menu-col").hide(); $("body .body-content-col").removeClass('col-md-10').addClass('col-md-12'); } if (localStorage.getItem("adminToggleAppMenu") == 1) { $(".menu i").removeClass('fa-caret-square-o-right').addClass('fa-caret-square-o-left');; $(".menu-col").show(); $("body .body-content-col").removeClass('col-md-12').addClass('col-md-10'); } if($('form[name=login]').length > 0){ $('.page-header').addClass('text-center'); $('table') .removeAttr('border') .removeAttr('width') .removeAttr('height') .removeAttr('cellspacing') .removeAttr('cellpadding'); $('table .infoBox-table').remove(); $('table .info-table').css({'width': '50%', 'margin': '0 auto', 'margin-top': '50px', 'margin-bottom': '50px'}); $('form[name=login]').insertAfter('#contentText'); $("input[type=password]").addClass('form-control selectwidthauto'); $(".body-content-col").toggleClass("col-md-10 col-md-12") columnLeft.remove(); } //convert jquery-ui accordion to bootstrap collapse $( "#adminAppMenu" ).accordion('destroy').addClass('panel-group').attr('role', 'tablist').attr('aria-multiselectable', 'true'); $('#adminAppMenu h3').each(function(i) { $(this).attr('id', 'page'+(i+1)).addClass('panel-title').find('a') .attr('role', 'button').attr('data-toggle', 'collapse') .attr('data-parent', '#adminAppMenu') .attr('href', '#collapse_'+(i+1)) .attr('aria-expanded', 'false') .attr('aria-controls', 'collapse_'+(i+1)) .parent().next() .attr('id', 'collapse_'+(i+1)).attr('class', 'panel-collapse collapse').attr('role','tabpanel').attr('aria-labelledby','heading_'+(i+1)); $(this).wrap('<div class="panel panel-default"><div class="panel-heading" role="tab" id="heading_'+(i+1)+'"></div></div>'); $('#collapse_'+(i+1)+' ul').addClass('list-group').find('li').addClass('list-group-item'); $('#collapse_'+(i+1)).insertAfter('#heading_'+(i+1)); }); //Keep state of collapse menu via localStorage var adminCollapseAppMenu = localStorage.getItem('adminCollapseAppMenu'); if (!adminCollapseAppMenu) { adminCollapseAppMenu = []; localStorage.setItem('adminCollapseAppMenu', JSON.stringify(adminCollapseAppMenu)); } else { adminCollapseAppMenuArray = JSON.parse(adminCollapseAppMenu); var arrayLength = adminCollapseAppMenuArray.length; for (var i = 0; i < arrayLength; i++) { var panel = '#'+adminCollapseAppMenuArray[i]; $(panel).addClass('in'); } } $('#adminAppMenu').on('shown.bs.collapse', '.panel-collapse', function() { adminCollapseAppMenu = JSON.parse(localStorage.getItem('adminCollapseAppMenu')); if ($.inArray($(this).attr('id'), adminCollapseAppMenu) == -1) { adminCollapseAppMenu.push($(this).attr('id')); }; localStorage.setItem('adminCollapseAppMenu', JSON.stringify(adminCollapseAppMenu)); }); $('#adminAppMenu').on('hidden.bs.collapse', '.panel-collapse', function() { adminCollapseAppMenu = JSON.parse(localStorage.getItem('adminCollapseAppMenu')); adminCollapseAppMenu.splice( $.inArray($(this).attr('id'), adminCollapseAppMenu), 1 ); localStorage.setItem('adminCollapseAppMenu', JSON.stringify(adminCollapseAppMenu)); }); }); //Prevent jQuery-UI's CSS showing up on pageLoad $(window).load(function() { // When the page has loaded $("body").fadeIn(100); }); </script> <?php if (tep_session_is_registered('admin')) { ?> <script> function osCMenu() { event.preventDefault(); if (localStorage.getItem("adminToggleAppMenu") == 1 ? localStorage.setItem('adminToggleAppMenu', 0) : localStorage.setItem('adminToggleAppMenu', 1)); if (localStorage.getItem("adminToggleAppMenu") == 1 ? $(".menu i").removeClass('fa-caret-square-o-right').addClass('fa-caret-square-o-left') : $(".menu i").removeClass('fa-caret-square-o-left').addClass('fa-caret-square-o-right')); if (localStorage.getItem("adminToggleAppMenu") == 1 ? $(".menu-col").show() : $(".menu-col").hide()); $(".body-content-col").toggleClass("col-md-10 col-md-12") } </script> <?php } ?> <script src="../ext/bootstrap/js/bootstrap.min.js"></script> OPTIONAL SUMMERNOTE WYSIWYG if you choose to want the wysiwyg: BEFORE <script src="../ext/bootstrap/js/bootstrap.min.js"></script> </body> </html> ADD: <script> $(function(){ //SUMMERNOTE WYSIWYG OPTIONAL: $('.summernote').summernote(); }); </script>
  2. 8 points
    Wish everyone Happy Holidays and Merry Xmas... Best wishes for the coming year, hopefully 2018 will be the year for osCommerce to come alive again. Special thanks to all those who have supported the Community Version and very special thanks to all my clients, all of whom I consider friends. Cya on the flipside!
  3. 7 points
    This is a admin sidebar that replaces the stock menu. It can be expanded or condensed on a column of icons. It also adds bootstrap framework to admin. Hope you enjoy it. Please comment here if you have any improvements or find any problem. Download: https://apps.oscommerce.com/ebjVY&admin-responsive-sidebar-with-bootstrap
  4. 6 points
    GLWalker

    Ive got a suprise coming

    And here's some general usage: https://youtu.be/dLgiD1FoTj4
  5. 5 points
    burt

    Grid List - Cookie

    Grid List is remembered via Cookie. This means loading in this file; https://github.com/gburton/Responsive-osCommerce/blob/master/ext/jquery/cookie.js It's not a big file, but it can be got rid of as so; Change these two lines: https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/header_tags/ht_grid_list_view.php#L46-L47 To: $grid_list_js = <<<EOD <script>$(function() { var 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'); } $(document).ready(function() { $('#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'; });});});</script> EOD; $oscTemplate->addBlock($grid_list_js . PHP_EOL, $this->group); Save file and upload. You should see no change at all in functionality. HOwever your site is now loading faster as it does not have to load the cookie.js file. Thoughts and Feedback appreciated. And code changes. Etc and so on. Pitch in.
  6. 5 points
    GLWalker

    Ive got a suprise coming

    How about this for install instructions https://youtu.be/cwaid91cp1A
  7. 5 points
    Looking to do a new 28days project so if anyone has an idea for a SMALL or MEDIUM sized piece of code, let me know...
  8. 4 points
    GLWalker

    [Contribution] Customer Support Portal

    This is the support thread for the Customer Service Portal https://apps.oscommerce.com/xihXD&customer-service-portal The primary goal of the Customer Support Portal is to allow osCommerce shop owners to allow their employees to work on order fulfillment and customer support inquiries without having to allow direct admin access. Additionally it serves as a full fledged order placement system that will work with a shops existing payment methods, as well as a couple of new payment modules that could be useful in case alternate means of payment processing are desired, or in person cash sales are needed. The Customer Support Portal also allows a true guest checkout option. No customer is created if this option is used. All customer information is stored only in the actual order information. There is a quick link in the Customer Portal Header menu that allows guest orders to be viewed separately from the rest of the store orders. Please note that in the ht_customer_service module settings there is an email field to fill out, by default it uses the store owners set email address. This email is used for certain functions within the Customer Service Portal, such as a placeholder email in guest account creation. It will always be populated on the guest customers information field, just to skip the additional step of gathering an email address from a guest. Whenever done with guest accounts, or even logging into an existing customers account always go back to the dashboard. This resets the session for that particular customer. If you are in a customers account, then you have to take on a session allowing you to access their info, the dashboard kills any sessions that are not related directly to you the customer service agent. If you are using the cash payment option, you will need to adjust the sort order of you order total module sp that the order totals and cash back amounts are computed correctly. Helpful Videos: https://www.youtube.com/watch?v=cwaid91cp1A&feature=youtu.be https://www.youtube.com/watch?v=dLgiD1FoTj4&feature=youtu.be Known issues: This plugin has been used in working shops for a number of years and proven to be stable. There are howver 2 issues I am aware of. 1) If a product in the cart has attributes, the update quantity field wont work properly. If a different quantity is desired, just delete it and add the correct quantity from the product listing itself. 2) I have not noticed this until testing on PHP 7.0, when using the cash payment option, the update button needs to be clicked twice. Feel free to post with comments or suggestions.
  9. 3 points
    mattjt83

    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. 3 points
    Advice to use a file compare is good advice. Otherwise, how can anyone write an install...as almost all shopowners have different versions of osc running or have not stuck to the idea of "no core changes" and so on. Put another way; addon makers would spend all their time writing installation instructions for 1000 different shopowners...
  11. 3 points
    GLWalker

    Ive got a suprise coming

    Support forum created at:
  12. 3 points
    Some people wear shorts year round up here too... I think our dogs are a bit smarter though...
  13. 2 points
    PiLLaO

    Contribution: Auto Backup Database

    Uploaded new update, replace mysql functions by mysqli functions to works with v2.3.4 https://apps.oscommerce.com/1F1Uz&autobackup-database-in-admin
  14. 2 points
    beerbee

    Grid List - Cookie

    Yes tried your code. Best regards Christoph
  15. 2 points
    I have removed your Admin URL (which you managed to post 5 times!). Stock levels work on products_quantity, ensure the product you are looking at has stock = zero.
  16. 2 points
    GLWalker

    Ive got a suprise coming

    A few here have seen it before, it's just been sitting on my desk doing much of nothing, so I am currently packaging it up. The first one to install it owes me a beer steak dinner.
  17. 2 points
    Dan Cole

    Dashboards

    Has anyone developed any new IBar dashboards? If so, show us what you've done. Personally I haven't done much with them lately but the ones I did develop are still in use. I find the whole concept of having a dashboard to monitor things quite helpful and motivating. Here is what my dashboard currently looks like.
  18. 2 points
    @wHiTeHaT I Like this idea as a patch without having to actually change all the HTML. Of course it would be better to actually change the HTML but for now this could be nice. It certainly makes it less painful to look at. I was thinking that you could throw a hook into the admin that could take care of this all for you. That way you can avoid actually editing the original files. Just upload the hook and go. You can disable the original stylesheet via jQuery like so $('link[href="stylesheet.css"]').prop('disabled', true); That would of course go in the hook as well. I use my admin header_tags mod so I could do it with a header_tag instead of a hook.
  19. 1 point
    Dan Cole

    Artificial Intelligence in Marketing

    They can probably detect that Henry since you'd have likely emptied the store. Dan
  20. 1 point
    Omar_one

    Product Listings - Item Per Page

    Try this BR Omar
  21. 1 point
    beerbee

    Grid List - Cookie

    Hi reverted, cleaned cache and cookies works, also tried in private FF window works, thanks a lot! Best regards Christoph
  22. 1 point
    This add to basket button has no link to the out of stock functionality. From memory...it is just some text on the shopping_cart page that changes dependent on the setting of the "mark product out of stock". https://github.com/gburton/Responsive-osCommerce/blob/master/shopping_cart.php#L85-L92 and https://github.com/gburton/Responsive-osCommerce/blob/master/shopping_cart.php#L116-L132 It's fairly useless as is, so the question is ... what next... ideas; create a module that turns off the buy buttons based on the stock level create a module that shows a stock message on the product page create a module that reacts to zero stock when the person is checking out I'm sure you can think of more.
  23. 1 point
    beerbee

    Grid List - Cookie

    Didn't work for me in one of my firefoxes - until I enabled DOM Storage again in about:config, had this one disabled years ago to avoid flash cookies. Best regards Christoph
  24. 1 point
    milerwan

    Admin to Bootstrap NO HTML changes

    That's it ! It works now, thank you. ;)
  25. 1 point
    wHiTeHaT

    Admin to Bootstrap NO HTML changes

    @milerwanWell, you might understand i'm surprised and would normally say "impossible". Is there a way i can see your admin, if so, send me a private message. What happens when hit CTRL+F5 (That is a so called hard reset for the browser cache.)
  26. 1 point
    Dan Cole

    Icloud email servers rejecting emails

    Now that I think about it....you're probably not the right person to ask....I hear your Iguanas fall out of the trees with the first hint of cold weather. Dan
  27. 1 point
    The word function is a php keyword and those are not case-sensitive. See here. But it is considered bad form to use upper-case for keywords. And there is a push to make them case-sensate, which will probably happen at some point. See here.
  28. 1 point
    big_goals

    Ive got a suprise coming

    A very useful video!
  29. 1 point
    wHiTeHaT

    Ive got a suprise coming

    Nice work!!
  30. 1 point
    radhavallabh

    Ive got a suprise coming

    Wow.. Looks amazing in the video!!!!! Cant wait!
  31. 1 point
    That's what I'm talkin' about!!! Nice!
  32. 1 point
    wHiTeHaT

    Admin to Bootstrap NO HTML changes

    Code updated to V6. - Converted jQuery-UI accordion menu to Bootstrap accordion Panels (including localStorage to remember panel states). - Show/Hide the menu. (including localStorage to remember menu state). - Converted header Links to icons - Converted NEW messages styles to bootstrap alerts - Placed OLD message styles under page-Heading - Made Admin login a little fancier. - And a few more additions you might like Previous users: Do not forget to append the [Flot chart resize fix] and the [Font-Awesome css] to admin/includes/template_top.php as the install instructions are changed
  33. 1 point
    Dan Cole

    Ive got a suprise coming

    Is it our belated Christmas present and you're wrapping it? Dan
  34. 1 point
    phi148

    All Products SEO

    Hmm... I seem to have the same problem. Were you able to ever get it to display horizontally?
  35. 1 point
    I have not tried it but in theory it should work the same. It would be necessary to edit the file, look for the lines of code of the alphabet (they are striking, there is no confusion), copy at least one of them, paste it before or after the alphabet and change the letter by a number. Repeat nine more times, one for each number.
  36. 1 point
    Peter1956

    Feedback for Solomono

    I'm a customer from Holland. I needed a filter option in my oscommerce site DierSpeciaal.nl. Serhii build a nice sollution in het website. The filter option works very fast. After that he made some more adjustments is de store. The price for the labour is fair. The performance great and always in the short time!! A minor problem was my lack of writing in English (translated Dutch....), but Serhii simply asked for more information. I wished I had found him earlier .... Peter
  37. 1 point
    UNIX_TIMESTAMP(date(o.customers_dob)) I forgot to use direct calculations and start to use UNIX time format by this reason. Here is a zero equal example code snipet with modulus calculation: where MOD(UNIX_TIMESTAMP(CURDATE())-UNIX_TIMESTAMP(date(c.customers_dob)), " . (int)SETTING_DAYS*86400 . ") = 0 It could be very effective. For example: define('SETTING_DAYS', 365); I use daily mail cron jobs for similar projects.
  38. 1 point
    I have integrated the code and does absolutely nothing of what it says, the page continues as before. It may not work in the current osC version. I'm trying something else, it's for products, so I have to adapt it to manufacturers. There is a lot of useless code that I must remove with caution.
  39. 1 point
    First of all I have to say that the module was not created by me, I have only adapted it to BS. I understand that what you need is that you order alphabetically (it already does) and that on each page a manufacturer leaves in order to be able to locate a particular manufacturer more quickly, right? It is not difficult or complicated, I remember that an addon already did that, possibly an earlier version of this same addon. You just have to copy that code and add it to this addon. If you give me a little time I can search for it and integrate it.
  40. 1 point
    In an effort to improve customer engagement I developed an Anniversary Email a few years ago which has been working well. Customers have been pretty impressed by it and it generates additional sales. As they say an image it worth a thousand words so here is the email so you can see what I've been doing. Over the years I've noticed a bit of a glitch with the database query when we reach year end and since I was upgrading the mailing to use @tgely Gergely's HTML Emails I thought I would see if I could sort out the query. For some reason the query isn't spanning the calendar year so doesn't include records for the previous year when the date range spans the year end. I've tried reworking the query several times but I can seem to figure it out...it's kicking my butt. Does anyone @bruyndoncx perhaps, have any idea how I can rework the query to get it to work on a consistent basis. Here is the query I'm working with. SELECT c.customers_firstname, c.customers_lastname, c.customers_id, c.customers_email_address, c.customers_dob, date_format(c.customers_dob, '%M %D') as date_of_birth, CURDATE(), (YEAR(CURDATE())-YEAR(c.customers_dob)) - (RIGHT(CURDATE(),5) < RIGHT(c.customers_dob,5)) AS number_of_years FROM customers c WHERE concat(year(now()), '', date_format(c.customers_dob,'%m%d')) < date_format(DATE_ADD(now(), INTERVAL 7 DAY),'%Y%m%d') AND concat(year(now()), '', date_format(c.customers_dob,'%m%d')) > date_format(SUBDATE(now(), INTERVAL 3 DAY),'%Y%m%d') AND c.customers_newsletter = '1' AND c.customers_dob != '0000-00-00 00:00:00' AND c.customers_email_address NOT LIKE 'MOPS%' ORDER BY date_of_birth Dan
  41. 1 point
    radhavallabh

    Plural search not working

    I am using below code it helps me remove 's' from the results hence when I search for results of keyword 'Mukut' on my store:- Results come as below:- Search word Mukuts = Results for Mukut Search word muku= Results for Mukut Search word muk= Results for Mukut Search word mukut = Results for Mukut if (isset($HTTP_GET_VARS['keywords'])) { $keywords = tep_db_prepare_input($HTTP_GET_VARS['keywords']); $stringlength = strlen($keywords); if(substr($keywords, $stringlength-1, $stringlength) == 's') $keywords = substr($keywords, 0, $stringlength-1); } So hence for example even if Jackass is searched and 's' is removed Jackas should return results as Jackass only... I also use Smart Search addon in addition and selected searched keywords(like Google)- As Suggest result type. You can also use Extra Product Field addon to add extra search keyword field to products and put in the plural word there. Hence when a customer searches the product it will return in results. Hope it helps.. Regd./ radhavallabh
  42. 1 point
    It shouldn't be too bad (from the shopper's viewpoint) if it's easy to transfer shopping cart items into something like a Wishlist (and then transfer them back the next time). A checkbox for each item and a "Move to Wishlist" button could do it (next to the "Remove" button). The only complication would be if you have more than one of a given item, and wish to move just part of the quantity to the Wishlist. That would have to be handled on an item-by-item basis. The next time the customer signs on, they would be greeted with "You have items on your Wishlist... do you wish to transfer all or part of them to your cart?". Notify the customer if there are duplicate items -- they may have forgotten that they put an item on their Wishlist, and have manually put it in the cart during shopping. It's possible that a customer may wish to pay for part of the cart with one payment method, and the rest of it with one or more other methods. A payment system that permits multiple payment methods (in addition to using a gift card, store credit, or coupon) could be useful, although the intent would still be to pay for the entire cart in one transaction. It might be possible that certain items have to be paid for in certain ways (legal restrictions, etc. -- e.g., your beer and cigarettes can't be paid for with Food Stamps) while keeping out the rest of the cart from this payment method. In that case, first splitting up the cart into multiple "sub carts" might be the answer, or checking all items to be purchased by this payment method (and removed from the cart once payment goes through). All sorts of things might be done with a shopping cart presented at checkout, to transfer Wishlist items in and out, or pay with multiple methods, or pay for certain items with specific payment methods. I think the base would be to have a checkbox for each item, and buttons to do various things (remove, change quantity, move to Wishlist, split quantity into multiple line items, pay with one payment method, etc.).
  43. 1 point
    Hi Folks, For 10 years my 'Order Process' emails have been hit and miss. It's been 6 months since one has sent. After some digging around I found a suggestion at oscmax forum that it may be the mail server blocking due to the words 'Order Process'. I called my host, Godaddy who checked and confirmed there were not restrictions specifically on my account although... After changing ...includes/languages/english/checkout_process.php define('EMAIL_TEXT_SUBJECT', ' Order Process'); to define('EMAIL_TEXT_SUBJECT', ' MyStoreName Order Confirmation'); I am now getting order confirmation emails. I hope this helps others too.
  44. 1 point
    @wHiTeHaT looking very nice.... I guess there is there no way to have an admin module work like a header_tag module would on the catalog side? Also, the logo dimensions off.... I believe it should be 50 x 200.
  45. 1 point
    bruyndoncx

    Admin to Bootstrap NO HTML changes

    I think this is an excellent compatibility fix. It modernizes the backend, allows you to integrate newer bootstrap styled pages, and gradually get rid of the old stuf - if and when time allows. I can see removing old stuff from the most frequently used pages, and not bother with the less frequently used pages and let jquery do it's magic.
  46. 1 point
    Dan Cole

    reCAPTCHA V2 - Looks So Cool

    Gary has one available for a modest cost....the good thing is you'll not only get a module that is super easy to install but you'll be helping to support the ongoing development of osC. A win, win....have a look here.
  47. 1 point
    Gyakutsuki

    Admin to Bootstrap NO HTML changes

    I think it could be a temporary solution until the administration is converted into boostrap.
  48. 1 point
    You might also want to have a look at the Kiss Image Thumbnailer add on. Perhaps it'll do what you want. Dan
  49. 1 point
    freddyshelton

    SMS marketing

    According to me, you should keep in mind the following points: Send sweet and short sms Target your audience Connect with your existing customers Use shorten link goo.gl Must add your contact information in SMS.
  50. 1 point
    When I first started my site i was advised on these forums a long time ago, to add a few addons that would help. I added all products seo as already mentioned, featured products on the front page as well as the new products, and also a cross sell addon on the product pages, but make sure the products were linked in some way ie a plastic kit and the glue required to make it. Apart from these addons I cant think of anything else I have done except try to link different pages, where relevant, within the product description ie I have a kit of parts where links are placed to the individual products within that kit to allow people to easily find the place to buy more. I do have help pages where there are links back to the products also. I do have the manufacturers info box on the site as this has a link to other products from the manufacturer which may also help, but I have no idea whether it does. I used to use another addon from Jack, which placed links to the category and other places on the product pages but never added it to the new BS site but cant remember what it was called now. It may have been his sitemap addon, which I only use the sitemap page now. Whether there is, or was, a benefit to not having the other links on the pages I have never tested. I do have products more than 3 clicks from the home page just to make it easier for customers to find the products they want. Apart from those addons the site is pretty much as it came.
×