Page 1 of 1

Delete order doesn't use DB_PREFIX in the qty update

Posted: Thu Jul 23, 2009 4:48 am
by Qphoria
A new feature of 1.3.0 is to auto increment stock when deleting an order from admin
But the sql query doesn't use the DB_PREFIX part.

Easy fix.

EDIT: admin/model/customer/order.php

FIND:

Code: Select all

$this->db->query("UPDATE `product` SET quantity = (quantity + " . (int)$product['quantity'] . ") WHERE product_id = '" . (int)$product['product_id'] . "'");
REPLACE WITH:

Code: Select all

$this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = (quantity + " . (int)$product['quantity'] . ") WHERE product_id = '" . (int)$product['product_id'] . "'");

Re: Delete order doesn't use DB_PREFIX in the qty update

Posted: Thu Jul 23, 2009 8:25 pm
by Daniel
shit!!

sorry i missed this one.

It will be in the next release. Maybe over the weekend.

Re: Delete order doesn't use DB_PREFIX in the qty update

Posted: Thu Jul 23, 2009 8:56 pm
by Qphoria
Daniel wrote:shit!!

sorry i missed this one.

It will be in the next release. Maybe over the weekend.
NO! Too bad! How dare you miss a bug! Its over! Shut it down! Forum's Closed!

GAME OVER MAN, GAME OVER!




;D