VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: houdoe on February 03, 2012, 14:08:33 PM

Title: How to display weight on category details page
Post by: houdoe on February 03, 2012, 14:08:33 PM
Hi,
I am running VM2 on Joomla 1.7.
I need some help to display the weight on the category details page.
Is there a way to achieve this?
I am looking in the php file:
components/com_virtuemart/views/category/tmpl/default.php.
but i don't see how i could display the weight per product.
After this i also need the total weight to be displayed in the cart.

Any help is very much appreciated !!
Title: Re: How to display weight on category details page
Post by: PRO on February 03, 2012, 20:56:21 PM
<?php echo $product->product_weight ;?>

You can access product variables on category page by using

$product->

You can access product variables on PRODUCT page by using

$this->
Title: Re: How to display weight on category details page
Post by: houdoe on February 08, 2012, 16:49:04 PM
Thanks, this is working for me !
Now i just need to find out how i can display the total weight in the cart.
any suggestions?

Thanks in advance !!
Title: Re: How to display weight on category details page
Post by: swapnali on June 14, 2012, 10:58:09 AM
Hello Sir,

But this method is not working with my site. plz can u tell y?

<?php echo $product->product_weight ;?>

You can access product variables on category page by using

$product->

You can access product variables on PRODUCT page by using

$this->

Title: Re: How to display weight on category details page
Post by: idezmax on March 17, 2014, 03:23:04 AM
How can I set decimal for weight only 2 digits.

http://designbkk.com/demo/silver/%E0%B8%9E%E0%B8%A5%E0%B8%AD%E0%B8%A2%E0%B9%81%E0%B8%97%E0%B9%89