Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

GLWalker

♥Ambassador
  • Posts

    845
  • Joined

  • Last visited

  • Days Won

    39

Posts posted by GLWalker

  1. 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 :)

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

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

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

  5. 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">';
     }  ?>
    

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

  7.  

    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.

  8. @@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.

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

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

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

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

  13. @@Julien324

     

    The install files yu may have found in some contributions, do as you imply, they either create or modify database tables, making it a step or 2 shorter for the one installing.

     

    Depending what you have made, there are a few ways to go about it, you could create a mod that links into the oscTemplate class, and then create a module file for it. Again, depending what you made, it could hook into a template block and function, or simply hook to nothing, yet the module file controls adding or removing its functioanility where ever it may be.

     

    Other than that, carefully write out instructions of what to find, and what to replace with, and a set of sql commands to run. You may find it more work than you wish to deal with writing out documentation, and in that case, simply write a thorough description of what your modification will do, and include the editied files with notes to use a file comparision program for instlling + any sql commands.

     

    If anyone else finds good use for the contribution, they may addon/edit/modify it (including istructions) for the use of others.

     

    I hope that did not confuse you, but in time it "may" become clear.

     

    So what do you have in mind to release? Letting the community know my be the first step in the right direction.

  14. I have installed STS on a fresh installation of OSC 2.2 ...

     

    It is strongly advised to move away from the 2.2 platform, especially when doing a fresh instalation. 2.3.X is structured in such a way that STS is no longer needed for ease of theming.

     

    With the time you may very well spend working on STS and building out a theme you are satisfied with, the same could be accompished using the most up to date and secure version of osCommerce.

     

    Another factor to think of is any future addons or updates.

  15. This is probably the simplest way to do it:

     

    open index.php

    find:

    <h1><?php echo HEADING_TITLE; ?></h1>
    

    Under add:

    <?php
     if ($banner = tep_banner_exists('dynamic', 'cat_' . $cPath)) {
      echo tep_display_banner('static', $banner);
     }
    ?>
    

    Next find:

    <h1><?php echo $catname; ?></h1>
    

    And again, under add:

    <?php
     if ($banner = tep_banner_exists('dynamic', 'cat_' . $cPath)) {
      echo tep_display_banner('static', $banner);
     }
    ?>
    

     

    Now in the addmin banner manager, when adding your banner, asign a group name:

    cat_#

    If you have subcategories, then you'll need to create group names as:

    cat_#_#

     

    where # is replaced by the category id.

×
×
  • Create New...