how to display total weight of all products in cart checkout

Started by ronjb, December 15, 2013, 21:34:52 PM

Previous topic - Next topic


i was able to show the each product weight per row of the product with this
<?php echo $prow->product_weight ?>

but i can't get the total weight of all products, i tried

<?php echo $this->totalWeight ?>

but it didn't work any ideas how can i get the total weight of all products to be displayed on the checkout cart page?

thanks in advance


ship_mode ?

That is how the field is named in CCVAOM, we use it to export orders but have no clue if they renamed that field from the VM one.
[url=""][/url] -


There is another way, but this was easier for me

Here is the function to add up the product weights

<?php function cWeight($products){
      $tweight= 0;
      foreach ( $products as $prow) {
         $tweight += $prow->product_weight*$prow->quantity;
return $tweight;
   } ?>

Then, you can echo it anywhere you want like this

   <?php echo cWeight($this->cart->products);?>