Jump to content

GLWalker

♥Ambassador
  • Content count

    842
  • Joined

  • Last visited

  • Days Won

    37

Posts posted by GLWalker


  1. 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!


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


  3. The above code has a small flaw.

     

    in checkout_shipping.php :

    /* WS5 Wholesale - skip free shipping */  
      if (tep_session_is_registered('wholesale_customers_id')) {
    	$free_shipping = false;
      } else {
        $free_shipping = true;
      }
      /* end WS5 Wholesale */
    

    Should be:

    /* WS5 Wholesale - skip free shipping */  
      if (tep_session_is_registered('wholesale_customers_id')) {
    	$free_shipping = false;
      }
      /* end WS5 Wholesale */
    

    In case of @@xChrysalisx set up, it would work as it was, but if one wants to charge shipping to retail customers, then they need to use the updated snippet above. Otherwise the free shipping will always be triggered for retail.

     

    @@xChrysalisx I still recommend changing yours to the above snippet in case you start charging retail shipping in the future. Its too easy to forget making small changes then wondering why something doesn't work later :)


  4. Sorry for the delay.

     

    Ive checked out how your setup on my local, and this is what I came up with.

     

    Set up your flat rate shipping quote for any price you want (in fact I think you could also switch to table or any other method in the future)

     

    Next - set up your free shipping order_total module to allow free shipping for 0.00 in your case.

     

    Now open checkout_shipping.php; around line 101 find:

    // process the selected shipping method
      if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') && isset($HTTP_POST_VARS['formid']) && ($HTTP_POST_VARS['formid'] == $sessiontoken) ) {
    

    Above that add:

      /* WS5 Wholesale - skip free shipping */  
      if (tep_session_is_registered('wholesale_customers_id')) {
    	$free_shipping = false;
      } else {
        $free_shipping = true;
      }
      /* end WS5 Wholesale */
    

    Next open includes/modules/order_total/shipping.php and around line 40 find:

            if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
              $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
              $order->info['total'] -= $order->info['shipping_cost'];
              $order->info['shipping_cost'] = 0;
            }
    

    Replace with this:

      /* WS5 Wholesale - skip free shipping */  
    	if (!tep_session_is_registered('wholesale_customers_id')) {
    
            if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
              $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
              $order->info['total'] -= $order->info['shipping_cost'];
              $order->info['shipping_cost'] = 0;
            }
          }
      /* end WS5 Wholesale */
    

    The change in  checkout_shipping.php file will set the free shipping quotes to false if logged in as a wholesale customer.

    The order_total module change will keep the free shipping quote from triggering on the checkout confirmation page.

     

     

    This should work for any store that does not want to give out free shipping VIA order_total module.


  5. Thanks for your feedback.

     

    I set a new weight option to help deal with different shipping cost. Having free for retail and a price for wholesale could be worked out a few different ways, a lot depends on how you currently are set up to offer the retail free price.

     

    Using the wholesale session is the key though, if it exist - do this, if not then default action.

     

    It does make me think that many selling in bulk may also not want to offer free shipping for orders over a set amount that retail orders enjoy, so that would be a fairly straightforward change in checkout_shipping, looking for a wholesale session.

     

    Helpful snippets for varoius procedures that do not fall too far outside the boundaries of a default set up would be good to post here.

     

    Leave more details about how you are currently setup and we'll see what can be done.


  6. Are you really using 2.2 version? 2.3.4 is the current most secure version, and easier to modify (imo).

     

    Sounds like you already added some weight fields to the attributes? You also have to make changes to the shopping_cart class file to push the weight to the product @ checkout. There is an existing contribution that works just fine for any very version, I think it is called more products weight? No sure though, but its out there.


  7. On the admin side..Enable Dynamic Framework probably not needed. If "no" selected site displays blank page on the front side.. I'd say once the template files are modified, you'er committed and the module has to be installed.

     

    This has been on my list since I read this - Ive got big update coming to this - but for the time being this snippet can be used as a fallback -

     

    <?php  if (class_exists(ht_dynamic_frame)) {
      echo '<body id="' . $frameController->getCssId() . '" class="' . $frameController->getCssClass() . '">';
     } else {
       echo '<body class="three-column">';
     }  ?>
    


  8. It has been a while since I used feed machine, but I was able to create several new feed specs it would follow.

     

    I dont know what Amazon requires, but I am fairly sure that a new configuration for the feed machine could handle it.

     

    Ive had to do some pretty in depth set ups and was always able to by writing a new configuration set for the feed machine. Once you get the new configs worked out, its pretty much fully automatted.

     

    If your excluding certian products from the feed, it may mean writing an exclude array of product_id's or categorie_id's.

     

    Its not always easy writing the options for the feed, but its the best solution I know of- unless you can modify another simular feed existing in the contribution section.

     

    Have you compared the output of any of the existing feed contributions to that of what Amazon requires? You may find one easier to modify for your needs.


  9.  

    Comments.

     

    On the install instructions say: inludes/languages/*english/modules/header_tags/dynamic_frame/framecontroller.php

     

    The folder dynamic_frame isn't needed?

     

    On the admin side..Enable Dynamic Framework probably not needed. If "no" selected site displays blank page on the front side.. I'd say once the template files are modified, you'er committed and the module has to be installed.

     

    Ran Gtmetrix and the scores went up from what they are usually. I've been hitting around 91-92% for index.php, now its 95%.

     

    Looking at a product page, The images boxes have shifted to the left of the body area, with the text below. Whereas before the image cluster was to the right with the text directly to the left. Wondering if this is caused by a image modification I am using that I got from github that Herald had posted. https://github.com/haraldpdl/oscommerce2/commit/45124d4087ad0ed6101efd5fe613c0ce97474892

     

    I'd want to change some text styling, so I presume I can do that in ext/css/frame.css

     

    I'm wondering now how Kymations front page modules and Gergelys head/footer content modules might work into the mix here.

     

     

    That was a typo, should have read inludes/languages/*english/modules/header_tags/ht_dynamic_frame.php - no language file for the other as it is just a class file needed to output the css and id elements. I tried to keep it simple as possible so only the very minimal files needed editing.

     

    If the module is not enabled, then the page will die as soon as it hits the body tag becuase the class file mentioned above is loaded VIA the module. The quickest way around that is to change body back, - <body> -Or- <body class="*desired style">

     

    I never thought about Gtmetrix, but its got to be from the stylesheet, I removed any legacy classes and did a lot of cleanup.

     

    The fonts can be changed in the stylesheet - ext/frame.css, I contemplated not adding the fonts, but we all know the default fonts are very small, and I included a nice font set that I found some time ago that is cross browser/system compatible and renders well on many devices.

     

    A bit of css, or maybe a wrapper div around the images should fix them up.

     

    It should work well the mentioned modules, I'm running something simular on some of the sites I posted in the live shops area. I use a controller for the front page as well and a template loading setup - not really a lot of difference.

     

    The css id really, really, aids in design, while most the site will share the same look - having it can make certian pages take on their own life, good for landing pages or new product promotions.

     

    So far as I know, the only 960 classes are called in the header and footer - but there could be other places. I'm working on wrapping bootstrap3 around it now and thinking of throwing the files in for a starter kit later.

     

    If you view the source code of the install file - it is actually using the same cs framework class, the one column class, and bootstrap2, so you could study that, but it is missning the side clumns, wich would normally wrap under the content in responsive mode. The install file is responsive as is now, and even microformatted.

     

     

    Thanks for the feedback. I hope it can be useful and maybe get some designers a head start.


  10. @@Gyakutsuki

     

    The contribution you mentioned does not do what this sytem does, it appears to control box placement. The one I am developing controls column placement, right, left, and center, as well as add a strating point for design.

     

    It could be used in combination with the dynamic template system if need be.

     

    I had never seen that contribution untill today, it appears to take a lot of modifications, while the one I have built will take about 5 minutes to install with only modifications to 2 files.


  11. This thread is a discussion area for a header tag module that will dynamically control a shops layout by page type.

     

    The module divides the shops various pages into 6 types:

    1. Home Page
       
    2. Product Listing Pages
       
    3. Product Info Pages
       
    4. User/Account Pages
       
    5. Static Pages
       
    6. Checkout pages

    The administrator has the ability to assign a layout to each of these page types, including a default fallback. Each page type can have an individual layout or they may all have the same layout.

     

    No one would really want to change the layout from page to page that much, but there are certain situations where mixing layouts could work out well. For instance, one may want the checkout pages to be full page with no side columns in order to avoid distracting a customer during the order process.

     

    Another instance could be that you want to limit distractions during account sign up. And yet another, maybe a shop would do well to have the home page formatted differently than the rest of the site so as to have room to really work that canvas into something appealing.

     

    As Ive read here recently, sometimes the product listing areas just need to show a lot of information across the board. So while viewing a page full of products, one may see a lot of information, but once they click to view the actual product info page, then they may be greeted by a much simpler page that presents the product fully with no ongoing clutter or other distractions.

     

    There are 7 different layout styles available:

    1. 2 Column 1 Sidebar Left
       
    2. 2 Column 1 Sidebar Right
       
    3. 3 Column Sidebars Both
       
    4. 3 Column 2 Sidebars Left
       
    5. 3 Column 2 Sidebars Right
       
    6. 1 Column Sidebars Bottom
       
    7. Full Page (No Sidebars)

    So how does it work?

     

    The header tag module assigns a class to the body tag in order to use the relevant css style to load the desired layout. There are changes to template top and template bottom in order to get things going. An additional div is placed and the grid_* are removed from the left and right columns.

     

    With these changes the complete structure becomes very flexible. There is one dilemma, and that is the 960gs. It is not bad to have the 960 grid in place, it makes a perfectly fine wrapper, but really, thats about it. Of course thats not a big deal, as there are only a few spots that really call upon it, and 2 have already been removed.

     

    I do not want to write a contribution that tells people to remove the 960 grid in order to use it, so I will not touch much further on that, but will leave this in mind:

    If removed, and the #bodyWrapper div is assigned a max-width of XXXpx and width of 100% - then the complete framework becomes responsive.

     

    Since this module is basically a tool to aid in layout and design, it also goes a step further to lend towards the designer. Maybe theres a hot new product and it just needs to pop out from the other listings - maybe a store has need for landing pages that have their own overall look and feel. It would be nice to do these things and still hook into the primary functions of the cart software, without practically building a whole new set of pages and assets chained thereof.

     

    So -- the answer, and I have tested this here and there through the years, add a unique css ID to the body tag as well. Now every thing on a page can be manipulated through the stylesheet alone. Design wise that is! Move things out of the way, hide things, recolor things, take something from the description, move it elsewhere - -

     

    The module pulls the category name, manufacturer name, product name, HEADING_TITLE || NAVBAR || NAVBAR_2, and outputs that as a css friendly id. It may not sound like much, but it goes a long way. Its not something useful to all, but those that could make use of it would find it indispensable.

     

    Installation is very simple:

    1. Upload 2 files into header tags directory
       
    2. Upload 1 file to header tags language directory
       
    3. Upload 1 new stylesheet
       
    4. Make slight changes to template_top
       
    5. Make slight changes to template_bottom

    Here are some examples using a standard osCommerce 2.3.4 setup. Besides the Dynamic Frame Controller installation, the only other change has been to remove the store logo to allow room to print the CSS ID and Class to screen.

    If you resize your browser while looking at the examples, you'll find that it wants to take on a responsive form, but the grid has it trapped.

     

     

    I dont have an install file written yet, but will be getting that together and would like to know if anyone would like to beta test.

     

    All input on this idea would be greatly appreciated. It can be expanded even further, but I wish to make the most with less, and not create something that just goes too far.


  12. I use ULTIMATE Seo Urls 5 PRO as well as Custom HTTP Error Page

     

    I like the http error page as it logs the http errors so I can correct/manage them, but SEO Urls has it own 404 page so I made a simple change in includes/modules/ultimate_seo_urls5/includes/notfound_404.php

     

    If you use the same set up, just copy the code below and paste over your existing file.

     

    <?php
     /**
     *
     * ULTIMATE Seo Urls 5 PRO ( version 1.1 )
     *
     *
     * @package USU5_PRO
     * @[member='licensed2kill'] http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
     * @[member='Link'] http://www.fwrmedia.co.uk
     * @[member='copyright'] Copyright 2008-2009 FWR Media
     * @[member='copyright'] Portions Copyright 2005 ( rewrite uri concept ) Bobby Easland
     * @[member='author'] Robert Fisher, FWR Media, http://www.fwrmedia.co.uk
     * @lastdev $Author:: Rob											  $:  Author of last commit
     * @lastmod $Date:: 2010-12-21 22:45:02 +0000 (Tue, 21 Dec 2010)	   $:  Date of last commit
     * @version $Rev:: 196												 $:  Revision of last commit
     * @Id $Id:: notfound_404.php 196 2010-12-21 22:45:02Z Rob			 $:  Full Details  
     */
    
     /**
     * Page not found html with 404 header
     * @package USU5_PRO
     *
     * @var array $text - array of text strings to be used in the html
     */	  
     header( "HTTP/1.0 404 Not Found" );
     header('Location: http_error.php?error_id=404&FWR-URL='. $_SERVER['REQUEST_URI']); ?>
    

     

    It will still log the proper 404 header as well as inform you the requested url in your log/txt file.

     

     

    Also, I found a hidden gem, though I have not tried it yet:

    includes/modules/ultimate_seo_urls5/includes/uri_redirects_array.php


  13. what version? 2.3.3.4?

    It started with the addition of the action recorder in 2.3, only 1 I.P. Address allowed per set time limit. You can still get a spam message, but there will not be multiple occurences, or multitudes of spam sent out from your installation.

     

    Of course there are always ways around it, but hardly worth the effort, easier just to move on to someone elses contact form.


  14. Really no point in any of those addons, all are outdated and just add more overhead. The most recent versions of osc already have code in place to deal with spammers and mail abuse.

     

    Adding custom content to the page can easily be done through the language file or even with the banner manager.

     

    If your going to build a fork, think it through very thouroughly. There are already a handful of loaded osCommerce builds available, everyone and his brother, mother, sister and talented dog has been there, done that. Theres a reason the core osCommerce is not "Loaded".

     

    Good Luck

×