[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/classes/ -> order.php (source)

   1  <?php
   2  /*

   3  $Id: order.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13    class order {
  14      var $info, $totals, $products, $customer, $delivery, $content_type;
  15  
  16      function order($order_id = '') {
  17        $this->info = array();
  18        $this->totals = array();
  19        $this->products = array();
  20        $this->customer = array();
  21        $this->delivery = array();
  22  
  23        if (tep_not_null($order_id)) {
  24          $this->query($order_id);
  25        } else {
  26          $this->cart();
  27        }
  28      }
  29  
  30      function query($order_id) {
  31        global $languages_id;
  32  
  33        $order_id = tep_db_prepare_input($order_id);
  34  
  35        $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
  36        $order = tep_db_fetch_array($order_query);
  37  
  38        $totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order");
  39        while ($totals = tep_db_fetch_array($totals_query)) {
  40          $this->totals[] = array('title' => $totals['title'],
  41                                  'text' => $totals['text']);
  42        }
  43  
  44        $order_total_query = tep_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_total'");
  45        $order_total = tep_db_fetch_array($order_total_query);
  46  
  47        $shipping_method_query = tep_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_shipping'");
  48        $shipping_method = tep_db_fetch_array($shipping_method_query);
  49  
  50        $order_status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . (int)$languages_id . "'");
  51        $order_status = tep_db_fetch_array($order_status_query);
  52  
  53        $this->info = array('currency' => $order['currency'],
  54                            'currency_value' => $order['currency_value'],
  55                            'payment_method' => $order['payment_method'],
  56                            'cc_type' => $order['cc_type'],
  57                            'cc_owner' => $order['cc_owner'],
  58                            'cc_number' => $order['cc_number'],
  59                            'cc_expires' => $order['cc_expires'],
  60                            'date_purchased' => $order['date_purchased'],
  61                            'orders_status' => $order_status['orders_status_name'],
  62                            'last_modified' => $order['last_modified'],
  63                            'total' => strip_tags($order_total['text']),
  64                            'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));
  65  
  66        $this->customer = array('id' => $order['customers_id'],
  67                                'name' => $order['customers_name'],
  68                                'company' => $order['customers_company'],
  69                                'street_address' => $order['customers_street_address'],
  70                                'suburb' => $order['customers_suburb'],
  71                                'city' => $order['customers_city'],
  72                                'postcode' => $order['customers_postcode'],
  73                                'state' => $order['customers_state'],
  74                                'country' => array('title' => $order['customers_country']),
  75                                'format_id' => $order['customers_address_format_id'],
  76                                'telephone' => $order['customers_telephone'],
  77                                'email_address' => $order['customers_email_address']);
  78  
  79        $this->delivery = array('name' => trim($order['delivery_name']),
  80                                'company' => $order['delivery_company'],
  81                                'street_address' => $order['delivery_street_address'],
  82                                'suburb' => $order['delivery_suburb'],
  83                                'city' => $order['delivery_city'],
  84                                'postcode' => $order['delivery_postcode'],
  85                                'state' => $order['delivery_state'],
  86                                'country' => array('title' => $order['delivery_country']),
  87                                'format_id' => $order['delivery_address_format_id']);
  88  
  89        if (empty($this->delivery['name']) && empty($this->delivery['street_address'])) {
  90          $this->delivery = false;
  91        }
  92  
  93        $this->billing = array('name' => $order['billing_name'],
  94                               'company' => $order['billing_company'],
  95                               'street_address' => $order['billing_street_address'],
  96                               'suburb' => $order['billing_suburb'],
  97                               'city' => $order['billing_city'],
  98                               'postcode' => $order['billing_postcode'],
  99                               'state' => $order['billing_state'],
 100                               'country' => array('title' => $order['billing_country']),
 101                               'format_id' => $order['billing_address_format_id']);
 102  
 103        $index = 0;
 104        $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
 105        while ($orders_products = tep_db_fetch_array($orders_products_query)) {
 106          $this->products[$index] = array('qty' => $orders_products['products_quantity'],
 107                                      'id' => $orders_products['products_id'],
 108                                          'name' => $orders_products['products_name'],
 109                                          'model' => $orders_products['products_model'],
 110                                          'tax' => $orders_products['products_tax'],
 111                                          'price' => $orders_products['products_price'],
 112                                          'final_price' => $orders_products['final_price']);
 113  
 114  // BOF: MOD - Separate Pricing Per Customer

 115          if(!tep_session_is_registered('sppc_customer_group_id')) { 
 116            $customer_group_id = '0';
 117          } else {
 118            $customer_group_id = $sppc_customer_group_id;
 119          }
 120  
 121          if ($customer_group_id != '0'){    
 122            $orders_customers_price = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where customers_group_id = '". $customer_group_id . "' and products_id = '" . $products[$i]['id'] . "'");          
 123            if ($orders_customers = tep_db_fetch_array($orders_customers_price)){    
 124              $this->products[$index] = array('price' => $orders_customers['customers_group_price'], 'final_price' => $orders_customers['customers_group_price']);
 125            }                              
 126          }
 127  // EOF: MOD - Separate Pricing Per Customer

 128          $subindex = 0;
 129          $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");
 130          if (tep_db_num_rows($attributes_query)) {
 131            while ($attributes = tep_db_fetch_array($attributes_query)) {
 132              $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],
 133                                                                       'value' => $attributes['products_options_values'],
 134                                                                       'prefix' => $attributes['price_prefix'],
 135                                                                       'price' => $attributes['options_values_price']);
 136  
 137              $subindex++;
 138            }
 139          }
 140  
 141          $this->info['tax_groups']["{$this->products[$index]['tax']}"] = '1';
 142  
 143          $index++;
 144        }
 145      }
 146  
 147      function cart() {
 148        global $HTTP_POST_VARS, $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $comments, $customer_default_address_id;
 149  
 150        $this->content_type = $cart->get_content_type();
 151  
 152        if ( ($this->content_type != 'virtual') && ($sendto == false) ) {
 153          $sendto = $customer_default_address_id;
 154        }
 155        $customer_address_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id");
 156        $customer_address = tep_db_fetch_array($customer_address_query);
 157  
 158        if (is_array($sendto) && !empty($sendto)) {
 159          $shipping_address = array('entry_firstname' => $sendto['firstname'],
 160                                    'entry_lastname' => $sendto['lastname'],
 161                                    'entry_company' => $sendto['company'],
 162                                    'entry_street_address' => $sendto['street_address'],
 163                                    'entry_suburb' => $sendto['suburb'],
 164                                    'entry_postcode' => $sendto['postcode'],
 165                                    'entry_city' => $sendto['city'],
 166                                    'entry_zone_id' => $sendto['zone_id'],
 167                                    'zone_name' => $sendto['zone_name'],
 168                                    'entry_country_id' => $sendto['country_id'],
 169                                    'countries_id' => $sendto['country_id'],
 170                                    'countries_name' => $sendto['country_name'],
 171                                    'countries_iso_code_2' => $sendto['country_iso_code_2'],
 172                                    'countries_iso_code_3' => $sendto['country_iso_code_3'],
 173                                    'address_format_id' => $sendto['address_format_id'],
 174                                    'entry_state' => $sendto['zone_name']);
 175        } elseif (is_numeric($sendto)) {
 176          $shipping_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$sendto . "'");
 177          $shipping_address = tep_db_fetch_array($shipping_address_query);
 178        } else {
 179          $shipping_address = array('entry_firstname' => null,
 180                                    'entry_lastname' => null,
 181                                    'entry_company' => null,
 182                                    'entry_street_address' => null,
 183                                    'entry_suburb' => null,
 184                                    'entry_postcode' => null,
 185                                    'entry_city' => null,
 186                                    'entry_zone_id' => null,
 187                                    'zone_name' => null,
 188                                    'entry_country_id' => null,
 189                                    'countries_id' => null,
 190                                    'countries_name' => null,
 191                                    'countries_iso_code_2' => null,
 192                                    'countries_iso_code_3' => null,
 193                                    'address_format_id' => 0,
 194                                    'entry_state' => null);
 195        }
 196  
 197        if (is_array($billto) && !empty($billto)) {
 198          $billing_address = array('entry_firstname' => $billto['firstname'],
 199                                   'entry_lastname' => $billto['lastname'],
 200                                   'entry_company' => $billto['company'],
 201                                   'entry_street_address' => $billto['street_address'],
 202                                   'entry_suburb' => $billto['suburb'],
 203                                   'entry_postcode' => $billto['postcode'],
 204                                   'entry_city' => $billto['city'],
 205                                   'entry_zone_id' => $billto['zone_id'],
 206                                   'zone_name' => $billto['zone_name'],
 207                                   'entry_country_id' => $billto['country_id'],
 208                                   'countries_id' => $billto['country_id'],
 209                                   'countries_name' => $billto['country_name'],
 210                                   'countries_iso_code_2' => $billto['country_iso_code_2'],
 211                                   'countries_iso_code_3' => $billto['country_iso_code_3'],
 212                                   'address_format_id' => $billto['address_format_id'],
 213                                   'entry_state' => $billto['zone_name']);
 214        } else {
 215          $billing_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$billto . "'");
 216          $billing_address = tep_db_fetch_array($billing_address_query);
 217        }
 218  
 219        if ($this->content_type == 'virtual') {
 220          $tax_address = array('entry_country_id' => $billing_address['entry_country_id'],
 221                               'entry_zone_id' => $billing_address['entry_zone_id']);
 222        } else {
 223          $tax_address = array('entry_country_id' => $shipping_address['entry_country_id'],
 224                               'entry_zone_id' => $shipping_address['entry_zone_id']);
 225        }
 226  
 227        $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,
 228                            'currency' => $currency,
 229                            'currency_value' => $currencies->currencies[$currency]['value'],
 230                            'payment_method' => $payment,
 231                            'cc_type' => '',
 232                            'cc_owner' => '',
 233                            'cc_number' => '',
 234                            'cc_expires' => '',
 235                            'shipping_method' => $shipping['title'],
 236                            'shipping_cost' => $shipping['cost'],
 237                            'subtotal' => 0,
 238                            'tax' => 0,
 239                            'tax_groups' => array(),
 240                            'comments' => (tep_session_is_registered('comments') && !empty($comments) ? $comments : ''));
 241  
 242        if (isset($GLOBALS[$payment]) && is_object($GLOBALS[$payment])) {
 243          if (isset($GLOBALS[$payment]->public_title)) {
 244            $this->info['payment_method'] = $GLOBALS[$payment]->public_title;
 245          } else {
 246            $this->info['payment_method'] = $GLOBALS[$payment]->title;
 247          }
 248  
 249          if ( isset($GLOBALS[$payment]->order_status) && is_numeric($GLOBALS[$payment]->order_status) && ($GLOBALS[$payment]->order_status > 0) ) {
 250            $this->info['order_status'] = $GLOBALS[$payment]->order_status;
 251          }
 252        }
 253  
 254        $this->customer = array('firstname' => $customer_address['customers_firstname'],
 255                                'lastname' => $customer_address['customers_lastname'],
 256                                'company' => $customer_address['entry_company'],
 257                                'street_address' => $customer_address['entry_street_address'],
 258                                'suburb' => $customer_address['entry_suburb'],
 259                                'city' => $customer_address['entry_city'],
 260                                'postcode' => $customer_address['entry_postcode'],
 261                                'state' => ((tep_not_null($customer_address['entry_state'])) ? $customer_address['entry_state'] : $customer_address['zone_name']),
 262                                'zone_id' => $customer_address['entry_zone_id'],
 263                                'country' => array('id' => $customer_address['countries_id'], 'title' => $customer_address['countries_name'], 'iso_code_2' => $customer_address['countries_iso_code_2'], 'iso_code_3' => $customer_address['countries_iso_code_3']),
 264                                'format_id' => $customer_address['address_format_id'],
 265                                'telephone' => $customer_address['customers_telephone'],
 266                                'email_address' => $customer_address['customers_email_address']);
 267  
 268        $this->delivery = array('firstname' => $shipping_address['entry_firstname'],
 269                                'lastname' => $shipping_address['entry_lastname'],
 270                                'company' => $shipping_address['entry_company'],
 271                                'street_address' => $shipping_address['entry_street_address'],
 272                                'suburb' => $shipping_address['entry_suburb'],
 273                                'city' => $shipping_address['entry_city'],
 274                                'postcode' => $shipping_address['entry_postcode'],
 275                                'state' => ((tep_not_null($shipping_address['entry_state'])) ? $shipping_address['entry_state'] : $shipping_address['zone_name']),
 276                                'zone_id' => $shipping_address['entry_zone_id'],
 277                                'country' => array('id' => $shipping_address['countries_id'], 'title' => $shipping_address['countries_name'], 'iso_code_2' => $shipping_address['countries_iso_code_2'], 'iso_code_3' => $shipping_address['countries_iso_code_3']),
 278                                'country_id' => $shipping_address['entry_country_id'],
 279                                'format_id' => $shipping_address['address_format_id']);
 280  
 281        $this->billing = array('firstname' => $billing_address['entry_firstname'],
 282                               'lastname' => $billing_address['entry_lastname'],
 283                               'company' => $billing_address['entry_company'],
 284                               'street_address' => $billing_address['entry_street_address'],
 285                               'suburb' => $billing_address['entry_suburb'],
 286                               'city' => $billing_address['entry_city'],
 287                               'postcode' => $billing_address['entry_postcode'],
 288                               'state' => ((tep_not_null($billing_address['entry_state'])) ? $billing_address['entry_state'] : $billing_address['zone_name']),
 289                               'zone_id' => $billing_address['entry_zone_id'],
 290                               'country' => array('id' => $billing_address['countries_id'], 'title' => $billing_address['countries_name'], 'iso_code_2' => $billing_address['countries_iso_code_2'], 'iso_code_3' => $billing_address['countries_iso_code_3']),
 291                               'country_id' => $billing_address['entry_country_id'],
 292                               'format_id' => $billing_address['address_format_id']);
 293  
 294        $index = 0;
 295        $products = $cart->get_products();
 296        for ($i=0, $n=sizeof($products); $i<$n; $i++) {
 297          $this->products[$index] = array('qty' => $products[$i]['quantity'],
 298                                          'name' => $products[$i]['name'],
 299                                          'model' => $products[$i]['model'],
 300                                          'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
 301                                          'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
 302                                          'price' => $products[$i]['price'],
 303                                          'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']),
 304                                          'weight' => $products[$i]['weight'],
 305                                          'id' => $products[$i]['id']);
 306  // BOF: MOD - Separate Pricing Per Customer

 307          if(!tep_session_is_registered('sppc_customer_group_id')) { 
 308            $customer_group_id = '0';
 309          } else {
 310            $customer_group_id = $sppc_customer_group_id;
 311          }
 312          if ($customer_group_id != '0'){
 313            $orders_customers_price = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where customers_group_id = '". $customer_group_id . "' and products_id = '" . $products[$i]['id'] . "'");
 314            $orders_customers = tep_db_fetch_array($orders_customers_price);
 315            if ($orders_customers = tep_db_fetch_array($orders_customers_price)) {    
 316              $this->products[$index] = array('price' => $orders_customers['customers_group_price'],
 317                                        'final_price' => $orders_customers['customers_group_price'] + $cart->attributes_price($products[$i]['id']));
 318            }
 319          }
 320  // EOF: MOD - Separate Pricing Per Customer

 321  
 322          if ($products[$i]['attributes']) {
 323            $subindex = 0;
 324            reset($products[$i]['attributes']);
 325            while (list($option, $value) = each($products[$i]['attributes'])) {
 326  // LINE CHANGED: MOD - QT Pro added "popt.products_options_track_stock"

 327              $attributes_query = tep_db_query("select popt.products_options_name, popt.products_options_track_stock, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'");
 328              $attributes = tep_db_fetch_array($attributes_query);
 329  
 330  // BOF: MOD - QT Pro: Determine if attribute is a text attribute and change products array if it is.

 331              if ($value == PRODUCTS_OPTIONS_VALUE_TEXT_ID){
 332                $attr_value = $products[$i]['attributes_values'][$option];
 333              } else {
 334                $attr_value = $attributes['products_options_values_name'];
 335              }
 336              $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options_name'],
 337                                                                       'value' => $attributes['products_options_values_name'],
 338                                                                       'option_id' => $option,
 339                                                                       'value_id' => $value,
 340                                                                       'prefix' => $attributes['price_prefix'],
 341                                                                       'price' => $attributes['options_values_price'],
 342                                                                       'track_stock' => $attributes['products_options_track_stock']);
 343  // EOF: MOD - QT Pro: Determine if attribute is a text attribute and change products array if it is.

 344  
 345              $subindex++;
 346            }
 347          }
 348  
 349          $shown_price = $currencies->calculate_price($this->products[$index]['final_price'], $this->products[$index]['tax'], $this->products[$index]['qty']);
 350          $this->info['subtotal'] += $shown_price;
 351  
 352          $products_tax = $this->products[$index]['tax'];
 353          $products_tax_description = $this->products[$index]['tax_description'];
 354  // BOF: MOD - Separate Pricing Per Customer, show_tax modification

 355  // next line was original code

 356  //      if (DISPLAY_PRICE_WITH_TAX == 'true') {

 357      global $sppc_customer_group_show_tax;
 358          if(!tep_session_is_registered('sppc_customer_group_show_tax')) { 
 359            $customer_group_show_tax = '1';
 360          } else {
 361            $customer_group_show_tax = $sppc_customer_group_show_tax;
 362          }        
 363          if (DISPLAY_PRICE_WITH_TAX == 'true' && $customer_group_show_tax == '1') {
 364  // EOF: MOD - Separate Pricing Per Customer, show_tax modification

 365            $this->info['tax'] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
 366            if (isset($this->info['tax_groups']["$products_tax_description"])) {
 367              $this->info['tax_groups']["$products_tax_description"] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
 368            } else {
 369              $this->info['tax_groups']["$products_tax_description"] = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
 370            }
 371          } else {
 372            $this->info['tax'] += ($products_tax / 100) * $shown_price;
 373            if (isset($this->info['tax_groups']["$products_tax_description"])) {
 374              $this->info['tax_groups']["$products_tax_description"] += ($products_tax / 100) * $shown_price;
 375            } else {
 376              $this->info['tax_groups']["$products_tax_description"] = ($products_tax / 100) * $shown_price;
 377            }
 378          }
 379  
 380          $index++;
 381        }
 382  
 383  // BOF: MOD - Separate Pricing Per Customer, show_tax modification

 384  // next line was original code

 385  //    if (DISPLAY_PRICE_WITH_TAX == 'true') {

 386        global $sppc_customer_group_show_tax;
 387        if(!tep_session_is_registered('sppc_customer_group_show_tax')) { 
 388          $customer_group_show_tax = '1';
 389        } else {
 390          $customer_group_show_tax = $sppc_customer_group_show_tax;
 391        }    
 392        if ((DISPLAY_PRICE_WITH_TAX == 'true') && ($customer_group_show_tax == '1')) {
 393  // EOF: MOD - Separate Pricing Per Customer, show_tax modification

 394          $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];
 395        } else {
 396          $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];
 397        }
 398      }
 399    }
 400  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7