News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VM 3.0.10 Facebox malfunction

Started by n3t, October 03, 2015, 00:12:24 AM

Previous topic - Next topic

n3t

Hi,

when using facebox in VM 3.0.10, to display "Product added to cart" message, i simply does not work at all. Just shows empty facebox.
Moreover styling was changed by adding "close image" directly in JS. I used CSS to style close button, now I have two close buttons on empty window. Great.

The problem is, that in facebox.js, this line of code was deleted in 3.0.10
else if (data.text) fillFaceboxFromText(data.text, klass)
plus function fillFaceboxFromText

Its pitty, as vmprices.js USE this:

jQuery.facebox({ text: txt }, 'my-groovy-style');


The result is, that facebox is trying to display the content using this code

$('#facebox .content').empty().append(data)

but data is not html, but object, so append function has no effect, box remains empty.

Solution
Change in vmprices.js this line of code

jQuery.facebox({ text: txt }, 'my-groovy-style');

to

jQuery.facebox(txt, 'my-groovy-style');

n3t

Ok, close button was there always, even in 3.0.9 hardcoded in JS, but worng, so it didn't work. So it was coded in CSS also.
In 3.0.10 close button is removed from CSS, and remins hardcoded in JS.

Why? Styling should be done with CSS, not with combination of PHP, inline JS and hardcoded creating IMG element in JS file.

luislpv22


Milbo

The only solution is to use the fancybox.

I removed the facebox now,.. the facebox was old legacy and ist just not anylonger supported by facebox. So it does not work with the new jQuery. But fancybox works as far as I know always now.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

mkb-buerokonzepte.de

Quote from: Milbo on October 04, 2015, 22:01:52 PM
The only solution is to use the fancybox.

I removed the facebox now,.. the facebox was old legacy and ist just not anylonger supported by facebox. So it does not work with the new jQuery. But fancybox works as far as I know always now.

Hello,

I have the same issue after Update to VM 3.0.10.

The Popup dont display in the Product Details Page. It goes straight to the shopping cart.

When i try 'Fancybox' activate, it doesnt work for me. No
Popup is shown.

www.mkb-buerokonzepte.de


Milbo

#5
works for me
(notice: works for me on your page!)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

razor7

Quote from: Milbo on October 04, 2015, 22:01:52 PM
The only solution is to use the fancybox.

I removed the facebox now,.. the facebox was old legacy and ist just not anylonger supported by facebox. So it does not work with the new jQuery. But fancybox works as far as I know always now.

Great, switched to fancybox in VM config and it works!
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store

wonderland

I have the same problem. And I just can't switch to fancybox, because I'm using simple image gallery pro and by using fancybox the simple image gallery pro just doesn't function.
To me facebox was the perfect solution, because simple image gallery and facebox worked good together.

In order to get facebox to work, I replaced facebox.js in components/com_virtuemart/assets/js with facebox.js from VM 3.0.9 and now facebox works for me again.

I think it is not a bad idea to have an alternative to fancybox and I really hope that developers would leave this alternative.

AH

Unfortunately facebox is very old and at some point legacy stuff has to be jetisoned for the greater benefit of working on new stuff rather than maintaining legacy code.
Regards
A

Joomla 3.10.11
php 8.0

wonderland

Still an alternative wouldn't hurt.

Maybe someone can share their experience on how to best find JS problems? It's clear that simple image gallery pro and fancybox have some kind of problem working together, but unfortunately I know very little when it comes to JS :(

Milbo

The first problem was that the images appeared twice, so I updated it with the last version, which is already 4-5 years old. Then we got the new problems. The facebox project is abandoned and we discussed about the topic and more than 20 experienced developers said, they have no reason to keep it.

But of course, I understand your point. But it is almost inevitable to leave facebox, because it is not maintained anylonger.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

GJC Web Design

QuoteIt's clear that simple image gallery pro and fancybox have some kind of problem working together, but unfortunately I know very little when it comes to JS

also if you don't post a live url with the problem and describe it then no one can help either
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

wonderland

#12
Quote from: GJC Web Design on October 27, 2015, 21:46:19 PM
QuoteIt's clear that simple image gallery pro and fancybox have some kind of problem working together, but unfortunately I know very little when it comes to JS

also if you don't post a live url with the problem and describe it then no one can help either

I would gladly do that, I just didn't want to bother anyone with this, since this is not directly a VM problem, rather a compatibility problem with 3rd party module.

About my problem when I use facebox everything is working, but when I enable fancybox the gallery at the bottom (just below main picture) doesn't work anymore - http://bit.ly/1WhgBcQ

GJC Web Design

what do the simple image gallery pro people say?  (prob the same thing..  ;)  )

I assume both load fancybox or something similar?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

wonderland

#14
Yes, they both do load fancybox, but I'm not sure how to make it load just once.

They are saying to use facebox in this case :(

Just in case here is the link http://bit.ly/1WhgBcQ, gallery at the bottom (just below main picture)