VirtueMart 1.1.x [ Old version - no longer supported ] > 2Checkout VM 1

Pending/Confirmed status with VM 1.1.3 fixed

(1/1)

Ruppert:
Not sure if this is useful to anyone but I had an issue where 2CO would not mark orders as CONFIRMED and left them as PENDING.

I found the problem to be in /adminstrator/components/com_virtuemart/html/checkout.2Checkout_result.php :


--- Code: ---/* x_invoice_num is the name of the variable that holds OUR order_number */
  // 04-01-2010 RickG Added intval call to prevent SQL injection
  $order_number = intval(vmGet( $_REQUEST, "x_invoice_num" ));

--- End code ---

The order_number has the following format 2873_d23f87750c458d8a644cc336fe9ff where 2873 is the user id.
The inval function basically removes everything after the user id to give 2873 only. This is an invalid order number in _vm_orders DB table.

This modified version seems to work fine:


--- Code: ---/* x_invoice_num is the name of the variable that holds OUR order_number */
  $order_number = stripslashes(mysql_real_escape_string(vmGet( $_REQUEST, "x_invoice_num" )));

--- End code ---

Not sure if my version of VM 1.1.3 was patched or not, but if your version has this same code then order statuses won't work.

Hope this helps.
 

Navigation

[0] Message Index

Go to full version