Author Topic: Displaying height, length, width, weight on product page  (Read 4758 times)

Offline droflex

  • Newbie
  • *
  • Posts: 19
  • Karma: +3/-0
    • View Profile
Displaying height, length, width, weight on product page
« 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

yonghan

  • Guest
Re: Displaying height, length, width, weight on product page
« Reply #1 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']; ?>

Offline droflex

  • Newbie
  • *
  • Posts: 19
  • Karma: +3/-0
    • View Profile
Re: Displaying height, length, width, weight on product page
« Reply #2 on: August 01, 2015, 03:29:05 AM »
Hi, Thanks

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: Displaying height, length, width, weight on product page
« Reply #3 on: August 03, 2015, 02:16:38 AM »
Hello.

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

 

Powered by SMFPacks Social Login Mod