support

Displaying height, length, width, weight on product page

Started by droflex, August 01, 2015, 12:36:11 AM

Previous topic - Next topic

droflex

Hello everyone,

I read this forum post (http://forum.abantecart.com/index.php?topic=232.0) which is quite old so I'm posting a new one with an additional question:

I figured out how to do it by editing the product.tpl file and also add the weight section.

It works fine except:

I have "oz" written in the code but sometimes I have a product that weighs(for example) 1 pound, 4 ounces.  How can I manage that without putting 20oz?

Thanks

yonghan

Hi, I suppose you can use the following code from that post:

Quote from: abolabo on July 31, 2012, 11:04:20 AM
Quote from: MLCS on July 30, 2012, 12:33:26 PM
Thank you so much!

The actual writing on the product.tpl was a bit different...
Maybe you can help so if I change the measurement it automatically changes on the page aswell.

This is what Ive put in


<tr>
<td><b><?php echo "Length:"?></b></td>
<td><?php echo $product_info['length'] . "mm"?></td>
</tr>
<tr>
<td><b><?php echo "Width:"?></b></td>
<td><?php echo $product_info['width'] . "mm"?></td>
</tr>
<tr>
<td><b><?php echo "Height:"?></b></td>
<td><?php echo $product_info['height'] . "mm"?></td>
</tr>


As you can see Ive wrote . "mm"; ?>
How can I change that so if one of the measurements in is cm then it would change

MLCS, please look at my post above again.
I propose to change model and gets "length_class_name" from  $product_info array.
After that you need write <?php echo $product_info['height'] . $product_info['length_class_name']; ?>



Forum Rules Code of conduct
AbanteCart.com 2010 -