AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: droflex on August 01, 2015, 12:36:11 AM

Title: Displaying height, length, width, weight on product page
Post by: droflex on August 01, 2015, 12:36:11 AM
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
Title: Re: Displaying height, length, width, weight on product page
Post by: yonghan on August 01, 2015, 02:06:44 AM
Hi, I suppose you can use the following code from that post:

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

Code: [Select]
<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
Code: [Select]
<?php echo $product_info['height'] . $product_info['length_class_name']; ?>
Title: Re: Displaying height, length, width, weight on product page
Post by: droflex on August 01, 2015, 03:29:05 AM
Hi, Thanks
Title: Re: Displaying height, length, width, weight on product page
Post by: Basara on August 03, 2015, 02:16:38 AM
Hello.

Also check this solution http://marketplace.abantecart.com/show_weight