VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: seweryn on August 22, 2012, 12:08:12 PM

Title: Facebox popup position
Post by: seweryn on August 22, 2012, 12:08:12 PM
Hello,

Facebox popup position is not correct in the VM 2.0.8e

In <head> I have code: "<style type="text/css"> #facebox { top: 150px!important } </style>"

Then they Facebox is always 150 pixels from the top and not at the center of the page.

I know that I must remove the code: "<style type="text/css"> #facebox { top: 150px!important } </style>", but nowhere can I find this passage.

Does anyone know how to remove it?
I ask for help.
Title: Re: Facebox popup position
Post by: bytelord on August 22, 2012, 12:55:44 PM
Hi,

Joomla version, VM version? Do you use any commercial or custom templates? Any demo link?
Title: Re: Facebox popup position
Post by: seweryn on August 22, 2012, 13:32:40 PM
Joomla 2.5.6
VM 2.0.8e

any templates, only Virtuemart files and my own template frontend.

in VM 2.0.9a I see that all works fine..

Could you help me please?
Title: Re: Facebox popup position
Post by: bytelord on August 22, 2012, 13:37:25 PM
Hello,

As i remember works great on 208e. If you want to change it, you can override it with CSS.
btw, the facebox css file is located under your_joomla_folder\components\com_virtuemart\assets\css\facebox.css

hope it helps you out

Regards.
Title: Re: Facebox popup position
Post by: seweryn on August 22, 2012, 13:51:49 PM
in facebox.css it isn't.
The style is in <head> of my index.php when I use Firebug I see: "<style type="text/css"> #facebox { top: 150px!important } </style>"

I think that is generate by some .js file
Title: Re: Facebox popup position
Post by: bytelord on August 22, 2012, 14:01:02 PM
please provide with a site url to check it.

may be you have installed an third party facebox plugin/compo/mod for your joomla web site and overrides it.
Title: Re: Facebox popup position
Post by: seweryn on August 22, 2012, 14:14:52 PM
I sent you url with private message.

Popup you can see when you add a product from menu: "Pro"

Thanks a lot.
Title: Re: Facebox popup position
Post by: bytelord on August 22, 2012, 14:47:48 PM
ok,

the css is produced from jquery javascript code and are produced just right, as you above there is top:272px.

<div style="left: 487.5px; display: block; top: 272px;" id="facebox"><div class="popup"><div class="content my-groovy-style"><div><a href="/kategoria-1" class="continue">Kontynuuj zakupy</a><a href="/koszyk" class="showcart floatright">Zawartość koszyka</a><div class="facebox1"> </div><h4>Produkt - test został dodany do koszyka.</h4></div></div> <a class="close" href="#"></a></div></div>

after that something overrides it and i think is the extra cart module you use, its mod_ice_virtuemart_cart modules, there is a javascript file called vmprices_2.js inside folder assets in the module folder that overrides the asset file from the original assets/vmprices.js!

you can change that override by overriding again by adding on your vm css override file the following code:

#facebox .popup {
top:xxxxpx;!important;
}


or just contact that module vendor and ask him!!


So, was an override after all and not vm issue, vm facebox works great! :) :)

Best regards


Title: Re: Facebox popup position
Post by: seweryn on August 22, 2012, 14:56:57 PM
Yes, this is problem with mod_ice_virtuemart_cart modules, when I turn off this module, facebox is on the right position.

Thank you so match! :)
Title: Re: Facebox popup position
Post by: bytelord on August 22, 2012, 15:00:46 PM
just override it or better change your cart module vmprices_2.js ;)
Title: Re: Facebox popup position
Post by: seweryn on August 22, 2012, 15:29:16 PM
It isn't in vmprices_2.js, it was in mod_ice_virtuemart_cart.php at line 34:

$document->addCustomTag('<style type="text/css"> #facebox { top: '.$margin_top.'px!important } </style>');

I remove this line.
Now all works fine! - module cart too ;)

Thanks you so match one more time!
Title: Re: Facebox popup position
Post by: bytelord on August 22, 2012, 16:29:41 PM
great then ;)