This topic contains 1 reply, has 2 voices, and was last updated by Alex 3 years, 10 months ago.
how to change link for image in infobox?
The topic ‘how to change link for image in infobox?’ is closed to new replies.
This topic contains 1 reply, has 2 voices, and was last updated by Alex 3 years, 10 months ago.
Hello,
is there a way to change the link for the image in the infobox?
I don’t need to open a modal to see the whole picture, but instead I would like to use this link to go to the store external url.
Is there a way to do this?
TIA
tony
Hi Tony,
Thanks for reaching out, for Mega Store Locator theme, you can perform the following edits to achieve this.
1) Edit mega-embed.php
Search for the following code:
function showPopup(t,i) { jQuery('.popup-title').html(t); jQuery('#popup-image').attr('src',i); jQuery('#mainPopupHolder, #modernBrowserPopup').addClass('is-shown'); }
Change it to:
function showPopup(t,i,ext) { var ext = ext.split("https://"); var ext2 = String(ext[1]).replace('"><div class="btn-super-info">View More</div></a>',""); document.location.href="https://"+ext2; //window.open("https://"+ext2); }
* If your link is not in https:// change it to http://
2) Edit js/mega-superstorefinder.js
Search for the following code:
showPopup(_store.location,imgpath+ori_img);
Change it to:
showPopup(_store.location,imgpath+ori_img,_store.exturl);
Save and upload both files, clear browser cache and refresh the page.
Take note, these given codes are just suggestions and support is not provided. We’ve tested it at our testing site and it’s proven to work. If you’re facing issue with the code, best to contact our devs team directly to perform customization.
Based on Codecanyon support policy here, the off-the-shelf product features come as it is as per item description and live preview page, customization is not part of the support scope, however can be requested to our devs team via the contact form here if needed.
Cheers,
Alex
The topic ‘how to change link for image in infobox?’ is closed to new replies.