Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Posts posted by GLWalker

  1. For better clarification of before/after content  here is what I did to the content's template module of customer_greeting:

      echo $greeting_string;

    and again for text_main:


    It may seem like a lot of extra markup - but it prevents having any hard coded opening/closing elements and I think from a design and layout perspective it really opens the doors to building up the page - without having to create a type of drag and drop feature.



    I could open the customer greeting with a before div tag with class of col-md-6, omit the after content, have the text_main loaded with no before content, and then make the after content the closing div that corresponds to the opening div in the customer_greeting module.


    SO then I would have half the page dedicated to these two modules and beside that could place something else in the remaining col-md-6 space.








    I wouldnt limit it to page modules alone - for example - the footer content modules have some hard coded classes for their width in place - a suggested one could be placed in the default install - but then we always have the ability to redo it as desired directly from the module interface.


    Heres also the markup for the main content module for cm_index_customer_greeting:

      osCommerce, Open Source E-Commerce Solutions
      Copyright (c) 2014 osCommerce
      Released under the GNU General Public License
      class cm_index_customer_greeting {
        var $code;
        var $group;
        var $title;
        var $description;
        var $sort_order;
        var $enabled = false;
        function cm_index_customer_greeting() {
          $this->code = get_class($this);
          $this->group = basename(dirname(__FILE__));
            $this->enabled = (MODULE_CONTENT_INDEX_CUSTOMER_GREETING_STATUS == 'True');
        function execute() {
          global $oscTemplate, $customer_id, $customer_first_name;
          if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
            $greeting_string = sprintf(MODULE_CONTENT_INDEX_TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW));
          } else {
            $greeting_string = sprintf(MODULE_CONTENT_INDEX_TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
          include(DIR_WS_MODULES . 'content/' . $this->group . '/templates/customer_greeting.php');
          $template = ob_get_clean();
          $oscTemplate->addContent($template, $this->group);
        function isEnabled() {
          return $this->enabled;
        function check() {
        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 Customer Greeting', 'MODULE_CONTENT_INDEX_CUSTOMER_GREETING_STATUS', 'True', 'Should the customer greeting be shown on the index page?', '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, set_function, date_added) values ('Before Content', 'MODULE_CONTENT_INDEX_CUSTOMER_GREETING_BEFORE_CONTENT', '<div class=\"contentText\">', 'Insert here item such as opening div tag with desired class, leave blank for nothing.','6', '0', 'tep_draw_textarea_field(\'configuration[MODULE_CONTENT_INDEX_CUSTOMER_GREETING_BEFORE_CONTENT]\', false, 30, 3, ', now())");   
    	   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 ('After Content', 'MODULE_CONTENT_INDEX_CUSTOMER_GREETING_AFTER_CONTENT', '</div>', 'Insert here item such as closing div tag, leave blank for nothing.', '6', '0', 'tep_draw_textarea_field(\'configuration[MODULE_CONTENT_INDEX_CUSTOMER_GREETING_AFTER_CONTENT]\', false, 30, 3, ',  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_CONTENT_INDEX_CUSTOMER_GREETING_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
        function remove() {
          tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
        function keys() {

  2. As if were not all busy with a ton of repo's and loose ends to tie - here's some more food for thought


    I have been making the elements generally found on the home page (heading, customer_greeting, text_main, new_products) to take advantage of the content modules introduced in 2.3.4 - I even place extra markup in each module to give one the ability to add their own before and after content - the idea is you can place your own opening div with desired markup, or omit completely.


    This gives you the ability to bundle the modules together in any sort of layout desired. By default upon initial installation of the content module, the before content is '<div class=\"contentText\">' and after content is '</div>'.


    Ive been able to place the main text on one side with a neat tidy stack of new products to the other side - thats just a small example - the outcomes are limitless - just craft the before/after content with the sort order of each content module, and you can create all kinds of layouts.


    SO - also have been experimenting with acidvertigo's classes created for 2.4 . I made a new class for manufacturers and use it to output the manufacturer_info content box data. Now the idea is to create new content modules for the product_info page. If done the way I explained above, then the layouts that can be achieved will be practically unlimited.


    With that said I do see a need to clean up some parts of the community build in order to take better advantage of the content modules (if it makes the upgrade to 2.3.4).

    • Some of the info boxes were coded to display in the product info page. These should be reverted back to box modules only, and a new set of content modules created for use in their place.
    • Some new box modules were introduced that display only in the header. These should be moved to content modules with a header group.
    • The infoboxes and footer follow the same pattern - and my suggestion is the same.

    Using the classes - including the newly implemented category_tree -  and content modules we could have a pretty damn robust community build going on here.



    Well, for the time being I'll let this simmer while I return to the admin work.

  3. products_attributes.php is done. Lots of changes html wise, as well as converting all forms, selects and inputs to use their respective functions. A few tables removed in favor of some switch/case actions.


    Will be committing to my admin branch in due time.




    On another note, I have updated the BootStrap build to V2.3.4 - https://github.com/GLWalker/osCommerce-2334-bootstrap/tree/HEAD


    Ive updated the install file merging changes from V2.3.4 as well as adding in the newer header_tag modules in this Bootstrap build and turning on box modules.


    After installation it should be setup like the demo @ http://template.me.uk/2334bs3/


    Any and all testers would be great. I have sent a push request to merge this - so the more that can have a look, the better - there are lots of changes and Gary cannot do all the testing and looking at files alone.


    Besides the devs that can eyeball code, the easiest way to test is download the zip from https://github.com/GLWalker/osCommerce-2334-bootstrap/tree/HEAD  and install. 


    This update has no Bootstrap Admin files, but DOES include all admin file changes from the default 2.3.4 build.

  4. One issue I've noticed from the start -


    When clicking on a button/row in a table to initiate an action,  the page needs to reload on that some area - not such a big deal on a desktop, but for smaller devices it would make the workflow a lot better.


    I tried using anchors, but that's jumpy and cumbersome and adds ridiculous markup to everything.


    Maybe something like scrollspy? http://getbootstrap.com/javascript/#scrollspy


    Anyone have an ideas/advice?

  5. Back on topic -


    The products attributes file is one of those monsters of a file, lots of actions, lots of page results, a lot of data to look at.


    I see it uses a lot of html for forms and inputs and selects, rather than taking advantage of the functions.


    It was probably the nature of the beast - it works, so let it be!


    As I'm styling it I am converting all to use the carts functions, and consolidating down the tables for deleting and edition options and values into cases that will display in the existing list of options/values when the action is initiated.


    Testing each step along the way and all is well so far. Of course halfway through I got tired of looking at the page results and had to Bootstrap that too :)


    Anyhow - a very chopped version is available that shows the way its going.

  6. Whats been changed so far is @ https://github.com/GLWalker/oscommerce2-bs-admin\


    I recently went through and balanced all the html brackets so it has a perfect nesting when viewing source - if anyone takes on any files, always start the first HTML tag, usually <div class="page-header"> @ 10 spaces and follow on down.


    I try to code classes in html using this method:


    <div class="col-xs-* col-sm-* col-md-*  any-other-class">  


    where applicable I always start with the mobile classes and work up, then place others at the end. If ever a need for a mass search and replace it could help.


    I do have some trouble with Git's software on a Mac so the comments are not as I would like.

  7. categories.php file is complete. I believe I have it set to render usable across all devices - Some of the xs view Im not super happy with, but I am probably being too picky - my objective was to space the row buttons enough that they are not inadvertently clicked - I am pretty happy with desktop and tablet view, though I only tested tablet on simulator.


    As this page went one I also changed details to the configuration page.


    Next will be products_attributes.php

  8. When deleting a large image a popup shows up asking to confirm. That popup is javascript right?

    And the text that says "this product was added on...bla, bla, bla..." doesn't break to the next line in xs view mode.


    Thats actually just an error message, as also used in the message stack. I'll have to check if it has an issue breaking @ xs size

    Product add on is a bootstrap label, their not made to break, which has been a pain in the but for another project I did when it came down to mobile view.




    That's a very good point - I could see it being done as well.  For the most part it should be much easier to do with this admin VS the current admin.


    I think some small tweaks to the stylesheet can fix everything up. I keep going back and forth tweaking things as I build - upon completion of the categories.php I have a cut list to take care of :)

  9. I took the button group wrapper away from the "Back | New Category | New Product" buttons, I think it lays out a bit better and feel the space between buttons is really needed on an administration interface to avoid accidental clicks.


    Ive since updated the products_new area, and product_preview - still no actions on the product rows, its next.


    I have also added in 2 additional languages for demonstration of everything as a whole.


    New Product:



    Edit Product:



    Product Preview:






    I think it may need an additional set of save/cancel buttons elsewhere on the page - would be handy when editing existing products?

  10. This is the help thread for Advanced TinyMCE. Though it is not a true addon in the sense of what an addon is, I see a lot of users that wish to integrate a WYSIWYG editor into various places of their shop.

    I have went over a lot of places you can use this, and created the various functions and TinyMCE toolbars for use in each area.


    If you can think of another area to use it in, let the ideas flow.


    Please note that this implementation makes use of a CDN to serve the TinyMCE script to your website. If you feel the need to host the TinyMCE files yourself, upload them to your catalog/ext/ directory and change the path to the script within template_top(s).


    Addon found here: http://addons.oscommerce.com/info/9124

  11. @@RMD27

    Well its always good practice to go with the latest versions, as with osCommerce when there is a new version its not a bunch of fluff, but actually beneficial changes.


    If you have too much put into your existing site and wish not to upgrade, the code that is located in the content module can be ported over without toooo much hassle. Its basically the check for a wholesale id. You can compare the content module code to the similar code inside login.php on and see where the query should go. All other files that are modified are pretty much the same in any 2.3 version.


    You will run into one other hickup with the database tables and module setting though. You could convert everything to a header_tag module and install that way, or create a new group in the configuration table and import the configuration values there, and then manually dump the 2 new tables as well.


    Let me know which way you want to proceed so I can be of more help.

  12. @@Tsimi


    Thanks for feedback. It does seem that the sidebar does slide in a bit rough on mobile devices. Looks like it should also take the screen back to top of page as well.


    As for flot, it has to stay. I'm trying to keep everything as close to the default build, changing only what is needed for the theme.


    Now that Ive got everything wrapped in the theme and the configuration page working smoothly, I can move on to the other 40 pages.


    I do have current changes committed to github branch @ https://github.com/GLWalker/oscommerce2-bs-admin


    Before committing I weeded through the files that compromise the actual theme/template and corrected all HTML indention so that it renders perfectly balanced - with the exception of dashboard modules - thought it a bit anal retentive to add extra indention to the html on each module just for that.

  13. @@altoid


    Thanks for the feedback - thus far I have only been able to see it on a Mac and iPhone.


    I notice when resizing the screen that sometimes the flot charts text overflows, generally fixed with a refresh. Maybe I need to nest them in an additional wrapper.



    For everyone else - the primary page that I need input on is anything in the configuration menu, minus store_logo and admin. This is what I would like solid input on before continuing on, as that will be the basis of many, many, many pages.

  14. Great, so get to work on the community build to;


    4.  update the admin side to bootstrap



    So in keeping with the community build, I have started on an initial admin makeover using the latest bootstrap, and the 23 Github branch, based on 2.3.4


    It is an offcanvas layout, which makes viewing on small devices relatively painless, though we all know it is impractical to manage a shop and anything smaller than a tablet, there are those times you need a quick view.


    So far only a few files that must be changed to achieve the admins new look have been edited:

    • template_top.php
    • template_bottom.php
    • header.php
    • footer.php
    • column_left.php
    • New File: admin/ext/stylesheet.css

    In addition to those files, these have been modified to reflect how the overall theme will look and perform:

    • index.php
    • configuration.php
    • login.php
    • includes/functions/html_output.php
    • includes/functions/general.php
    • All dashboard modules

    The theme is based on Bootstrap but custom styles so not as to look like the blah blah basic BS. In creating the theme I kept in mind the history of the osCommerce admin - Simply header/footer - functional left column - those gray an blue shades!


    Changes I would like feedback on before moving to other pages:


    Overall rendering in different devices and OS systems.


    The new method of editing/viewing info as seen in configuration.php - I have bypassed the box class in favor of simply opening a new row where all actions may be carried out. The info previously loaded into the box still only loads once per row selected and only for that row selected.


    One main reason for removing the right box was for room on smaller devices.


    An online version is located here:


    User: demo

    Pass: demo1


    I will upload the changes to GIT as soon as I figure out how to make a branch of my fork.

  15. I told you how to do it properly. Don't know why you would want to go about it wrong.


    But hey, what do I know, lets just pull all kinds of files from the admin and replicate and override existing classes the site needs to run properly. Go for it!

  16. I'm not sure what your trying to do, but the easiest thing would be to copy that function as found in the admin into the catalog side, probably paste it into catalog/includes/functions/general.php ~ however, if the function has any dependencies of other classes or functions found only in the admin, you will have to port them over to the catalog side as well.