Setting up an internet bookstore based on Joomla 2.5.16 CMS and VirtueMart 2.0.24c. My entire site (https://agenty-buduschego.ru) runs on nginx and is using SSL which is forced by enabling rewrite mode in .htaccess file.
The problem is, no Virtuemart functions that use Javascript code (such as adding to cart, filling dropdown with state/province in the user profile, sending email to users from within Virtuemart backend) don't work. VirtueMart uses jQuery 1.6.1 supplied within assets library to do all those vital things.
This is a cross-browser issue.
Below are is an example query and HTTP response headers I'm getting viewed with Firebug in Firefox:
Add to cart GET request:
https://agenty-buduschego.ru/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&quantity%3D1%26quantity%255B%255D%3D1%26view%3Dcart%26virtuemart_product_id%255B%255D%3D6%26option%3Dcom_virtuemart&_=1386495981382
Request headers:
Accept application/json, text/javascript, */*; q=0.01
Accept-Encoding gzip, deflate
Accept-Language ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Cookie 4eb57c2cab77304872032c29b810ab83=ru-RU; 4eb57c2cab77304872032c29b810ab83=ru-RU; ce03aacdace0d694b35279c3e291619f=4F4313455311+8+75855145914305D50+7445B+55E30+A+4+411114E1642+5414716+94452415C446D555F+144+1+0+252+61019; 192fa9b374f512ee8093cd079b0847d4=eq6n1ih7m80efupendqjhemhb4
Host agenty-buduschego.ru
Referer https://agenty-buduschego.ru/index.php?option=com_virtuemart&view=user&layout=edit&lang=ru
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:25.0) Gecko/20100101 Firefox/25.0
X-Requested-With XMLHttpRequest
Visually, this produces a hourglass popup in the browser, and with the Firebug, I can view response headers and "303 see other" error in jquery.min.js (line 18)
Response headers:
Connection keep-alive
Content-Length 0
Content-Type text/html; charset=utf-8
Date Sun, 08 Dec 2013 09:46:07 GMT
Location http://agenty-buduschego.ru/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&quantity[0]=1&virtuemart_product_id[0]=6&_=1386495981382&lang=ru
Server nginx
This appears to be connected to SSL enabled on the site, because "303 see other" is told to be a redirect request to the browser to a specified Location, and I can see the "Location" header begins with http://
Another example of non-working JS thing is the empty state/provice dropdown in the user profile, while the following GET appears to complete successfully if pasted directly into the browser's address line:
https://agenty-buduschego.ru/index.php?option=com_virtuemart&view=state&format=json&virtuemart_country_id=176&lang=ru
Virtuemart forum hasn't been helpful, I only was advised to investigate my SSL setup, although the problem seems to be widespread among Virtuemart users and every found thread on this breaks with no solution provided.
I suspect that replacing of jQuery library or hacking into VM code might help, but would be thankful for getting any direction to investigate this in depth.
Any ideas?
UPD: Got the Add to Cart button working by unticking the Display modal popup upon ‘Add to cart’ box in the Checkout tab of Virtuemart conguration.
It's a partial work-around, though, because other Ajax functions still don't work.
Feeling that the problem needs just one final kick to solve.
Maybe motools scripts are shadowing over jQuery scripts?..
From the header of the User Profile page:
<script type="text/javascript" src="/components/com_virtuemart/assets/js/jquery.min.js">
<script type="text/javascript" src="/components/com_virtuemart/assets/js/jquery.noConflict.js">
<script type="text/javascript" src="/components/com_virtuemart/assets/js/vmsite.js">
<script type="text/javascript" src="/components/com_virtuemart/assets/js/chosen.jquery.min.js">
<script type="text/javascript" src="/media/system/js/mootools-core.js">
<script type="text/javascript" src="/media/system/js/core.js">
<script type="text/javascript" src="/media/system/js/mootools-more.js">
<script type="text/javascript" src="/media/system/js/tabs.js">
<script type="text/javascript" src="/media/system/js/validate.js">
<script type="text/javascript" src="/components/com_virtuemart/assets/js/vmtabs.js">