Update VirtueMart 3.0.12 to 3.0.14 - add to cart POPUP Facebox not work

Started by Tonimito, March 15, 2016, 12:02:18 PM

Previous topic - Next topic

Tonimito

Hello,

When upgrading from VirtueMart 3.0.12 to 3.0.14, the POPUP of Facebox of AddToCart not work. Any solution?

Thank you!

jenkinhill

Facebox works OK for me with VM3.0.14 using VM default templates on Protostar. The prefered fancybox also works OK.  Are you using a commercial template or overrides?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Tonimito

Yes, use the Blank template for http://www.t3-framework.org

I also do an override of cart/padded.php

So far it has worked.

Thank you!

milstan

I have the same issue. In my case, this problem is only in NGINX server with URL rewrite enabled. The same VM with same template works fine on Apache server with rewrite enabled.

Regards

milstan

This is output from console on NGINX server:

Failed to load resource: the server responded with a status of 404 (Not Found):
http://www.mysite.com/vmfolder/index.php/vmcategory/undefinedindex.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=jsonundefined&Itemid=256

Milbo

Our demo.virtuemart.net runs also on a nginx with rewrite and so far I know it works (just tested) but we use the fancybox. There is any special reason to use the old facebox?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Ghost

Undefined usually means no variable has been passed in JS. Can be a JS conflict or template issue. See this in vmprices.js:

url: Virtuemart.vmSiteurl + "index.php?&option=com_virtuemart&view=productdetails&task=recalculate&format=json&nosef=1" + Virtuemart.vmLang,

Probably on your site Virtuemart.vmSiteurl and Virtuemart.vmLang are missing (or you have JS issues) and thus undefined is being added to URL instead.

Ghost

Also can someone test this:

1. Enable Facebox.
2. Go to product page.
3. Click on ask a question or recommend to a friend.
4. Close the popup.
5. Click on add to cart button on the same page.

I see this error in console: TypeError: jQuery.facebox is not a function

milstan

I found a solution, at least for problem on my installation. Whenever I have an issue with VM, I am disabling all overrides and use default Joomla template (Protostar). So, in my case, template was not an issue.

I have two identical VirtueMart installations (all Joomla files and entire db are identical), one on Apache and another of NGINX server.

1. Problem occurs AFTER upgrade to VM 3.0.14.
2. Problem occurs on NGINX server only. On Apache, everything works fine after upgrade.

In VirtueMart configuration "Using the VirtueMart jQuery" was disabled. When I enable it, the problem is gone.

Thanks

mcevoli

Hello!

I have the same problem with add to cart button (I have a theme based on T3 framework).
The add to cart button is not working and is redirecting to cart page (without adding anything).
But other modals (I have a quick view plugin) are working.

The strange thing is if I open quick view modal, then I close IT, the add to cart modal button WORKS!

Any idea?

AH

Regards
A

Joomla 4.4.5
php 8.1

Tonimito

Hello!
I found the error is in: components/com_virtuemart/assets/js/vmprices.js

There is a change in version 3.0.14 a new variable in Javascript "virtuemart":

3.0.12 VM = window.vmSiteurl
3.0.14 VM = virtuemart.vmSiteurl

I changed file vmprices.js from 3.0.12 and it works, I have compared and only this change on this variable.

Any idea what happens to not recognize the virtuemart.vmSiteurl variable?

Regards!

Jimmie

Similar problem since update to 3.0.14
When visiting my website with a "fresh" browser (Google, Edge) for the first time in the morning and adding a product in the basket results in a cart page without products. Adding the product a second time is the solution... third, fourth.. no problem. Only the first visit to the site! Anyone?
Joomla 3.5.0
VM 3.0.14
Kind regards, John
gezondehuidwinkel.nl

Doomas

I have the same problem.

Joomla 3.5.1
Virtuemart: 3.0.16

I found the problem is the "Show cart" link in the "Add to Cart" Pop-up. My customers site runs on https, but the "Show cart" link in the Pop-up points to http://.... . I don't know excatly what happens, but I think the first time you click on the link( non SSL) Joomla creates a new session and therefore it shows you an empty car.

However the Problem is the wrong link. And it should point to https instead of http.

For now I solved the problem with an override of cart/padded.php. Where I hard coded the correct "show cart" link.

Thomas Kuschel

@Doomas, Tonimito: I started a new topic, maybe this could help with the http:// fail: please test this code at http://forum.virtuemart.net/index.php?topic=133941.0
Thomas