Display Total Weight
-
I want to display the total weight on the cart page. How do i do that ??
I added the following code to cart-totals.php file but $woocommerce->cart->cart_contents_weight doesnt return any weight. Is there something wrong with the code ??
<tr class=”total weight”>
<th><?php _e(‘Total Weight’, ‘woocommerce’); ?></th>
<td><?php
$total_weight = $woocommerce->cart->cart_contents_weight;
$total_weight .= ‘ ‘.get_option(‘woocommerce_weight_unit’);
echo $total_weight;
?></td>
</tr>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Display Total Weight’ is closed to new replies.