VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: leatherboy on May 15, 2015, 18:39:34 PM

Title: Display modal popup upon 'Add to cart' not working - Must be server's issue
Post by: leatherboy on May 15, 2015, 18:39:34 PM
Hi.
I have an eshop using Joomla 2.5.27 and VM 2.6.10.
Recently I moved it to a new server and from this moment my site has some strange problems.
One, and the most serious is that when I click on Add to Cart it does nothing. If I disable pop up in VM settings the cart works. But I would like the pop up.
Strange is that exactly the same site works fine in my old server.
I talked with server's admin and he told me that maybe there is a problem in PHP components.
Could you plesase check in any way my problem and suggest me something ?
The working version is alisverisi.gr and it is working with php 5.5.2 and the faulty is optionco.gr working with php 5.4.
Thank you.


Title: Re: Display modal popup upon 'Add to cart' not working - Must be server's issue
Post by: GJC Web Design on May 16, 2015, 20:34:49 PM
for what ever reason the broken site isn't passing the prod id or cat etc when the add to cart is clicked
it is sending

http://optionco.gr/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=el&quantity%3D1%26quantity%255B%255D%3D1%26option%3Dcom_virtuemart%26view%3Dcart%26virtuemart_product_id%255B%255D%3D585%26virtuemart_category_id%255B%255D%3D40&_=1431800758102

decodes as

http://optionco.gr/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=el&quantity=1&quantity%5B%5D=1&option=com_virtuemart&view=cart&virtuemart_product_id%5B%5D=585&virtuemart_category_id%5B%5D=40&_=1431800758102

but is read as

_
1431800758102
format
json
lang el
nosef 1
option com_virtuemart
quantity=1&quantity%5B%5D...
task addJS
view cart


the working site sends

http://alisverisi.gr/index.php/el/?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=el&quantity=1&quantity%5B%5D=1&option=com_virtuemart&view=cart&virtuemart_product_id%5B%5D=1206&virtuemart_category_id%5B%5D=40&_=1431800687855

decodes as

http://alisverisi.gr/index.php/el/?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=el&quantity=1&quantity[]=1&option=com_virtuemart&view=cart&virtuemart_product_id[]=1206&virtuemart_category_id[]=40&_=1431800687855


_
1431800687855
format json
lang el
nosef 1
option com_virtuemart
quantity 1
quantity[] 1
task addJS
view cart view cart
virtuemart_category_id[] 40
virtuemart_product_id[] 1206


something is going  wrong with the add to cart form urlencoding seems like
Title: Re: Display modal popup upon 'Add to cart' not working - Must be server's issue
Post by: leatherboy on May 17, 2015, 15:00:40 PM
Thanks for your answer GJC.
For your information, I don't know if it helps somehow, I want to describe with a few words the history.

There was a server with optionco.gr, were the site was fully working. For some reasons unconnected with the proper functionality of the site, I moved to a new server. Exactly the first moment that the site went online I found that if a computer uses avira antivirus it blocks optionco.gr. If I disable avira's web protection the site works. The same computer up to some minutes before the transfer never blocked the site in the old server.
Then I did a copy to a third server as alisverisi.gr to check what will happen. And alisverisi.gr don't have any problem with avira's web protection.
I talked with Avira's service and they told me that there is no reason, they couldn't find any problem in my site optionco.gr. They don't know why it is blocked in my computer. And as I tested in other computers too.  This problem still exists.

Then I noticed the problem with the cart. The old site optionco.gr was working in the old server. It works as alisverisi.gr in the third server but it doesn't work in the new cloud server. In all three installations I didn't change any settings and I didn't do any new installations except that I added new products because I didn't notice that the cart wasn't working.

I have to say that just before I write my first post here. I did an exact copy of alisverisi.gr to optionco.gr/_test  and at the same time with exactly the same settings and contents alisverisi is working while optionco.gr/_test  dont.
At this momment you cant access _test. If you think it could help I will copy it again.

I talked with server's admin and he told me that maybe there is a problem in PHP components. And if someone from VM could say what is needed he could recompile the PHP adding the missing component. The new cloud server uses CPANEL WHM 11.48.4 (build 2), Centos CENTOS 6.6 x86_64, PHP 5.4 as SUPHP.
Previous server used Plesk 11.5, Centos 6.4  x86_64, PHP 5.3 and the third server were alisverisi works uses ISPConfig 3.0.5.4p4, Centos 6.4  x86_64, PHP 5.5.12 as PHP-FPM.

In the new cloud server I host about 50 more sites (but none eshop) and I didn't notice other problems.
Is it possible that some PHP components are missing ? Or how could I find a solution?

Thanks again
Christos