No image displayed in product variant

  • Posts: 111
  • Thank you received: 0
9 years 4 months ago #239373

-- url of the page with the problem -- : www.portal-gestao.com/forma%C3%A7%C3%A3o...a-finan%C3%A7as.html
-- HikaShop version -- : 262
-- Joomla version -- : 351
-- PHP version -- : 5.5.31
-- Browser(s) name and version -- : All browsers
-- Error-message(debug-mod must be tuned on) -- : No image

Hello,
In the page above, when selecting the variant "Local", the image disappears.
It should be the same image as the main product. I tried uploading the same image to both variants but the problem persists.
How can I fix this?
Thank you.

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

  • Posts: 84311
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #239386

Hi,

I've checked your link but I do get the image regardless of the variant I'm selecting:
take.ms/CEfIz

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

  • Posts: 111
  • Thank you received: 0
9 years 4 months ago #239406

Hello,
I tried in FF and Chrome and they both clear the image as soon as I press any of the radio buttons.
Have a look: herer

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

  • Posts: 84311
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #239433

Hi,

I'm still not able to reproduce the problem.
But well, the solution is easy. Remove the code:

$this->setLayout('show_block_img');
		echo $this->loadTemplate();
from the file "show" of the view "product" via the menu Display>Views and that will prevent the image switch when you change the variant.

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

  • Posts: 111
  • Thank you received: 0
9 years 4 months ago #239517

Hi,

I can find:

$this->setLayout($this->productlayout);
echo $this->loadTemplate();

In lines 72 and 73 from product / show.php
But can't find the code you are referring to.

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

  • Posts: 84311
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #239522

Hi,

Look again, it's there: take.ms/5QApO
It's about a hundred lines below the lines you are referring to.

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

  • Posts: 111
  • Thank you received: 0
9 years 4 months ago #239607

Hello,
Thanks, I've found the lines of code and deleted them, but the images are still being deleted whenever a radio button is selected.

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

  • Posts: 84311
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #239618

Hi,

I still see the variants image in the HTML of the page: take.ms/61FyJ
If you had removed that PHP code, it shouldn't happen.
So I guess that you must have done the change to the view file for another template than the template you're using of your frontend. So please check that you're editing the correct view file for the correct template.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum