Jump to content

GLWalker

♥Ambassador
  • Content count

    842
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by GLWalker

  1. 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.
  2. 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.
  3. Did you really just go there?
  4. 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.
  5. made a bootstrap navbar look like a tabbed interface - pretty cool, still responsive too.

    1. Tsimi
    2. GLWalker

      GLWalker

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

    3. Tsimi

      Tsimi

      Awesome! Looking forward to it...

  6. 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.
  7. 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!
  8. 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.
  9. 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.
  10. 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.
  11. 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'); } } ?>
  12. @@burt That was super fast - do you have forum x-ray vision to read it before its posted :)
  13. 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.
  14. @@Gergely I was looking, but cannot find that one. Do you have a link?
  15. I cannot duplicate this either - my first thought would be to check the path to jQuery, but it let the images be added already, so that rules that out.
  16. Here's a super easy special module that follows the same layout as the new products module. Im going to post the code here and let you put it together! It is so similar to the new products module, some may swear I just copied it and just changes 3 things! Maybe I did, maybe I didn't, maybe I used copy and paste, maybe I typed it all out. You will NEVER know. Step 1) Navigate to your catalog/includes/modules/ directory. Create a new .php file and name it specials.php Step 2) Open the new file and paste this inside: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $special_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, products_price, if(s.status, s.specials_new_products_price, p.products_price) as products_special_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $special_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, products_price, if(s.status, s.specials_new_products_price, p.products_price) as products_special_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $num_special_products = tep_db_num_rows($special_products_query); if ($num_special_products > 0) { $special_prods_content = NULL; while ($special_products = tep_db_fetch_array($special_products_query)) { $special_prods_content .= '<div class="col-sm-6 col-md-4">'; $special_prods_content .= ' <div class="thumbnail">'; $special_prods_content .= ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $special_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $special_products['products_image'], $special_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; $special_prods_content .= ' <div class="caption">'; $special_prods_content .= ' <p class="text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $special_products['products_id']) . '">' . $special_products['products_name'] . '</a></p>'; $special_prods_content .= ' <hr>'; $special_prods_content .= ' <p class="text-center text-danger"><del class="text-muted">' . $currencies->display_price($special_products['products_price'], tep_get_tax_rate($special_products['products_tax_class_id'])) . '</del><br>' . $currencies->display_price($special_products['products_special_price'], tep_get_tax_rate($special_products['products_tax_class_id'])) . '</p>'; $special_prods_content .= ' <div class="text-center">'; $special_prods_content .= ' <div class="btn-group">'; $special_prods_content .= ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'products_id=' . $special_products['products_id']) . '" class="btn btn-default" role="button">' . SMALL_IMAGE_BUTTON_VIEW . '</a>'; $special_prods_content .= ' <a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $special_products['products_id']) . '" class="btn btn-success" role="button">' . SMALL_IMAGE_BUTTON_BUY . '</a>'; $special_prods_content .= ' </div>'; $special_prods_content .= ' </div>'; $special_prods_content .= ' </div>'; $special_prods_content .= ' </div>'; $special_prods_content .= '</div>'; } ?> <h3><?php echo sprintf(TABLE_HEADING_SPECIAL_PRODUCTS, strftime('%B')); ?></h3> <div class="row"> <?php echo $special_prods_content; ?> </div> <?php } ?> Step 3) Open catalog/index.php Find in 2 areas: <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?> Depending what order you want to show the specials paste this in before or after the above: <?php include(DIR_WS_MODULES . 'specials.php'); ?> Step 4) Open catalog/includes/languages/* / index.php Add this line where ever you feel like: define('TABLE_HEADING_SPECIAL_PRODUCTS', '%s Specials!'); Done! Usage: If you want to limit the products that show, inside includes/modules/specials.php change MAX_DISPLAY_NEW_PRODUCTS to any number desired.
  17. Writing some 2.3.4 content modules to help customize things a bit. :)

  18. 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.
  19. 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?
  20. 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.
  21. 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.
  22. 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
  23. Just added white-space: pre-line; display: inline-block; to label and looks good now, the pre-line makes it wrap and inline-block keeps the background color a solid block so it doesn't cut off when the text goes to a new line :thumbsup:
  24. @@Tsimi 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. @@wHiTeHaT 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 :)
×