Yep Pixxi, I could not say from the top of my head then. But at approx line 88 the price update part should be update to:
if($_POST['product_new_price']){
$_POST['product_new_price'] = zen_db_prepare_input($_POST['product_new_price']);
foreach($_POST['product_new_price'] as $products_id => $new_price) {
if ($_POST['product_new_price'][$products_id] != $_POST['product_old_price'][$products_id] && $_POST['update_price'][$products_id] == 'yes') {
$count_update++;
$item_updated[$products_id] = 'updated';
$db->Execute("UPDATE " . TABLE_PRODUCTS . " SET products_price='" . zen_db_input($new_price) . "', products_last_modified=now() WHERE products_id=" . (int)$products_id);
zen_update_products_price_sorter((int)$products_id);
}
}
}
Colored quote to highlight the actual change:
if($_POST['product_new_price']){
$_POST['product_new_price'] = zen_db_prepare_input($_POST['product_new_price']);
foreach($_POST['product_new_price'] as $products_id => $new_price) {
if ($_POST['product_new_price'][$products_id] != $_POST['product_old_price'][$products_id] && $_POST['update_price'][$products_id] == 'yes') {
$count_update++;
$item_updated[$products_id] = 'updated';
$db->Execute("UPDATE " . TABLE_PRODUCTS . " SET products_price='" . zen_db_input($new_price) . "', products_last_modified=now() WHERE products_id=" . (int)$products_id);
zen_update_products_price_sorter((int)$products_id);
}
}
}
Tested now, and it works as expected :smartass:
I would like to update the quick_updates soon (and then the above fix will be included of course), but time flies.....
(
Note that this only updates the sort order for prices that are updated after the above change. If really needed, it's also possible to update the sort order for all prices without editting quite easily using this line zen_update_products_price_sorter((int)$products->fields['products_id']) in the while (!$products->EOF) loop. (but better remove this one again after all prices are sorted)
)