Jump to content
Latest News: (loading..)

GLWalker

♥Ambassador
  • Content count

    842
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by GLWalker

  1. 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.
  2. GLWalker

    Product Info CLASS in 2.4

    Been testing this on the Bootstrap community build, the version I updated to 2.3.4 - So far the parse time is shorter for any product page loaded. And of course upon refresh of same product page its even shorter still. By far this will bring a ton of efficiency to 2.4. :thumbsup: :beer:
  3. @@Gergely I was looking, but cannot find that one. Do you have a link?
  4. 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.
  5. 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.
  6. Writing some 2.3.4 content modules to help customize things a bit. :)

  7. GLWalker

    Product Info CLASS in 2.4

    @@acidvertigo Very nice - looks like it should work well.
  8. 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.
  9. GLWalker

    Product Info CLASS in 2.4

    Very nice work to all. I have reviewed over the latest, http://pastebin.com/fhYzJ2QD and it looks quite efficient to pull practically any data needed, where needed - however - If this were strictly for the product_info page - perfect we query everything we could possibly need and output it right there where we need it. But when it comes to other areas of the site, we don't always needs the reviews or attributes data. I don't know how much overhead it would be, but what if we had a page like new_products, but the products were actually a year old, Show 20 products per page; each one had from 4 to 8 reviews; 12 of the products have at least one attribute and each attribute has a minimum of 3 options. The product class would certainly be more efficient at getting all that data, but what if the only output desired is name, price and image? Really no need to gather the other data. Which brings me more in favor of @@acidvertigo 's approach of splitting each area into its own class. One for products, one for reviews, one for attributes - this lets use build various scenarios off of the product class and hook in with the reviews and attributes only where needed. And to stay on the difficult side of things - one more class should be dedicated to price alone. So we can gather every possible price factor there could be - regular price, special price, because of option values - min price, max price. This class could then be hooked into for possible quantity ordered discounts, sppc, wholesale rates etc; But I think the main factor on whether or not to load all this into one class or split into several is the overhead it pulls. The way we hook in or extend will basically be the same using one class or multiple.
  10. 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?
  11. 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.
  12. 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.
  13. 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
  14. 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:
  15. @@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 :)
  16. 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: http://bsadmin.wsfive.com/admin/categories.php?cPath=&action=new_product Edit Product: http://bsadmin.wsfive.com/admin/categories.php?cPath=21&pID=28&action=new_product Product Preview: http://bsadmin.wsfive.com/admin/categories.php?cPath=21&pID=28&action=new_product_preview demo demo1 I think it may need an additional set of save/cancel buttons elsewhere on the page - would be handy when editing existing products?
  17. It sounds like a solid path forward. Breaking compatibility is something that has been inevitable to happen at one point or another. I think the 2.3 series unlocked a lot of hidden potential in the software, now 2.4 will go even further being free of older legacy code. I can feel it, its going to rock harder than Black Sabbath on a full moon in Birmingham. As for 2.4 addons, there are an existing 7500 to get ideas from. At least 4 or 5 will get recreated :thumbsup:
  18. The categories.php page is about 1/3rd done if anyone would like to check it out. Only the category listing area is formatted and all the actions that go along with categories. This page was a bit trickier than the configuration, but I believe I have it well underway. Feel free to edit and create any categories for testing.
  19. GLWalker

    Advanced TinyMCE

    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
  20. GLWalker

    WS5 Wholesale Addon

    @@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 2.3.3.4 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.
  21. @@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.
  22. @@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.
  23. 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: http://bsadmin.wsfive.com/admin/login.php 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.
×