Skip to main content

choose which product image is displayed

12 years 9 months ago - 12 years 9 months ago #140050 by erickb
in Hikashop the code to display a product image looks like that -->

echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);

there is no way to choose which file_ordering one want

it will be useful to have it in that way -->
image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), $this->row->file_ordering, '' ,'','' $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);

or -->

image->display(@$this->row->images[2]->file_path,false,$this->escape($this->row->file_name), $this->row->file_ordering, '' ,'','' $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);
Last edit: 12 years 9 months ago by erickb.

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

12 years 9 months ago #140066 by nicolas
If you look on the images listing of the product edition page, you'll find a "ordering" column where you can set the ordering of each image. No need to change the code for that then.

The display function comes from the file administrator/components/com_hikashop/helpers/image.php

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

12 years 9 months ago #140067 by erickb
no it is not enough in that way I want to display [0] for products, but [1] for related or last visited
and sometimes I need [0] and [1] as default icons

your way to display images is far too restrictive

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

12 years 9 months ago #140079 by Jerome
Hi,

1 - You can override it, so it's not restrictive.
2 - We do not use anymore the function "display" in the product page, we use the "getThumbnail" one.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

12 years 9 months ago #140433 by erickb

Jerome wrote: Hi,

1 - You can override it, so it's not restrictive.
2 - We do not use anymore the function "display" in the product page, we use the "getThumbnail" one.

Regards,


1) for each place where I want another images I must use $db =& JFactory::getDBO(); I find it vdery restrictive

2) in HK 223 > listing_img.php you are using echo $this->image->display

anyway that feature to choose which image one want is missing

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

Time to create page: 0.091 seconds
Powered by Kunena Forum