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

#   close the model window with the add to cart button

##

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

Less More

- Posts: 8
- Thank you received: 0
-
-

12 years 8 months ago [\#142522](#142522) by [deambacht](/forum/user/30292-deambacht "View deambacht's Profile")  *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142522 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")* was created by *[deambacht](/forum/user/30292-deambacht "View deambacht's Profile")*

-- url of the page with the problem -- : [ cafetariadeambacht.nl/bestel](http://cafetariadeambacht.nl/bestel)
-- HikaShop version -- :HikaShop Business: 2.2.3
-- Joomla version -- :2.5.17 Stable
-- PHP version -- :5.4.17
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi,
I want my product view to show in a pop-up, i have done it like explained here: [ ](http://www.hikashop.com/forum/2-general-talk-about-hikashop/64478-characteristics-options-in-add-to-cart-popup-help.html)[ www.hikashop.com/forum/2-general-talk-ab...cart-popup-help.html](http://www.hikashop.com/forum/2-general-talk-about-hikashop/64478-characteristics-options-in-add-to-cart-popup-help.html)

And it works fine but now it has to close when i click on the add to cart button. is this possible??

thanks frank

- [ ![hd5345b8.jpg](/forum/attachment/15115) ](/forum/attachment/15115 "hd5345b8.jpg") [ ](/forum/attachment/15115?download=1 "hd5345b8.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjU1OTgtY2xvc2UtdGhlLW1vZGVsLXdpbmRvdy13aXRoLXRoZS1hZGQtdG8tY2FydC1idXR0b24/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

12 years 8 months ago [\#142579](#142579) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142579 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Hi,

I guess that you'll want to change the line:
echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$max,$min);

of the view file quantity (via Display&gt;Views) to something like that:

echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,'window.top.hikashop.closeBox();'.$this-&gt;ajax,'',$max,$min);

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

12 years 8 months ago [\#142599](#142599) by [deambacht](/forum/user/30292-deambacht "View deambacht's Profile")  Replied by *[deambacht](/forum/user/30292-deambacht "View deambacht's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142599 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Hi Nicolas,

Thanks for the help and quick reply.
I changed the line in the quantity file. and now he close with the button ![:)](/media/kunena/emoticons/8.png ":)") , but he doesn't do the add to cart function anymore.
do u have any suggestion what could cause that?

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

12 years 8 months ago [\#142629](#142629) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142629 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Try this instead: Code:

echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax.'window.top.hikashop.closeBox();','',$max,$min);

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

12 years 8 months ago [\#142672](#142672) by [deambacht](/forum/user/30292-deambacht "View deambacht's Profile")  Replied by *[deambacht](/forum/user/30292-deambacht "View deambacht's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142672 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

i tried it, but now the model doesn't close anymore..

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

12 years 8 months ago [\#142688](#142688) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142688 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Does it add to cart? Do you have a JS message? Maybe this will be enought:
Code:

echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax.'; window.top.hikashop.closeBox();','',$max,$min);

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

12 years 8 months ago [\#142706](#142706) by [deambacht](/forum/user/30292-deambacht "View deambacht's Profile")  Replied by *[deambacht](/forum/user/30292-deambacht "View deambacht's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142706 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Yes it did add to cart and with the last modification it still add to cart. but not closing the model.
What do u mean with JS message?

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

12 years 8 months ago [\#142725](#142725) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142725 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

I just checked, could you put back Nicolas code so I can try again and see what's wrong?

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

12 years 8 months ago [\#142787](#142787) by [deambacht](/forum/user/30292-deambacht "View deambacht's Profile")  Replied by *[deambacht](/forum/user/30292-deambacht "View deambacht's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#142787 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

oke, Nicolas his code is back now ![;)](/media/kunena/emoticons/11.png ";)")

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

12 years 8 months ago [\#143478](#143478) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#143478 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Really? It does close but doesn't add to the cart, that's not what Nicolas' code should do?
Anyway it's going to be a bit harder than I though. The code that add to the cart end up by reloading the page so you can see you added your product. In this case the code closing the popup can't be executed so it will require mode code at different steps.

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

12 years 8 months ago [\#143994](#143994) by [deambacht](/forum/user/30292-deambacht "View deambacht's Profile")  Replied by *[deambacht](/forum/user/30292-deambacht "View deambacht's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#143994 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Yes that was indeed the result of nicolas'code modification.
yes he have to close just before the refresh but that wont be possible?

Maybe it makes a deference if we use dialog instead of mode?
Or on the product_list as accordion?

And thank you very much for the support so far.

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

12 years 8 months ago [\#144563](#144563) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#144563 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

You can try this solution but I'm not sure it will work.
The problem is that the code called to add to cart is also called in other places and modifying it may create issues on other aspects.

The function called is hikashopModifyQuantity in the file cart.php (administrator/components/com_hikashop/helpers).
You can try to add the code window.top.hikashop.closeBox(); either à the beginning (after the '(' ) or after these lines: Code:

if(hikaModule) hikaModule.innerHTML = result; };

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

12 years 7 months ago [\#147646](#147646) by [deambacht](/forum/user/30292-deambacht "View deambacht's Profile")  Replied by *[deambacht](/forum/user/30292-deambacht "View deambacht's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#147646 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Hi,
I've tried putting the code at both places (and some other places i could think of). but it doesn't work.
its either closing or add to cart never both..

May it help to use a dialog instead of model?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 7 months ago [\#148261](#148261) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#148261 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Hi,

Have you tried tu put it after: Code:

if(hikaModule) hikaModule.innerHTML = result;

and before the "};" ?

In this file the function is present twice, have you tried to add the code at the both places ?

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

12 years 7 months ago [\#148594](#148594) by [deambacht](/forum/user/30292-deambacht "View deambacht's Profile")  Replied by *[deambacht](/forum/user/30292-deambacht "View deambacht's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#148594 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

To make sure i've just tried that again

put the code
window.top.hikashop.closeBox();
after both
if(hikaModule) hikaModule.innerHTML = result;
lines

But it doesn't close the model

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 7 months ago -  12 years 7 months ago [\#149064](#149064) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[close the model window with the add to cart button](/forum/26-product-category-display/865598-close-the-model-window-with-the-add-to-cart-button#149064 "-- url of the page with the problem -- :   cafetariadeambacht.nl/bestel  -- HikaShop version -- :HikaShop Business: 2.2.3 -- Joomla version -- :2.5.17 Stable -- PHP version -- :5.4.17 -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I want my product view to show in a pop-up, i have done it like explained here:  And it works fine but now it has to close when i click on the add to cart button. is this possible??  thanks frank")*

Hi,

So it will require more editions than just add some javascript.
As it's a customization, we can't really help you on the forum.

If you really need this feature, you can potentially post a request in the commercial jobs part of our forum.

Last edit: 12 years 7 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjU1OTgtY2xvc2UtdGhlLW1vZGVsLXdpbmRvdy13aXRoLXRoZS1hZGQtdG8tY2FydC1idXR0b24/dG1wbD1tYXJrZG93bg==) 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.156 seconds

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

[](#top)
