[Skip to main content](#vessel-content)

#   popup helper

##

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

5 years 10 months ago [\#328524](#328524) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  *[popup helper](/forum/32-content-creation/901712-popup-helper#328524 "Hello,  I need some help to get the settings of the popup helper to be in percentages, instead of px to make it work better on our site.. display( '', 'HIKASHOP&#95;EDIT&#95;CART&#95;PRODUCT', hikashop&#95;completeLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product&#95;id.'&amp;name='.$this-&gt;row-&gt;alias . $this-&gt;itemid . $this-&gt;category&#95;pathway, $this-&gt;row), 'edit&#95;cart&#95;product', 800, 600, 'title=&quot;'.JText::&#95;('CHOOSE&#95;OPTIONS').'&quot;', '', 'link' );  ?&gt; I have this code. Please Help and see attachement.")* was created by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")*

Hello,

I need some help to get the settings of the popup helper to be in percentages, instead of px to make it work better on our site..
&lt;?php
$popupHelper = hikashop_get('helper.popup');
echo ' '.$popupHelper-&gt;display(
'&lt;i class="hikabtn" style="background: transparent; border-color: #3182CE;" &gt;&lt;img src="/images//Plusje.png"/&gt;&lt;/i&gt;',
'HIKASHOP_EDIT_CART_PRODUCT',
hikashop_completeLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product_id.'&amp;name='.$this-&gt;row-&gt;alias . $this-&gt;itemid . $this-&gt;category_pathway, $this-&gt;row),
'edit_cart_product',
800, 600, 'title="'.JText::_('CHOOSE_OPTIONS').'"', '', 'link'
);

?&gt;
I have this code.
Please Help and see attachement.  [ ![screenshot-06.bluepoint-concept.nl-2021.01.21-13&#95;59&#95;20.png](/forum/attachment/51707) ](/forum/attachment/51707 "...1-13&#95;59&#95;20.png")

- [ ![screenshot-06.bluepoint-concept.nl-2021.01.21-13&#95;59&#95;20.png](/forum/attachment/51707) ](/forum/attachment/51707 "...1-13&#95;59&#95;20.png") [ ](/forum/attachment/51707?download=1 "...1-13&#95;59&#95;20.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAxNzEyLXBvcHVwLWhlbHBlcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

5 years 10 months ago [\#328535](#328535) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[popup helper](/forum/32-content-creation/901712-popup-helper#328535 "Hello,  I need some help to get the settings of the popup helper to be in percentages, instead of px to make it work better on our site.. display( '', 'HIKASHOP&#95;EDIT&#95;CART&#95;PRODUCT', hikashop&#95;completeLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product&#95;id.'&amp;name='.$this-&gt;row-&gt;alias . $this-&gt;itemid . $this-&gt;category&#95;pathway, $this-&gt;row), 'edit&#95;cart&#95;product', 800, 600, 'title=&quot;'.JText::&#95;('CHOOSE&#95;OPTIONS').'&quot;', '', 'link' );  ?&gt; I have this code. Please Help and see attachement.")*

Hi,

As a quick and dirty way, you could try changing the code: Code:

settings.content = '&lt;iframe style="border:0;margin:0;padding:0;" name="hikashop_popup_iframe" width="'+settings.x+'px" height="'+settings.y+'px" src="'+href+'"&gt;&lt;/iframe&gt;'; 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: Code:

&lt;script&gt; window.hikashop.openBox_vex = function(elem, url) { if(typeof(vex) == "undefined") return false; var href = elem.href &#124;&#124; null; if(url !== undefined &amp;&amp; url !== null) href = url; if(!href) href = elem.getAttribute('href'); settings = window.Oby.evalJSON(elem.getAttribute('data-vex')); if(settings.x &amp;&amp; settings.y &amp;&amp; href) { settings.content = '&lt;iframe style="border:0;margin:0;padding:0;" name="hikashop_popup_iframe" width="'+settings.x+'%" height="'+settings.y+'%" src="'+href+'"&gt;&lt;/iframe&gt;'; settings.afterOpen = function(context) { context.width(settings.x + '%'); }; } vex.defaultOptions.className = 'vex-theme-default'; vex.open( settings ); &lt;/script&gt;

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).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAxNzEyLXBvcHVwLWhlbHBlcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

5 years 10 months ago [\#328577](#328577) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[popup helper](/forum/32-content-creation/901712-popup-helper#328577 "Hello,  I need some help to get the settings of the popup helper to be in percentages, instead of px to make it work better on our site.. display( '', 'HIKASHOP&#95;EDIT&#95;CART&#95;PRODUCT', hikashop&#95;completeLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product&#95;id.'&amp;name='.$this-&gt;row-&gt;alias . $this-&gt;itemid . $this-&gt;category&#95;pathway, $this-&gt;row), 'edit&#95;cart&#95;product', 800, 600, 'title=&quot;'.JText::&#95;('CHOOSE&#95;OPTIONS').'&quot;', '', 'link' );  ?&gt; I have this code. Please Help and see attachement.")*

I put this in my product / add_to_cart_ajax.php to show the options in a pop up like you have in checkout.
But responsive this is not working correctly? Not in the checkout and not here ?? please help..  [ ![screenshot-06.bluepoint-concept.nl-2021.01.22-13&#95;54&#95;27.png](/forum/attachment/51726) ](/forum/attachment/51726 "...2-13&#95;54&#95;27.png")

&lt;?php
$popupHelper = hikashop_get('helper.popup');
echo ' '.$popupHelper-&gt;display(
'&lt;i class="hikabtn" style="background: transparent; border-color: #3182CE;" &gt;&lt;img src="/images//Plusje.png"/&gt;&lt;/i&gt;',
'HIKASHOP_EDIT_CART_PRODUCT',
hikashop_completeLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product_id.'&amp;name='.$this-&gt;row-&gt;alias . $this-&gt;itemid . $this-&gt;category_pathway, $this-&gt;row),
'edit_cart_product',
600, 600, 'title="'.JText::_('CHOOSE_OPTIONS').'"', '', 'link'
);

?&gt;

I

- [ ![screenshot-06.bluepoint-concept.nl-2021.01.22-13&#95;54&#95;27.png](/forum/attachment/51726) ](/forum/attachment/51726 "...2-13&#95;54&#95;27.png") [ ](/forum/attachment/51726?download=1 "...2-13&#95;54&#95;27.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAxNzEyLXBvcHVwLWhlbHBlcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

5 years 10 months ago [\#328585](#328585) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[popup helper](/forum/32-content-creation/901712-popup-helper#328585 "Hello,  I need some help to get the settings of the popup helper to be in percentages, instead of px to make it work better on our site.. display( '', 'HIKASHOP&#95;EDIT&#95;CART&#95;PRODUCT', hikashop&#95;completeLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product&#95;id.'&amp;name='.$this-&gt;row-&gt;alias . $this-&gt;itemid . $this-&gt;category&#95;pathway, $this-&gt;row), 'edit&#95;cart&#95;product', 800, 600, 'title=&quot;'.JText::&#95;('CHOOSE&#95;OPTIONS').'&quot;', '', 'link' );  ?&gt; I have this code. Please Help and see attachement.")*

Hi,

We would need a link to the page to check on the situation. To be able to say anything.
Could you provide that ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAxNzEyLXBvcHVwLWhlbHBlcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

5 years 10 months ago [\#328638](#328638) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[popup helper](/forum/32-content-creation/901712-popup-helper#328638 "Hello,  I need some help to get the settings of the popup helper to be in percentages, instead of px to make it work better on our site.. display( '', 'HIKASHOP&#95;EDIT&#95;CART&#95;PRODUCT', hikashop&#95;completeLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product&#95;id.'&amp;name='.$this-&gt;row-&gt;alias . $this-&gt;itemid . $this-&gt;category&#95;pathway, $this-&gt;row), 'edit&#95;cart&#95;product', 800, 600, 'title=&quot;'.JText::&#95;('CHOOSE&#95;OPTIONS').'&quot;', '', 'link' );  ?&gt; I have this code. Please Help and see attachement.")*

Hello,

The link to the page: [ 06.bluepoint-concept.nl/resto-111.html](https://06.bluepoint-concept.nl/resto-111.html)
when clicking on the plus, i made the pop up.
But responsive this is not working as on your demo site..
See screenshot.  [ ![screenshot-nimbus-capture-2021.01.25-10&#95;09&#95;14.png](/forum/attachment/51753) ](/forum/attachment/51753 "...5-10&#95;09&#95;14.png")

- [ ![screenshot-nimbus-capture-2021.01.25-10&#95;09&#95;14.png](/forum/attachment/51753) ](/forum/attachment/51753 "...5-10&#95;09&#95;14.png") [ ](/forum/attachment/51753?download=1 "...5-10&#95;09&#95;14.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAxNzEyLXBvcHVwLWhlbHBlcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

5 years 10 months ago [\#328652](#328652) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[popup helper](/forum/32-content-creation/901712-popup-helper#328652 "Hello,  I need some help to get the settings of the popup helper to be in percentages, instead of px to make it work better on our site.. display( '', 'HIKASHOP&#95;EDIT&#95;CART&#95;PRODUCT', hikashop&#95;completeLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product&#95;id.'&amp;name='.$this-&gt;row-&gt;alias . $this-&gt;itemid . $this-&gt;category&#95;pathway, $this-&gt;row), 'edit&#95;cart&#95;product', 800, 600, 'title=&quot;'.JText::&#95;('CHOOSE&#95;OPTIONS').'&quot;', '', 'link' );  ?&gt; I have this code. Please Help and see attachement.")*

Hi,

I didn't find the code I provided before on your URL.

But even without it, I can see that the popup automatically resizes to the page width.
So to me, it looks like it works just fine:
[ monosnap.com/file/3kkfQge67xWdctZOJ7Z8ONqsUIeLpx](https://monosnap.com/file/3kkfQge67xWdctZOJ7Z8ONqsUIeLpx)
The problem is with the content inside the popup which isn't made to adapt to the small width available, not the popup itself.
I see you've already added CSS to cope with that for the top area of the product page:
@media (max-width: 767px){
.hikashop_product_top_part {
width: 60%;
}
}
in the file media/com_hikashop/css/style_custom1.css
a similar CSS could be added for the main area:
@media (max-width: 767px){
.hk-row-fluid {
width: 60%;
}
}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAxNzEyLXBvcHVwLWhlbHBlcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.076 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
