Author Topic: VM 3.0.10 Facebox malfunction  (Read 7185 times)

n3t

  • Beginner
  • *
  • Posts: 32
  • A beginner
VM 3.0.10 Facebox malfunction
« on: October 03, 2015, 00:12:24 am »
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
Code: [Select]
else if (data.text) fillFaceboxFromText(data.text, klass)plus function fillFaceboxFromText

Its pitty, as vmprices.js USE this:
Code: [Select]
jQuery.facebox({ text: txt }, 'my-groovy-style');

The result is, that facebox is trying to display the content using this code
Code: [Select]
$('#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
Code: [Select]
jQuery.facebox({ text: txt }, 'my-groovy-style');
to
Code: [Select]
jQuery.facebox(txt, 'my-groovy-style');

n3t

  • Beginner
  • *
  • Posts: 32
  • A beginner
Re: VM 3.0.10 Facebox malfunction
« Reply #1 on: October 03, 2015, 00:22:28 am »
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

  • Beginner
  • *
  • Posts: 8
Re: VM 3.0.10 Facebox malfunction
« Reply #2 on: October 04, 2015, 00:22:33 am »
Same problem here

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VM 3.0.10 Facebox malfunction
« Reply #3 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.
I should 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

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: VM 3.0.10 Facebox malfunction
« Reply #4 on: October 19, 2015, 00:10:28 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VM 3.0.10 Facebox malfunction
« Reply #5 on: October 21, 2015, 02:48:22 am »
works for me
(notice: works for me on your page!)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

razor7

  • Jr. Member
  • **
  • Posts: 333
    • MGSCreativa - Professional VM!
Re: VM 3.0.10 Facebox malfunction
« Reply #6 on: October 27, 2015, 13:08:35 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

  • Beginner
  • *
  • Posts: 42
Re: VM 3.0.10 Facebox malfunction
« Reply #7 on: October 27, 2015, 18:14:28 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3165
  • VirtueMart Version: 3.6.11
Re: VM 3.0.10 Facebox malfunction
« Reply #8 on: October 27, 2015, 19:13:28 pm »
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.9.18
php 7.3

wonderland

  • Beginner
  • *
  • Posts: 42
Re: VM 3.0.10 Facebox malfunction
« Reply #9 on: October 27, 2015, 20:26:52 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VM 3.0.10 Facebox malfunction
« Reply #10 on: October 27, 2015, 21:06:21 pm »
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.
I should 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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9650
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: VM 3.0.10 Facebox malfunction
« Reply #11 on: October 27, 2015, 21:46:19 pm »
Quote
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

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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

wonderland

  • Beginner
  • *
  • Posts: 42
Re: VM 3.0.10 Facebox malfunction
« Reply #12 on: October 27, 2015, 21:55:20 pm »
Quote
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

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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9650
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: VM 3.0.10 Facebox malfunction
« Reply #13 on: October 27, 2015, 21:57:39 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

wonderland

  • Beginner
  • *
  • Posts: 42
Re: VM 3.0.10 Facebox malfunction
« Reply #14 on: October 27, 2015, 22:00:30 pm »
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)