Popup image variant wrong and images issues

  • Posts: 117
  • Thank you received: 3
8 years 10 months ago #204818

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.41
-- Browser(s) name and version -- : Firefox

Scenario: a product with one or more variant. In the product page I choose the variant and it correctly shows the variant images, but when I click on the variant thumbnail image it shows me in the popup the default image of the product instead of the variant image.

Second issue: on Firefox, when I open the product page, it doesn't show me the product images, just the link and when I click on it, it open the popup but no image are displayed. Then if I refresh the page (Ctrl+F5) it correctly shows the images (thumbnails and popup)

No joomla cache is active or any other cache.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
8 years 10 months ago #204930

Hi,

1. Did you customize the product page display in any way ? Did you install some kind of third party extension to modify the image display ? Could you provide a link to the page ?

2. Could you provide a link to the page ?

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

  • Posts: 117
  • Thank you received: 3
8 years 10 months ago #205038

The problem seems not related to the template, also with default Joomla template I have the same problem. Any third party to modify images installed.

Link sent by PM.

Thanks

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

  • Posts: 26008
  • Thank you received: 4004
  • MODERATOR
8 years 10 months ago #205364

Hi,

In the view "show_block_img", please replace

			for(var i = thumbs_img.length - 1; i >= 0; i--) {
				o.removeClass(thumb_img[i], 'hikashop_child_image_active');
			}
By
			for(var i = thumbs_img.length - 1; i >= 0; i--) {
				o.removeClass(thumbs_img[i], 'hikashop_child_image_active');
			}
It should fix the javascript issue.

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.
The following user(s) said Thank You: hikaphil

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

  • Posts: 117
  • Thank you received: 3
8 years 9 months ago #206709

I've tryed your solution but seems not solve the issue.

We still have problems with the images. Sometimes images are not displayed at all in the product view and also when I click to open the popup it doen't load the image.

If I try to go to the direct link of the image then (with FireFox) I got the message that hte image is broken with some errors; then if I go to the same link WITHOUT https, for example, it loads the image correctly, then I go to image link WITH https and the image is loaded correctly too.

It's very strange. Sometimes everything seems work fine, meanwhile other times nothing works.

What could it be?

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

  • Posts: 117
  • Thank you received: 3
8 years 9 months ago #207985

As you an see in the attached image, sometimes the products images seems stop loading. I can't understand why.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
8 years 9 months ago #208933

Hi,

I tried to navigate through your website and was not able to reproduce the issue.
Do you have solved it ? If not are there any products with that issue appearing more frequently than others ?

As it seem to be related on the http[n]s[/b], do you have tried to not use the SSL on website but on the HikaShop checkout ?
You can potentially edit the url of the website in the Joomla configuration.php file, or edit the redirection rules on your server.

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

  • Posts: 27
  • Thank you received: 0
8 years 4 weeks ago #234527

Hello Xavier,

I realise that this topic is not quite new but thought it's better to continue here than starting a new one as my problem is identical to Crealiagroup's.

if you check this page on the following website:
capsulz.rq-vc.com/index.php/woman/produc...category_pathway-105

you'll have different behaviours depending on what you do first:
1. If you click the main image of the product, the popup shadow box will display a different variant.
2. If you first hover on one of the thumbnail, then click on the main image, the popup will display the first image of this variant (but not necessarily the one displayed), and the navigation arrows will not display on the shadowbox as if there was only one picture.

3. But, if you first select a variant from the drop down list (can also be the first one) then everything works as it should be: the right image pops out and the right amount of other images of the same variant are displayed through the arrows of the shadowbox.

Is there something to be done to correct this behaviour?

Many thanks
Raphael


edit: little correction, in case 3. if you don't hover over at least one thumbnail, you will have same result as with case 1. It's only after hovering one thumbnail that the popup works as it should.

Last edit: 8 years 4 weeks ago by skot. Reason: additional info

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
8 years 4 weeks ago #234530

Hi,

I checked the code on that page, but you're not using the code of the latest version of HikaShop, even though you have the latest version of HikaShop. This means that the problem is probably coming from your Joomla template.
Rename the file templates/YOUR_TEMPLATE/html/com_hikashop/product/show_block_img.php to something else via FTP and that will deactivate your template override of that view file and it will use the code of the latest version of HikaShop, hopefully fixing the problem in the process (we don't have it on our end).

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

  • Posts: 27
  • Thank you received: 0
8 years 4 weeks ago #234636

Hi Xavier,

You're right, new hikashop version doesn't have that problem anymore.

thanks for the help
Raphael

edit: however, I didn't want the thumbnails to open the popup window, only the main image.
And of course if I replace the new code:
echo $this->popup->image($html, $img->origin_url, $id, $attr, array('gallery' => 'hikashop_main_image'));

by

echo '<a '.$attr.' />'.$html.'</a>';

the thumbnails don't triger the popup anymore (good) but the main image doesn't display the right poped up picture. Is there something simple I'm missing ?

Last edit: 8 years 4 weeks ago by skot. Reason: forgot something

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

  • Posts: 13201
  • Thank you received: 2322
8 years 4 weeks ago #234720

Hi,

Another solution:
Still in the view "product / show_block_img" you can add the following code in the "<script>" part at the bottom of the html:

window.hikashop.ready(function(){
	hkjQuery('.hikashop_small_image_div a').each(function(){
		hkjQuery(this).attr('onclick','return false;');
	});
});
This code allow to only remove the onclick action and does not edit anything else.

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

Time to create page: 0.096 seconds
Powered by Kunena Forum