- Posts: 88
- Thank you received: 0
Re: Dimensions added to Product Listing
- wonderwilson
-
Topic Author
- Offline
Less
More
14 years 9 months ago #33318
by wonderwilson
Dimensions added to Product Listing was created by wonderwilson
Hi Guys,
Is it possible to add the product dimensions (width x height) on the product description (listing_img_title ). It would need to look like 25 x 30 etc.
Thanks
Darren
Is it possible to add the product dimensions (width x height) on the product description (listing_img_title ). It would need to look like 25 x 30 etc.
Thanks
Darren
Please Log in or Create an account to join the conversation.
14 years 9 months ago #33336
by nicolas
Replied by nicolas on topic Re: Dimensions added to Product Listing
Hi,
Yes, it's possible. You need to edit the file "listing_img_title" (provided that your listing layout type is div and that the item box layout is image and title which are the default values) of the view "product" via the menu Display->Views and add something like that:
<?php echo $this->row->product_width.' x '.$this->row->product_height; ?>
Yes, it's possible. You need to edit the file "listing_img_title" (provided that your listing layout type is div and that the item box layout is image and title which are the default values) of the view "product" via the menu Display->Views and add something like that:
<?php echo $this->row->product_width.' x '.$this->row->product_height; ?>
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 #33346
by wonderwilson
Replied by wonderwilson on topic Re: Dimensions added to Product Listing
Great, thanks Nicolas!
Please Log in or Create an account to join the conversation.
6 years 2 months ago #321787
by Thrane
Replied by Thrane on topic Re: Dimensions added to Product Listing
I now this is and old thread, but it still works 
But it shows like:
80.000 x 80.000
How can I let show like: 80 x 80 cm
And only on products where the fields aren't 0
But it shows like:
80.000 x 80.000
How can I let show like: 80 x 80 cm
And only on products where the fields aren't 0
Please Log in or Create an account to join the conversation.
6 years 2 months ago #321800
by nicolas
Replied by nicolas on topic Re: Dimensions added to Product Listing
Hi,
You can do like that:
You can do like that:
Code:
<?php
if($this->row->product_width > 0.0 && $this->row->product_height > 0.0) {
echo (int)$this->row->product_width.' x '.(int)$this->row->product_height.' cm';
}
?>
Please Log in or Create an account to join the conversation.
6 years 2 months ago #321804
by Thrane
Replied by Thrane on topic Re: Dimensions added to Product Listing
I'm impressed, you always have a great answer and reply so quickly, thank you so much!
Please Log in or Create an account to join the conversation.
Time to create page: 0.162 seconds