Post by Qphoria » Thu Jul 23, 2009 4:48 am

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'] . "'");

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Daniel » Thu Jul 23, 2009 8:25 pm

shit!!

sorry i missed this one.

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

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Qphoria » Thu Jul 23, 2009 8:56 pm

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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 10 guests