radius Posted June 24, 2006 Share Posted June 24, 2006 Hi, 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 if (MODULE_ORDER_TOTAL_INSTALLED) { $order_total_modules->process(); 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 (MODULE_ORDER_TOTAL_INSTALLED) { $order_total_modules->process(); } $payment_modules->update_status(); 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)) { $payment_modules->pre_confirmation_check(); } can someone please tell if it's safe like that or maybe if there's a simpler way :) Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.