[TEP-COMMIT] CVS: catalog/catalog/includes/modules/order_total ot_loworderfee.php,1.11,1.12 ot_shipping.php,1.15,1.16

Harald Ponce de Leon <[email protected]>
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Update of /cvsroot/tep/catalog/catalog/includes/modules/order_total
In directory sc8-pr-cvs1:/tmp/cvs-serv27561/modules/order_total

Modified Files:
	ot_loworderfee.php ot_shipping.php 
Log Message:
use the new session and tax classes


Index: ot_loworderfee.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/order_total/ot_loworderfee.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ot_loworderfee.php	14 Feb 2003 06:03:32 -0000	1.11
+++ ot_loworderfee.php	17 Nov 2003 20:27:59 -0000	1.12
@@ -24,7 +24,7 @@
     }
 
     function process() {
-      global $order, $currencies;
+      global $osC_Tax, $order, $currencies;
 
       if (MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE == 'true') {
         switch (MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION) {
@@ -39,8 +39,8 @@
         }
 
         if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) {
-          $tax = tep_get_tax_rate(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']);
-          $tax_description = tep_get_tax_description(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']);
+          $tax = $osC_Tax->getTaxRate(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']);
+          $tax_description = $osC_Tax->getTaxRateDescription(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']);
 
           $order->info['tax'] += tep_calculate_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax);
           $order->info['tax_groups']["$tax_description"] += tep_calculate_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax);

Index: ot_shipping.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/order_total/ot_shipping.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ot_shipping.php	7 Feb 2003 22:01:57 -0000	1.15
+++ ot_shipping.php	17 Nov 2003 20:27:59 -0000	1.16
@@ -24,7 +24,7 @@
     }
 
     function process() {
-      global $order, $currencies;
+      global $osC_Session, $osC_Tax, $order, $currencies;
 
       if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
         switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
@@ -45,12 +45,14 @@
         }
       }
 
-      $module = substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_'));
+      $shipping =& $osC_Session->value('shipping');
+
+      $module = substr($shipping['id'], 0, strpos($shipping['id'], '_'));
 
       if (tep_not_null($order->info['shipping_method'])) {
         if ($GLOBALS[$module]->tax_class > 0) {
-          $shipping_tax = tep_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
-          $shipping_tax_description = tep_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
+          $shipping_tax = $osC_Tax->getTaxRate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
+          $shipping_tax_description = $osC_Tax->getTaxRateDescription($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
 
           $order->info['tax'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
           $order->info['tax_groups']["$shipping_tax_description"] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.