Questions about the image popup selector

  • Posts: 628
  • Thank you received: 16
2 years 7 months ago #312162

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.12

Hi,

First of all, this thread comes from here:

www.hikashop.com/forum/23-market-how-to/...-popup-selector.html

Jerome has recommended me to post it here to get more help.



We need to duplicate the function shown in the attachment to show paths instead of images and insert it into an external input field.



The input field is connected to a custom field of Hikashop (text type) and we need to save the selected server path into this field.



We have some questions regarding this customization:

1. How to call that popup iframe (as shown in the attachment) from a custom button / link.

2. How to change the root position of the tree to show the root of the server

3. How to insert the value selected in the iframe to the custom field




Can you help us with that?

Thanks in advance.

--
Victor

Attachments:

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

  • Posts: 75475
  • Thank you received: 11742
  • MODERATOR
2 years 7 months ago #312164

Hi,

1. That is easy. Just look at the HTML of the popup and you'll get the "source" attribute of the iframe tag.
If you call that same URL, you'll get the interface. And to have it into a popup there are many ways to do it in Joomla:
stackoverflow.com/questions/13023602/pop-up-in-joomla
quantumwarp.com/kb/articles/30-joomla/60...3rd-party-extensions

2. There is no option for that. You could add an extra parameter to the URL of point 1 and then modify the galleryimage function of administrator/components/com_hikashop/views/upload/view.html.php to change the root based on that parameter.

3. You can redefine window.hikashop.submitFct(images) in a view override of the product edition page as this will be the callback function of the image popup selector. In it, you can get the selected path(s) in the variable images and store that in your custom field input with a bit of javascript.

The following user(s) said Thank You: PeterChain

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

Time to create page: 0.065 seconds
Powered by Kunena Forum