Project Detail

fix error in osMAX shopping cart  

fix error in osMAX shopping cart is project number 350765
posted at GetAFreelancer.com. Click here to post your own project.

 

Bookmark and Share
Free Trial For New Buyers
 

Status: Closed
(Cancelled by Service Buyer)

Selected Providers: -

Budget: $30-250

Created: 11/29/2008 at 21:53 EST

Bid Count: 7

Average Bid: N/A

11/30/2008 at 21:53 EST

Project Creator: aaanativearts View PM Post PM
Employer Rating: 10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10 (2 reviews)

Bid On This Project
 

Description

For the past couple weeks, I have had numerous customers who placed duplicate or triplicate orders for the same items but the payment does not go thru for any of them. Orders from some people do go thru properly and payment is received. I could not duplicate the error.

Finally a customer reported he got this error:
It went through the whole process and said the payment had been recevied than the the next page said: Fatal error: Cannot redeclare class order_total in /path/to/my/hosting/catalog2/includes/classes/order_total.php on line 13

This catalog has been up for a few years and working properly. About 4 months ago I changed web hosts from a virtual account to a dedicated server, but didn't notice anything wrong until recently. I haven't changed anything other than hosting accounts.

This site runs on osMAX RC3, which is basically just osCommerce with a bunch of contributions added and a BTS templating system, which makes it harder to figure out where the relevant code is at.

I have the Paypal IPN for a Premier account installed as my processor.

Line 13 of order_total.php says:
------------------------
class order_total {
var $modules;
-------------------------
order_total.php appears to have a modification for the Gift Voucher contribution (I give new customers a code for $5.00 off their first order, which might explain why some orders go thru and others don't) that says:
-------------------------
// BOF: MOD - ICW ORDER TOTAL CREDIT CLASS/GV SYSTEM
//
// This function is called in checkout payment after display of payment methods. It actually calls
// two credit class functions.
//
// use_credit_amount() is normally a checkbox used to decide whether the credit amount should be applied to reduce
// the order total. Whether this is a Gift Voucher, or discount coupon or reward points etc.
//
// The second function called is credit_selection(). This in the credit classes already made is usually a redeem box.
// for entering a Gift Voucher number. Note credit classes can decide whether this part is displayed depending on
// E.g. a setting in the admin section.
//
function credit_selection() {
$selection_string = '';
$close_string = '';
$credit_class_string = '';
if (MODULE_ORDER_TOTAL_INSTALLED) {
$header_string = '<tr>' . "\n";
$header_string .= ' <td><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n";
$header_string .= ' <tr>' . "\n";
$header_string .= ' <td class="main"><b>' . TABLE_HEADING_CREDIT . '</b></td>' . "\n";
$header_string .= ' </tr>' . "\n";
$header_string .= ' </table></td>' . "\n";
$header_string .= ' </tr>' . "\n";
$header_string .= '<tr>' . "\n";
$header_string .= ' <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">' . "\n";
$header_string .= ' <tr class="infoBoxContents"><td><table border="0" width="100%" cellspacing="0" cellpadding="2">' ."\n";
$header_string .= ' <tr><td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>' . "\n";
$header_string .= ' <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n";
$close_string = ' </table></td>';
$close_string .= '<td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
$close_string .= '</tr></table></td></tr></table></td>';
$close_string .= '<tr><td width="100%">' . tep_draw_separator('pixel_trans.gif', '100%', '10') . '</td></tr>';
reset($this->modules);
$output_string = '';
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) {
$use_credit_string = $GLOBALS[$class]->use_credit_amount();
if ($selection_string =='') $selection_string = $GLOBALS[$class]->credit_selection();
if ( ($use_credit_string !='' ) || ($selection_string != '') ) {
$output_string .= '<tr colspan="4"><td colspan="4" width="100%">' . tep_draw_separator('pixel_trans.gif', '100%', '10') . '</td></tr>';
$output_string = ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" >' . "\n" .
' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>' .
' <td class="main"><b>' . $GLOBALS[$class]->header . '</b></td>' . $use_credit_string;
$output_string .= '<td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
$output_string .= ' </tr>' . "\n";
$output_string .= $selection_string;
}

}
}
if ($output_string != '') {
$output_string = $header_string . $output_string;
$output_string .= $close_string;
}
}
return $output_string;
}


// if ($selection_string !='') {
// $output_string .= '</td>' . "\n";
// $output_string .= $selection_string;
// }




// update_credit_account is called in checkout process on a per product basis. It's purpose
// is to decide whether each product in the cart should add something to a credit account.
// e.g. for the Gift Voucher it checks whether the product is a Gift voucher and then adds the amount
// to the Gift Voucher account.
// Another use would be to check if the product would give reward points and add these to the points/reward account.
//
----------------------------------

I need someone to figure out what the problem is and fix it ASAP.


Additional files submitted:
order_total.php

Messages Posted: 0 View project clarification board Post message on project clarification board

Bid On This Project
 
If you are the project creator or one of the bidders Log In for more options
Bids are hidden by the project creator. Log in as the project creator or as one of the bidders to view bids. You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.

    Bid on this Project