Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

bug? order total modules not used everywhere


fixion

Recommended Posts

Posted

Hi guys,

 

I'm using ot_fixed_payment_chg.php - to charge the customer for specific paymethods (in my case danish creditcard called dankort - using the pbscc payment module).

 

The problem is this:

 

On the payment selection screen - the payment modules are shown, with a ($price) if any for this payment. By using trigger_error debug statements, I found that it is indeed the ot_fixed_payment_chg module that is called there, but the $this->get_order_total() function returns the total WITHOUT any prices from the "order total" modules (in my case the problem is that I have a handling charge which is not included in the order total on the payment selection screen, but when the customer gets to the "verify order" screen - the order total includes the handling charge (it is nr. 4 in the sort order and ot_fixed_payment_chg is nr. 10) and so the payment amount goes up a bit :(

 

This is because the payment_charge is a percentage of the order total.

 

It seems to me, to be a bug in what OSC includes in the order_total.

FYI - the ot_fixed_payment_chg.php gets the order total like this:

global $order, $cart;

$order->info['total'];

 

and it is the $order->info['total'] that has the incorrect(incomplete) amount at the time of payment selection.

 

I'm guessing the $order is an instance of the includes/classes/order.php object - but I tried putting a trigger_error in there - where it does set an $this->info['total'] (this line: 'total' => strip_tags($order_total['text']),) but that trigger_error statement was never executed - either because the order object was cached - or..

 

Any help is appreciated :)

Posted

Well - In short this just means you can't do "percentage" charges on payment types :( - for now I'll just disable that and pay the creditcard charge myself :(

Archived

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

×
×
  • Create New...