Answer the question
In order to leave comments, you need to log in
Drupal7 + Ubercart3 Several currencies, enter the exchange rate in the admin panel?
Faced a small problem. You need to make several currencies in Ubercart, but do it a little tricky.
function uc_product_load($nodes) {
include_once("php.php");
$a = $euro;
$vids = array();
foreach ($nodes as $node) {
$vids[$node->nid] = $node->vid;
}
$result = db_query('SELECT nid, model, list_price, cost, sell_price, weight, weight_units, length, width, height, length_units, pkg_qty, default_qty, ordering, shippable FROM {uc_products} WHERE vid IN (:vids)', array(':vids' => $vids));
foreach ($result as $node) {
foreach ($node as $field => $value) {
$nodes[$node->nid]->$field = $value;
}
$nodes[$node->nid]->price = round($nodes[$node->nid]->sell_price*$euro, -1);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question