Skip to main content

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

More
2 years 9 months ago #357456 by coffee
-- 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.

More
2 years 9 months ago - 2 years 9 months ago #357458 by nicolas
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:
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:
Code:
<?php echo $this->fieldsClass->show($oneExtraField,$value); ?>
and it should work (not tested though)
Last edit: 2 years 9 months ago by nicolas.

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

More
2 years 9 months ago #357471 by coffee
Thanks Nicolas but it didn't work. Still just downloads.

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

More
2 years 9 months ago #357478 by nicolas
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.

More
2 years 9 months ago #357481 by coffee
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.

More
2 years 9 months ago - 2 years 9 months ago #357483 by Philip
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: 2 years 9 months ago by Philip.

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

More
2 years 9 months ago #357520 by nicolas
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.

More
2 years 9 months ago #357548 by coffee
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.179 seconds
Powered by Kunena Forum