Skip to main content

Re: Dimensions added to Product Listing

More
14 years 9 months ago #33318 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

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

More
14 years 9 months ago #33336 by nicolas
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; ?>

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

More
14 years 9 months ago #33346 by wonderwilson
Great, thanks Nicolas!

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

More
6 years 2 months ago #321787 by Thrane
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

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

More
6 years 2 months ago #321800 by nicolas
Hi,

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.

More
6 years 2 months ago #321804 by Thrane
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
Powered by Kunena Forum