News:

Support the VirtueMart project and become a member

Main Menu

Bug: Update Product Vendor ID

Started by doorknob, July 04, 2008, 03:49:16 AM

Previous topic - Next topic

doorknob

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