multiple images in product pages

  • Posts: 32
  • Thank you received: 1
13 years 7 months ago #12251

Okay, I'm stumped.
Sorry to ask for help so much!

In Display | Product | Show I want to edit this code:

echo $this->image->display($image->file_path,'hikashop_main_image',$image->file_name,'class="hikashop_child_image"','rel="SqueezeBox"');

Currently, that line is producing this huge mass of code that I don't need:
<a class="hikashop_image_small_link" rel="{handler: 'iframe', size: {x: , y: }}" href="/media/com_hikashop/upload/174.jpg" onclick="SqueezeBox.fromElement(this,{parse: 'rel'});return false;" target="_blank" onmouseover="return hikashopChangeImage('hikashop_main_image','/media/com_hikashop/upload/thumbnail/174.jpg','202','220',this);" rel="zoombox" id="hikashop_image_small_link_first" ><img src="/media/com_hikashop/upload/thumbnail/174.jpg" alt="2006_0102Shoshone#84.JPG" class="hikashop_child_image" /></a>

What I want is just something simple:
<a class="hikashop_image_small_link" href="/media/com_hikashop/upload/174.jpg" rel="zoombox"><img src="/media/com_hikashop/upload/thumbnail/174.jpg" alt="2006_0102Shoshone#84.JPG" /></a>

But, I can't figure out where to find the methods or whatever for the image->display function. Sorry if this is a dumb question.

And, thanks!

-Henry

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #12252

You can do like this:

echo '<a class="hikashop_image_small_link" href="'.$this->image->uploadFolder_url.$image->file_path.'" rel="zoombox"><img src="'.$this->image->uploadFolder_url.'thumbnail/'.$image->file_path.'" alt="'.$image->file_name.'" /></a>';

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

  • Posts: 32
  • Thank you received: 1
13 years 7 months ago #12261

Yes, that works perfectly! Thank you, Nicolas. I am still mystified by how, but just glad it's working.

Also, thank you for suggesting Ninja Shadowbox (in another thread), which has a nice gallery mode. After installing and activating that module, and commenting out the main image in display | product | show, this code seems to work nicely for a simple pop-up image gallery:

echo '<a class="hikashop_image_small_link" href="'.$this->image->uploadFolder_url.$image->file_path.'" rel="shadowbox[GROUP1]"><img src="'.$this->image->uploadFolder_url.'thumbnail/'.$image->file_path.'" alt="'.$image->file_name.'" /></a>';

I wonder, does NinjaShadowbox like normal shadowbox require a $20 license for commercial use? Did they re-write shadowbox, or just Joomlify it? I suspect the latter. So, I'll buy a license here: www.shadowbox-js.com/#license

As usual, thank you for such fast support. I have definitely gotten my money's worth! Hopefully the next site with Hikashop I do, I will bother you less often.

-Henry

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

Time to create page: 0.059 seconds
Powered by Kunena Forum