I think that we need to add the following logic_hook functionality to the base product.
Use Case: Once the currency conversion rate is updated, the software should go ahead and re-calculate the base currency product value in the database. Something like the following:
$currency_name = $focus->name;
$currency_id = $focus->id;
$conversion_rate = $focus->conversion_rate;
$GLOBALS[‘log’]->fatal(‘Will work on ’ . $conversion_rate);
$query = "UPDATE aos_products join currencies on ";
$query .= " aos_products.currency_id = currencies.id ";
$query .= "SET " ;
$query .= " aos_products.cost_usdollar = aos_products.cost / currencies.conversion_rate ";
$query .= "WHERE “;
$query .= " currencies.id = '” . $currency_id . "’ and ";
$query .= " currencies.status = ‘Active’ and ";
$query .= " currencies.deleted = 0 and “;
$query .= " aos_products.deleted = 0;”;
$GLOBALS[‘log’]->fatal('Will execute ’ . $query);
$GLOBALS[‘log’]->fatal(‘Executing Query…’);
$result = $focus->db->query($query, true);
$GLOBALS[‘log’]->fatal('Query Result … ’ . $result);
$focus->ignore_update_c = true;
In my case, all I cared about was to update the USD value.