Hi all, Has anyone produced a module to display weight and / or dimensions on product. I have listed dimensions in the product field but nowhere seems to display these?
Can anyone help?
Big thanks
Can anyone help?
Big thanks
You can add them easily to the view
1. EDIT: catalog/view/theme/default/template/product/product.tpl
2. FIND:
3. AFTER, ADD:
1. EDIT: catalog/view/theme/default/template/product/product.tpl
2. FIND:
Code: Select all
<tr>
<td><b><?php echo $text_model; ?></b></td>
<td><?php echo $model; ?></td>
</tr>
Code: Select all
<tr>
<td><b>Weight:</b></td>
<td><?php echo $this->weight->format($product_info['weight'], 'lb'); ?></td>
</tr>
<?php if ($product_info['length'] && $product_info['width'] && $product_info['height']) { ?>
<tr>
<td><b>Dimensions:</b></td>
<td><?php echo $product_info['length']; ?> x <?php echo $product_info['width']; ?> x <?php echo $product_info['height']; ?></td>
</tr>
<?php } ?>
Hi,
I got it to work thanks.
However if you leave the fields blank it shows like 0.00 x 0.00 x 0.00
How do i get it to work like L 0 <length class> x W 0 <length class> H 0<length class> (with prefex letter) and leave out fields that aren't filled it? I usually only give the height of an items sometimes width to. So it'll show like H 15 cm x w 10 cm or just H 15 cm if that's all data thats given
That would make this code even better
I got it to work thanks.
However if you leave the fields blank it shows like 0.00 x 0.00 x 0.00
How do i get it to work like L 0 <length class> x W 0 <length class> H 0<length class> (with prefex letter) and leave out fields that aren't filled it? I usually only give the height of an items sometimes width to. So it'll show like H 15 cm x w 10 cm or just H 15 cm if that's all data thats given
That would make this code even better

No Eveline. I didn't mean you. I was replying to dramony. If you want L W H to show then you can add that
Code: Select all
<tr>
<td><b>Dimensions:</b></td>
<td>L: <?php echo $product_info['length']; ?> W: <?php echo $product_info['width']; ?> H: <?php echo $product_info['height']; ?></td>
</tr>
Hi, what if I want to show the weight or dimension in two units i.e. lbs and g, and inch and cm? e.g.
Weight: 2.2lbs (1000g)
Dimension: 1x1x2inch (2.5x2.5x5.1cm)
how do i write the code so that I take the weight and dimension I entered for the product and divide by or multiply with the necessary conversion factor?
Thank you for your help!
Weight: 2.2lbs (1000g)
Dimension: 1x1x2inch (2.5x2.5x5.1cm)
how do i write the code so that I take the weight and dimension I entered for the product and divide by or multiply with the necessary conversion factor?
Thank you for your help!
Thank you for the above advice!
One little question. When the dimension shows it is in the format xxx.xx my site is in metric so instead of 450 i get 450.00 Is there a way of losing the extra zeroes?
Example here http://www.containers.org.uk/plastic/DH641002AA
Thank you for the excellent software!!
One little question. When the dimension shows it is in the format xxx.xx my site is in metric so instead of 450 i get 450.00 Is there a way of losing the extra zeroes?
Example here http://www.containers.org.uk/plastic/DH641002AA
Thank you for the excellent software!!

Found a solution that may be of interest to others.
My sitehttp://www.containers.org.uk/ now has a dimension search in a module where the customer can provide minimum and maximum values.
The module was programmed in a couple of hours by Jay Gilford
http://www.jaygilford.com/ should anyone else need the same service.
I can recommend his work!
My sitehttp://www.containers.org.uk/ now has a dimension search in a module where the customer can provide minimum and maximum values.
The module was programmed in a couple of hours by Jay Gilford
http://www.jaygilford.com/ should anyone else need the same service.
I can recommend his work!
I have changed my file now I get the following error please help to fix, I'm not a programmerQphoria wrote:You can add them easily to the view
1. EDIT: catalog/view/theme/default/template/product/product.tpl
2. FIND:3. AFTER, ADD:Code: Select all
<tr> <td><b><?php echo $text_model; ?></b></td> <td><?php echo $model; ?></td> </tr>
Code: Select all
<tr> <td><b>Weight:</b></td> <td><?php echo $this->weight->format($product_info['weight'], 'lb'); ?></td> </tr> <tr> <td><b>Dimensions:</b></td> <td><?php echo $product_info['length']; ?> x <?php echo $product_info['width']; ?> x <?php echo $product_info['height']; ?></td> </tr>
Model: Cascade Pot Small_001
Weight: Notice: Undefined variable: product_info in /var/www/b/bo/bonsaiart.co.za/catalog/view/theme/default/template/product/product.tpl on line 37Notice: Undefined index: lb in /var/www/b/bo/bonsaiart.co.za/system/library/weight.php on line 350.00
Dimensions: Notice: Undefined variable: product_info in /var/www/b/bo/bonsaiart.co.za/catalog/view/theme/default/template/product/product.tpl on line 41 x Notice: Undefined variable: product_info in /var/www/b/bo/bonsaiart.co.za/catalog/view/theme/default/template/product/product.tpl on line 41 x Notice: Undefined variable: product_info in /var/www/b/bo/bonsaiart.co.za/catalog/view/theme/default/template/product/product.tpl on line 41
Thats my problem too PLZZZZZZZZZZZZZZ !!!!Affableaardvark wrote:Thank you for the above advice!
One little question. When the dimension shows it is in the format xxx.xx my site is in metric so instead of 450 i get 450.00 Is there a way of losing the extra zeroes?
Example here http://www.containers.org.uk/plastic/DH641002AA
Thank you for the excellent software!!
Help meeeeeee
Who is online
Users browsing this forum: No registered users and 109 guests