Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Problem with payment module and shipping tax in checkout_confirmation.php


Recommended Posts


I'm having an issue in checkout_confirmation.php,

I'm using a payment module named "cmcic" that gets the order amount with $order->info[total]

the problem is, when using a shipping method that uses tax, the $order->info[total] is not including the shipping tax at the moment the payment module uses it, the shipping tax is only added after with


echo $order_total_modules->output();


I modified the code this way, so payment is processed after the order_total


// load the selected payment module
 require(DIR_WS_CLASSES . 'payment.php');
 $payment_modules = new payment($payment);

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

// load the selected shipping module
 require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping($shipping);

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;



 if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
$messageStack->add_session('checkout_payment', ERROR_NO_PAYMENT_MODULE_SELECTED);
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

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


can someone please tell if it's safe like that or maybe if there's a simpler way :)


Link to comment
Share on other sites


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

  • Create New...