Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fatal error on checkout page


itfitz

Recommended Posts

Posted

This is the error that I get when I go to checkout. Any help is appreciated greatly.

 

Fatal error: Class 'upsxml' not found in /home/lotions2/public_html/includes/classes/shipping.php on line 79

 

here is the code on the file:

 

<?php

/*

$Id: shipping.php,v 1.1.1.1 2004/03/04 23:40:46 ccwjr Exp $

 

osCommerce, Open Source E-Commerce Solutions

www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class shipping {

var $modules;

 

// class constructor

function shipping($module = '') {

// BOF: WebMakers.com Added: Downloads Controller

global $language, $PHP_SELF, $cart;

// EOF: WebMakers.com Added: Downloads Controller

 

if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {

 

// Eversun mod for sppc and qty price breaks

// $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

global $sppc_customer_group_id, $customer_id;

if(!tep_session_is_registered('sppc_customer_group_id')) {

$customer_group_id = '0';

} else {

$customer_group_id = $sppc_customer_group_id;

}

$customer_shipment_query = tep_db_query("select IF(c.customers_shipment_allowed <> '', c.customers_shipment_allowed, cg.group_shipment_allowed) as shipment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id = '" . $customer_group_id . "'");

if ($customer_shipment = tep_db_fetch_array($customer_shipment_query) ) {

if (tep_not_null($customer_shipment['shipment_allowed']) ) {

$temp_shipment_array = explode(';', $customer_shipment['shipment_allowed']);

$installed_modules = explode(';', MODULE_SHIPPING_INSTALLED);

for ($n = 0; $n < sizeof($installed_modules) ; $n++) {

// check to see if a shipping module is not de-installed

if ( in_array($installed_modules[$n], $temp_shipment_array ) ) {

$shipment_array[] = $installed_modules[$n];

}

} // end for loop

$this->modules = $shipment_array;

} else {

$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

}

} else { // default

$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

}

// Eversun mod end for sppc and qty price breaks

$include_modules = array();

 

if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) {

$include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));

} else {

reset($this->modules);

// BOF: WebMakers.com Added: Downloads Controller - Free Shipping and Payments

// Show either normal shipping modules or free shipping module when Free Shipping Module is On

// Free Shipping Only

if ( (tep_get_configuration_key_value('MODULE_SHIPPING_FREESHIPPER_STATUS')=='1' and $cart->show_weight()==0) ) {

$include_modules[] = array('class'=> 'freeshipper', 'file' => 'freeshipper.php');

} else {

// All Other Shipping Modules

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

// Don't show Free Shipping Module

if ($class !='freeshipper') {

$include_modules[] = array('class' => $class, 'file' => $value);

}

}

}

// EOF: WebMakers.com Added: Downloads Controller - Free Shipping and Payments

}

 

for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) {

include(DIR_WS_LANGUAGES . $language . '/modules/shipping/' . $include_modules[$i]['file']);

include(DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file']);

 

$GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];

}

}

}

 

function quote($method = '', $module = '') {

global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes;

 

$quotes_array = array();

 

if (is_array($this->modules)) {

$shipping_quoted = '';

$shipping_num_boxes = 1;

$shipping_weight = $total_weight;

 

if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) {

$shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT;

} else {

$shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100);

}

 

if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes

$shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);

$shipping_weight = $shipping_weight/$shipping_num_boxes;

}

 

$include_quotes = array();

 

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if (tep_not_null($module)) {

if ( ($module == $class) && ($GLOBALS[$class]->enabled) ) {

$include_quotes[] = $class;

}

} elseif ($GLOBALS[$class]->enabled) {

$include_quotes[] = $class;

}

}

 

$size = sizeof($include_quotes);

for ($i=0; $i<$size; $i++) {

$quotes = $GLOBALS[$include_quotes[$i]]->quote($method);

if (is_array($quotes)) $quotes_array[] = $quotes;

}

}

 

return $quotes_array;

}

 

function cheapest() {

if (is_array($this->modules)) {

$rates = array();

 

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ($GLOBALS[$class]->enabled) {

$quotes = $GLOBALS[$class]->quotes;

for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {

if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) {

$rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],

'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',

'cost' => $quotes['methods'][$i]['cost']);

}

}

}

}

 

$cheapest = false;

for ($i=0, $n=sizeof($rates); $i<$n; $i++) {

if (is_array($cheapest)) {

if ($rates[$i]['cost']< $cheapest['cost']) {

$cheapest = $rates[$i];

}

} else {

$cheapest = $rates[$i];

}

}

 

return $cheapest;

}

}

}

?>

If it was easy, anyone could do it!

Posted
This is the error that I get when I go to checkout. Any help is appreciated greatly.

 

Fatal error: Class 'upsxml' not found in /home/lotions2/public_html/includes/classes/shipping.php on line 79

 

you should have a includes/modules/shipping/upsxml.php file. this defines the class. if the file is missing, or doesn't have a class upsxml statement, this is what is causing the problem.

Posted
you should have a includes/modules/shipping/upsxml.php file. this defines the class. if the file is missing, or doesn't have a class upsxml statement, this is what is causing the problem.

 

how about this one on the admin side?

 

Warning: include_once(/home/lotions2/public_html/includes/languages/english/modules/shipping/indvship.php) [function.include-once]: failed to open stream: No such file or directory in /home/lotions2/public_html/admin/modules.php on line 159

 

My directory structure is different now because I am putting this on another server Where do I cange the path. everything should just be /public_html/

If it was easy, anyone could do it!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...