choose which product image is displayed

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
10 years 10 months ago #140050

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: 10 years 10 months ago by erickb.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 10 months ago #140066

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.

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
10 years 10 months ago #140067

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 10 months ago #140079

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
10 years 10 months ago #140433

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.053 seconds
Powered by Kunena Forum