Would recommend using one of the mass price updating plugins to do this (EasyPopulate V4, DBIO, or ) which would also make it relatively easy to restore/remove the altered price(s).
Otherwise, the following insert query run before the zen_update_products_price_sorter($products_id) function for the specific products_id will place the product on special. If it already is, then an update query similar to it would be needed. On top of all that is whether the product is on sale and how the sale price is to be applied against a product that has a special plays a factor...
Code:
$sql = "INSERT INTO " . TABLE_SPECIALS . "
(products_id,
specials_new_products_price,
specials_date_added,
specials_date_available,
expires_date,
status)
VALUES (
:products_id:,
:specials_price:,
now(),
:specials_date_avail:,
:specials_expires_date:,
'1')";
$sql = $db->bindVars($sql, ':products_id:', $v_products_id, 'integer');
$sql = $db->bindVars($sql, ':specials_price:', $v_specials_price, 'float');
$sql = $db->bindVars($sql, ':specials_date_avail:', $v_specials_date_avail, 'date');
$sql = $db->bindVars($sql, ':specials_expires_date:', $v_specials_expires_date, 'date');
$db->Execute($sql);
Bookmarks