New custom field containing an image (Not a paid download)

  • Posts: 6
  • Thank you received: 1
  • Hikashop Business
4 months 2 weeks ago #357456

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 4

Hi
I have a site that is a catalogue only (no prices or purchases)

I'm trying to create a custom image field containing an image that I want only certain groups to see and not be downloadable.

Basically I need to show a product and some people need to see an image of the internal archived catalog page. Also the image can only be download by admin.

I can restrict the access and stop downloads via htaccess file. So thats not a problem.

The ajax image custom field does what I want except I can't use the fancy box to show the big image it just downloads the image when you click on it.

Is there some way of having a second/third set of images like the main product image?

I have done a work around using a wyswyg field but its very clunky

Thanks

Denis

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
4 months 2 weeks ago #357458

Hi,

A custom product field of the type AJAX image is already supposed to display the images direclty on the product page.
But yes, there is no mechanism to display it with a popup system and it just downloads it. That would require some development to have it support fancybox.
I think the modification shouldn't be too complex though.
In the file show_block_custom_main ( which you can edit via the Display>Views menu), you could add the code:

<?php if($oneExtraField->field_type='ajaximage') { ?>
<script>Fancybox.bind('#hikashop_product_custom_value_<?php echo $oneExtraField->field_id;?> a', {});</script>
<?php } ?>
after the line:
<?php echo $this->fieldsClass->show($oneExtraField,$value); ?>
and it should work (not tested though)

Last edit: 4 months 2 weeks ago by nicolas.

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

  • Posts: 6
  • Thank you received: 1
  • Hikashop Business
4 months 2 weeks ago #357471

Thanks Nicolas but it didn't work. Still just downloads.

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
4 months 2 weeks ago #357478

As I said, this was not tested.
Could you provide the URL of the page so that I could have a look at the situation ?

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

  • Posts: 6
  • Thank you received: 1
  • Hikashop Business
4 months 2 weeks ago #357481

Hi nicolas I've created an admin logon for you. Is there a way of privately sending you the details?

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

  • Posts: 4533
  • Thank you received: 612
  • MODERATOR
4 months 2 weeks ago #357483

Hello,

You have to use our Contact us form to provide these elements, and don't forget to add an Url Link to this topic in your message.
Regards

Last edit: 4 months 2 weeks ago by Philip.

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
4 months 2 weeks ago #357520

Hi,

Thanks for the access. I found the issue. It was the extra \ in my code which were not needed and created a js error.
i've updated the code in my previous message with the correct code.

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

  • Posts: 6
  • Thank you received: 1
  • Hikashop Business
4 months 2 weeks ago #357548

Hi Nicolas,

than you so much for that. Excellent support as always.

All the best

Denis

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

Time to create page: 0.072 seconds
Powered by Kunena Forum