VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: piedequeso on March 08, 2012, 17:32:03 PM

Title: Adding Weight On Virtuemart Product Module
Post by: piedequeso on March 08, 2012, 17:32:03 PM
Hello I'm using joomla 2.5 and latest version of virtuemart, On the frontend of my site i have the Virtuemart Products Module and next to where the price is i wish to add the weight for each item. anybody knows how to do it?

Please check my site here is the url: americafood.org

Virtuemart product module i going to be the one right below the main slider on the middle there should be six items featured there. you'll see the price.
Title: Re: Adding Weight On Virtuemart Product Module
Post by: PRO on March 08, 2012, 18:23:53 PM
you can "try" this in
modules_mod_virtuemart_product/tmpl/defaul.php

<?php echo $product->virtuemart_weight ?>

Title: Re: Adding Weight On Virtuemart Product Module
Post by: piedequeso on March 15, 2012, 18:39:04 PM
I tried adding the code you gave me but it game this error: Parse error: syntax error, unexpected '<' in /home/content/12/8993712/html/modules/mod_virtuemart_product/tmpl/default.php on line 25
Title: Re: Adding Weight On Virtuemart Product Module
Post by: PRO on March 15, 2012, 19:56:25 PM
 echo '<p>';
echo $product->product_weight;
echo '</p>';

Prints out 90.000

But this prints   90 LB

echo '<p>';
$product->product_weight= number_format($product->product_weight,0);
echo $product->product_weight;
echo ' '.$product->product_weight_uom;
echo '</p>';