Displaying product weight on product description

  • Posts: 88
  • Thank you received: 0
13 years 2 weeks ago #29892

Hi Guys,

We would like to add the product weight to the product description page - how do I go about adding this?

Thanks

Darren

Please Log in or Create an account to join the conversation.

  • Posts: 88
  • Thank you received: 0
13 years 2 weeks ago #29908

I've tried adding the following:

Minimum Weight: <?php echo round($this->row->product_weight,1)?><?php echo $this->row->product_weight_unit;?><br>

To the product/show display, but it returns a zero - any ideas?

Darren

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
13 years 2 weeks ago #29925

The weight is already displayed on the product page but in a hidden div.
You can display it with some CSS:

.hikashop_product_weight_main{ display: inline !important; }

Please Log in or Create an account to join the conversation.

  • Posts: 88
  • Thank you received: 0
12 years 11 months ago #31534

This works, thanks Nicolas.

However, I'm getting a 5g rather than a 500g - any ideas?

Thanks

Darren

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 11 months ago #31563

Do you have the latest version of HikaShop ? If not, you should update.

If yes, go in the menu Display->Views and edit the file "show" of the view "product". There search for the text product_weight and make sure that you have the line of code:
<?php echo JText::_('PRODUCT_WEIGHT').': '.rtrim(rtrim($this->element->product_weight,'0'),',.').' '.JText::_($this->element->product_weight_unit); ?><br />

Please Log in or Create an account to join the conversation.

  • Posts: 88
  • Thank you received: 0
12 years 11 months ago #31764

Hi Nicolas,

This works perfectly. Thanks.

Darren

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum