Answer the question
In order to leave comments, you need to log in
How to display a variable that contains the value "Total:" from the cart Ubercart 3, Drupal 7?
You need to display a variable in the block on the /cart page, so that later you can perform mathematical operations with it. I broke my whole head, how to get it out?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
And the casket just opened:
$items = uc_cart_get_contents();
$item_price = 0;
foreach ($items as $item) $item_price += ($item->qty * $item->price);
Thanks for the minus and karma, it is desirable to understand what is the reason?
ps I can get the value
<?php
print $table[3]['total']['#price'];
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question