Jump to content
Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by GLWalker

  1. In the live shops area there is a minimal example if browsing in mobile view
  2. 1) The carets are part of the css, and wont toggle, but the markup can be removed from the style and <span class="caret"></span> can be added to the class where you find: $caret = false; depending how using it, you may also need to comment out the javascript where it is set to removeClass 2) Yes, it is intentional, if you look in the class you will find this: //$root_link_title = '<span class="hidden-xs"><span class="glyphicon glyphicon-th-list"></span> ' . $link_title . '</span><li class="divider"></li>'; Uncomment it and a root link will show in the next opened. It could also be marked up to make the category name bring you straight to the root, and then a separate icon to the right to click on, but when subcategories exist, the main point is navigation to get where you need to be and I didn't want to over think things. I could have used just 2 areas in the class to create the dropdown links, but instead used 3 so that deeper customization can be easily done. This section deals with that, the first being the subcategory, second the parent, third the actual list items: if (isset($this->_data[$category_id]) && ($level != 0)) { $result .= '<li class="dropdown dropdown-submenu"><a href="#" tabindex="-1" class="dropdown-toggle" data-toggle="dropdown">'; $caret = false; } elseif(isset($this->_data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level + 1))) { $result .= $this->root_start_string; $result .= '<a href="#" tabindex="-1" class="dropdown-toggle" data-toggle="dropdown">'; $caret = '<span class="caret"></span>'; } else { $result .= $this->child_start_string; $result .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">'; $caret = false; } Have fun :)
  3. GLWalker

    WS5 Wholesale Addon

    This is the support thread for WS5 Wholesale Addon, http://addons.oscommerce.com/info/9086 This addon is a very simple, yet an effective way to handle giving customers a wholesale price. It has been built as lightweight as possible, and more than likely will be best suited as a "starting point" for a shops wholesale needs.
  4. @@burt Oddly enough it is in there, last line of the oscommerce.sql https://github.com/gburton/osCommerce-2334-bootstrap/blob/master/install/oscommerce.sql I double checked the module, and the key is there. hmmmm That part of the install was a direct copy from the 2.3.4 sql
  5. GLWalker

    WS5 Wholesale Addon

    Without looking it almost sounds as if a key is not uninstalling from the configuration table, I'll double check my code when I get a couple minutes. But to answer the question, only the wholesale login box should be installed - it will allow both retail and wholesale login. All it really does is set a session for wholesale user if the customers id exist in the wholesale customers table.
  6. No, please remove <meta charset="utf-8">, leaving in the one with <?php echo CHARSET; ?>
  7. I'll have to try this next time. I always placed what I wanted as a separator like so: $breadcrumb->trail( -my awesome separator that beats the crud out of yours here - ) I now see it does not work on the bootstrapped version. Must be the Bootstrap.css over riding it?
  8. Beer- its not just for breakfast today

    1. ArtcoInc


      I'll drink to that! (hic)

  9. GLWalker

    WS5 Wholesale Addon Install Help

    It looks right. You may need to confirm on your server that they are uploaded.
  10. Yes, the user.css should be there, when I updated things to 2.3.4 I somehow accidentally removed the stylesheet and the call to it in template_top.php
  11. Hi @@piernas, Yes I see you did write some for use with the box modules. However, I am more or less referring to the use of new content modules as introduced in osCommerce V2.3.4. You'll see somewhere else in the thread I have suggested removing any box modules that were previously made to display content in places other than the left/right column in favor of using the new content system.
  12. GLWalker

    Product Info CLASS in 2.4

    Ive been working with the classes on the bootstrap build for use with content modules on the product info page. Heres another positive outcome: This is now all that is needed for the ht_product_title execute function: function execute() { global $PHP_SELF, $oscTemplate, $product; if (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) { $name = $product->getName(); $oscTemplate->setTitle($name . ', ' . $oscTemplate->getTitle()); } }
  13. GLWalker

    Product Info CLASS in 2.4

    In @@acidvertigo product_info.php we can find for PHP V5.4 echo tep_draw_pull_down_menu('id[' . $value . ']', $attributes->getProductsOptionsArray()[$value], $attributes->getSelectedAttribute()[$value]); If using on PHP V5.3 we need to change to: echo tep_draw_pull_down_menu('id[' . $value . ']', $products_options_array[$value], $selected_attribute[$value]); And add this to the page with the others: $products_options_array = $attributes->getProductsOptionsArray(); $selected_attribute = $attributes->getSelectedAttribute(); I know it's supposed to be 5.4 - just making notation for reference reasons.
  14. Good deal - I did notice a small bug after the initial commit but was waiting before adding more : Pretty simple - the required aria-required="true"' needs removed from gender radio's in modules/checkout_new_address.php It prevents a user from leaving the page if selecting an existing address or just changing their mind.
  15. Did you really just go there?
  16. I think that approach would be a win/win situation, and it sort of falls in the same as the login form content module - but with bootstrap is better as we don't need to write any javascript for alpha or omega classes. I have already created content modules for everything on the product_info page - past and present. If you send me a snippet of the code you used for the footer module widths, I'll place that in my existing work.
  17. made a bootstrap navbar look like a tabbed interface - pretty cool, still responsive too.

    1. Tsimi
    2. GLWalker


      all local right now - I'll post another case study in a week

    3. Tsimi


      Awesome! Looking forward to it...

  18. Those 2 statements have been my dilemma. I prefer to change the code in the module 100% over anything else. But keeping it simple for the average Joe makes it complicated. In fact, the more I think about adding before and after content spots, I'm now seeing that I have probably made it even more complicated because unless one knows bootstrap, or whatever framework, it would probably be even more difficult to arrange everything as wanted. I forgot a very important rule here: KISS Revert in process. SO now let me overthink again! Maybe the product info page could be structured in a way like the admins dashboard where everything is arranged in one slot or another grid type fashion - but that's probably BS too. Here we go: F@#*! IT - They need to be setup to look just like the default install. Then when one is building their site, they can go in and manually change the HTML in the module. Besides that, shop owners and themers will more than likely be putting together their own custom modules for desired presentation.
  19. I see you went with a width to determine class used. I think that is probably the best way of handling things in the header and footer. The only place I see having to get extreme as my example is on the actual page where there will / SHOULD be a need to organize presentation. And I do know its really overkill on my part - but thats what I tend to do!
  20. GLWalker

    WS5 Wholesale Addon

    Unless you modified the code in easy populate, there's no way it would have inserted the wholesale price into the wholesale table. I have not looked at easy populate in several years, but do believe it must be capable of inserting into the specials table. If you look at your specials table and products_to_wholesale table in phpMyAdmin, I think you will find the products_to_wholesale table empty, and specials table populated instead. If this is the case, then the data can still be ported from one table to the other, but will take some modifications.
  21. GLWalker

    WS5 Wholesale Addon

    Just checked your site, you did not happen to use the specials form to add in your wholesale prices did you? :( Every product I see has the specials markup around the source. If so let me know in PM - I can help you convert the tables so you don't have to go through all that data entry again, looks like over 6000 products.
  22. GLWalker

    WS5 Wholesale Addon

    I would double check the code in product_info.php to be sure it is checking that the wholesale session is there. It sounds like it is bypassing it, or perhaps your browser has the session set and you are always seeing the wholesale price, so I would also check the loggoff file to be sure the code for unregestering the session is in place.
  23. For better clarification of before/after content here is what I did to the content's template module of customer_greeting: <?php if ( defined('MODULE_CONTENT_INDEX_CUSTOMER_GREETING_BEFORE_CONTENT') && tep_not_null(MODULE_CONTENT_INDEX_CUSTOMER_GREETING_BEFORE_CONTENT) ) { echo MODULE_CONTENT_INDEX_CUSTOMER_GREETING_BEFORE_CONTENT . "\n"; } echo $greeting_string; if ( defined('MODULE_CONTENT_INDEX_CUSTOMER_GREETING_AFTER_CONTENT') && tep_not_null(MODULE_CONTENT_INDEX_CUSTOMER_GREETING_AFTER_CONTENT) ) { echo MODULE_CONTENT_INDEX_CUSTOMER_GREETING_AFTER_CONTENT . "\n"; } and again for text_main: <?php if ( defined('MODULE_CONTENT_INDEX_TEXT_MAIN_BEFORE_CONTENT') && tep_not_null(MODULE_CONTENT_INDEX_TEXT_MAIN_BEFORE_CONTENT) ) { echo MODULE_CONTENT_INDEX_TEXT_MAIN_BEFORE_CONTENT . "\n"; } echo MODULE_CONTENT_INDEX_TEXT_MAIN; if ( defined('MODULE_CONTENT_INDEX_TEXT_MAIN_AFTER_CONTENT') && tep_not_null(MODULE_CONTENT_INDEX_TEXT_MAIN_AFTER_CONTENT) ) { echo MODULE_CONTENT_INDEX_TEXT_MAIN_AFTER_CONTENT . "\n"; } 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: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com 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->title = MODULE_CONTENT_INDEX_CUSTOMER_GREETING_TITLE; $this->description = MODULE_CONTENT_INDEX_CUSTOMER_GREETING_DESCRIPTION; if ( defined('MODULE_CONTENT_INDEX_CUSTOMER_GREETING_STATUS') ) { $this->sort_order = MODULE_CONTENT_INDEX_CUSTOMER_GREETING_SORT_ORDER; $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')); } ob_start(); 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() { return defined('MODULE_CONTENT_INDEX_CUSTOMER_GREETING_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 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() { return array('MODULE_CONTENT_INDEX_CUSTOMER_GREETING_STATUS','MODULE_CONTENT_INDEX_CUSTOMER_GREETING_BEFORE_CONTENT','MODULE_CONTENT_INDEX_CUSTOMER_GREETING_AFTER_CONTENT','MODULE_CONTENT_INDEX_CUSTOMER_GREETING_SORT_ORDER'); } } ?>
  24. @@burt That was super fast - do you have forum x-ray vision to read it before its posted :)