Hi,
As a quick and dirty way, you could try changing the code:
settings.content = '<iframe style="border:0;margin:0;padding:0;" name="hikashop_popup_iframe" width="'+settings.x+'px" height="'+settings.y+'px" src="'+href+'"></iframe>';
settings.afterOpen = function(context) { context.width(settings.x + 'px'); };
to have % instead of px in the file media/com_hikashop/css/hikashop.js
But that will cause many problems :
- popups are used in other places and if you change px to % for all of them, then it will break the other popups. So you would need some more complex code.
- this requires modifying a core file of hikashop. So when you update, you'll have to reapply your change.
A nicer way would be to redefine the window.hikashop.openBox_vex function with custom javascript in your view override.
For example:
<script>
window.hikashop.openBox_vex = function(elem, url) {
if(typeof(vex) == "undefined")
return false;
var href = elem.href || null;
if(url !== undefined && url !== null)
href = url;
if(!href) href = elem.getAttribute('href');
settings = window.Oby.evalJSON(elem.getAttribute('data-vex'));
if(settings.x && settings.y && href) {
settings.content = '<iframe style="border:0;margin:0;padding:0;" name="hikashop_popup_iframe" width="'+settings.x+'%" height="'+settings.y+'%" src="'+href+'"></iframe>';
settings.afterOpen = function(context) { context.width(settings.x + '%'); };
}
vex.defaultOptions.className = 'vex-theme-default';
vex.open( settings );
</script>
Now this supposes that the width function of vex supports percentages, which might not be the case. But at least you won't have an issue with popups on other places of your website, and no problem with updates (at least until we remove the vex popup system for a better one, but we don't have such plans).