VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Quality & Testing VirtueMart 1.1.x => Virtuemart 1.1 Development (Archiv) => Q&T Resolved => Topic started by: doorknob on July 04, 2008, 03:49:16 AM

Title: Bug: Update Product Vendor ID
Post by: doorknob on July 04, 2008, 03:49:16 AM
The Vendor ID for a product can never be updated because the update query specifies both the Product ID AND the NEW Vendor ID in the where clause and so never finds a match.

Line 503 in ps_product.php
$db->buildQuery( 'UPDATE', '#__{vm}_product', $fields,  'WHERE product_id='. (int)$d["product_id"] . ' AND vendor_id=' . (int)$d['vendor_id'] );


must be amended to:

$db->buildQuery( 'UPDATE', '#__{vm}_product', $fields,  'WHERE product_id='. (int)$d["product_id"] );


Tested on J1.5.3 with VM 1.1 nightly build 2008-07-02

Regards
Phil