VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: servlet on June 26, 2016, 18:19:26 PM

Title: Ask a question POP UP and Product image POP UP with different sizes...HOW?
Post by: servlet on June 26, 2016, 18:19:26 PM
How to set up different sizes of Pop Up boxes of Ask a question and Product image.
I tried to override css.

#fancybox-wrap {
    width: 260px !important;
}


#fancybox-content {
    height: 620px !important;
    width: 240px !important;
}


But this codes are for both popups. There is no different css tags for each popup... Why?
Title: Re: Ask a question POP UP and Product image POP UP with different sizes...HOW?
Post by: Studio 42 on June 26, 2016, 18:31:12 PM
hi,
fancy box can use option see askrecomjs.php. each link have another class
'a.ask-a-question, a.printModal, a.recommened-to-friend, a.manuModal'
, so you can overide it for your needs and use multiple call if you prefer with your own options.
Its only so to not duplicate same javascript code for nothing.
If you need, you can call another modal too.I use boostrap modal for eg in some case to not load fancybox, only used by virtuemart.
Title: Re: Ask a question POP UP and Product image POP UP with different sizes...HOW?
Post by: servlet on June 26, 2016, 21:56:23 PM
Thank you for replay.
I found askrecomjs.php but I dont know what to do :)
I think you suggest to ad new class in line you show me like a.enlarge-product-image after that you mean to set
a.enlarge-product-image
{
    width: 240px !important;
}
Title: Re: Ask a question POP UP and Product image POP UP with different sizes...HOW?
Post by: Studio 42 on June 27, 2016, 22:50:53 PM
NO,
you need to split the code and load each time fancybox with another settings.
'a.ask-a-question, a.printModal, a.recommened-to-friend, a.manuModal'
to
'a.ask-a-question' ...
'a.printModal'...
'a.recommened-to-friend'...
'a.manuModal'...
Or only some, depending your needs
Title: Re: Ask a question POP UP and Product image POP UP with different sizes...HOW?
Post by: servlet on October 12, 2016, 10:05:37 AM
The problem is that when press ADD to CART or ASK A QUESTION it load #fancybox-content which is with size 500x500
I need:
ADD to Cart block to be 600 x 200
ASK a question to be 200 x 800
Enlarged mage - max 1000 x max 1000

All of them use #fancybox.....

Maybe I dont have enough knowledge to do this.

I found extension which override product image so the problem with it is solved. But there is no extension for other...
Title: Re: Ask a question POP UP and Product image POP UP with different sizes...HOW?
Post by: servlet on October 12, 2016, 11:39:51 AM
Ahaaa
I found it templates/shape5_vertex/html/com_virtuemart/sublayouts/askrecomjs.php

I will try to do some changes...
Title: Re: Ask a question POP UP and Product image POP UP with different sizes...HOW?
Post by: jurassic on August 08, 2019, 19:47:22 PM
Maybe it will help someone.
If you want to make a "Ask a question" window without scrolling, here's a simple solution. Find templates/YOUR-THEME/html/com_virtuemart/sublayouts/askrecomjs.php make a change to line 36:
height: 550 I changed the height to 620 px and the window looks great.
Good luck