<?php
/*
  WebMakers.com Added: Additional Functions
  Written by Linda McGrath osCOMMERCE@WebMakers.com
  http://www.thewebmakerscorner.com

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License
*/

////
// Verify Free Shipping or Regular Shipping modules to show
  function tep_get_free_shipper($chk_shipper) {
  global $cart;
  $show_shipper =false;
    switch (true) {
      case ( ($chk_shipper =='freeshipper' and $cart->show_weight() == 0) ):
        $show_shipper=true;
        break;
      case ( ($chk_shipper !='freeshipper' and $cart->show_weight() == 0) ):
        $show_shipper=false;
        break;

      case ( ($chk_shipper =='freeshipper' and $cart->show_weight() != 0) ):
        $show_shipper=false;
        break;
      case ( ($chk_shipper !='freeshipper' and $cart->show_weight() != 0) ):
        $show_shipper=true;
        break;
      default:
        $show_shipper=false;
        break;
    }

  return $show_shipper;
  }


////
// Verify Free Charge or Regular Payment methods to show
  function tep_get_free_charger($chk_module) {
  global $cart;

  $show_it =false;
    switch (true) {
      case ( ($chk_module =='freecharger' and ($cart->show_total()==0 and $cart->show_weight() == 0)) ):
        $show_it=true;
        break;
      case ( ($chk_module !='freecharger' and ($cart->show_total()==0 and $cart->show_weight() == 0)) ):
        $show_it=false;
        break;

      case ( ($chk_module =='freecharger' and ($cart->show_total()!=0 or $cart->show_weight() != 0)) ):
        $show_it=false;
        break;
      case ( ($chk_module !='freecharger' and ($cart->show_total()!=0 or $cart->show_weight() != 0)) ):
        $show_it=true;
        break;
    }

  return $show_it;
  }

////

?>
