order confirm function bug?
Posted: Fri Mar 27, 2009 10:09 pm
When using the confirm function in catalog/model/checkout/order.php, you pass the order_id and what I assume would be the order_status_id that you want the order to be.
But the update query is:
public function confirm($order_id, $order_status_id) {
Which means, it is expecting the order_status_id to be a certain value or it won't update.
I believe it should be part of the SET so that you are updating the status and setting the status:
To be honest, the update/confirm functions seem a bit redundant.. why not just include a confirm flag in the update function as one of the optional arguments. I mean it looks like you want the confirm to only trigger when the status is a certain status, but I dont really see the reasoning. I dont really understand the whole confirm ajax call either..
I would think you would want:
Checkout_confirm
click "Confirm"
Ajax callback to create a "Pending" order with a confirm of 0
then goto payment site
get IPN/return
Update the "Pending" order to "Processing" with a confirm of 1
I'm not sure why you are confirming paypal orders with an ajax callback before the payment processor is even called.
But the update query is:
public function confirm($order_id, $order_status_id) {
Code: Select all
$this->db->query("UPDATE `order` SET confirm = '1' WHERE order_id = '" . (int)$order_id . "' AND order_status_id = '" . (int)$order_status_id . "'");
I believe it should be part of the SET so that you are updating the status and setting the status:
Code: Select all
$this->db->query("UPDATE `order` SET confirm = '1', order_status_id = '" . (int)$order_status_id . "' WHERE order_id = '" . (int)$order_id . "'");
I would think you would want:
Checkout_confirm
click "Confirm"
Ajax callback to create a "Pending" order with a confirm of 0
then goto payment site
get IPN/return
Update the "Pending" order to "Processing" with a confirm of 1
I'm not sure why you are confirming paypal orders with an ajax callback before the payment processor is even called.