- Posts: 88
- Thank you received: 0
Displaying product weight on product description
- wonderwilson
-
Topic Author
- Offline
Less
More
14 years 10 months ago #29892
by wonderwilson
Displaying product weight on product description was created by wonderwilson
Hi Guys,
We would like to add the product weight to the product description page - how do I go about adding this?
Thanks
Darren
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.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
14 years 10 months ago #29908
by wonderwilson
Replied by wonderwilson on topic Re: Displaying product weight on product description
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
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.
14 years 10 months ago #29925
by nicolas
Replied by nicolas on topic Re: Displaying product weight on product description
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; }
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.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
14 years 10 months ago #31534
by wonderwilson
Replied by wonderwilson on topic Re: Displaying product weight on product description
This works, thanks Nicolas.
However, I'm getting a 5g rather than a 500g - any ideas?
Thanks
Darren
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.
14 years 10 months ago #31563
by nicolas
Replied by nicolas on topic Re: Displaying product weight on product description
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 />
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.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
14 years 9 months ago #31764
by wonderwilson
Replied by wonderwilson on topic Re: Displaying product weight on product description
Hi Nicolas,
This works perfectly. Thanks.
Darren
This works perfectly. Thanks.
Darren
Please Log in or Create an account to join the conversation.
Time to create page: 0.207 seconds