VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: orangia on June 24, 2020, 11:24:27 am

Title: SOLVED Add to cart not working
Post by: orangia on June 24, 2020, 11:24:27 am
I have a customer where I have not made the site myself. The add to cart button is not functioning. The spinning wheel keeps loading and nothing happens with the cart. I have no idea if they have used some code that makes this happen, I simply helped them to update VirtueMart, Joomla, VirtueMart and One Page Checkout to the latest versions. It was a problem before this though, cause the reason they asked me to update was because of this issue.

This is the setup:
URL: https://olandsortagard.se/shop
Joomla: 3.9.19
Virtuemart: 3.8.4 10335
PHP version: 7.3.19
Template is made by Casework - http://www.casework.se
Plugins used: Vm Payment plugin Paysondirect, Vm Payment plugin paysoninvoice, VirtueMart One Page Checkout from JoomlaPro

If anyone could see the problem easy I am very grateful! :)

/Johanna, https://orangia.se
Title: Re: Add to cart not working
Post by: pinochico on June 24, 2020, 11:54:22 am
I think, this is template error - conflict with VM JS:
https://olandsortagard.se/components/com_virtuemart/assets/js/vmprices.js

Maybe better contact template developers.
Title: Re: Add to cart not working
Post by: orangia on June 24, 2020, 12:32:35 pm
Thanks pinochico!

I will send this info and image to the template developer, hope to see it solved by this. I'll let you know!

/Johanna, https://orangia.se
Title: Re: Add to cart not working
Post by: AnnieG13 on June 25, 2020, 08:29:12 am
I now am having the same problem, I did have the problem of the products not showing in cart, now cart won't load at all. (see screenshot)

At the top of the website page I'm getting these error messages.

Warning: Declaration of plgVmShipmentAuspostpac1::getVmPluginMethod($virtuemart_shipmentmethod_id) should be compatible with vmPlugin::getVmPluginMethod($int, $cache = false) in /home/puppylan/public_html/plugins/vmshipment/auspostpac1/auspostpac1.php on line 126

Notice: Trying to access array offset on value of type bool in /home/puppylan/public_html/administrator/components/com_virtuemart/helpers/vmcrypt.php on line 177

Notice: Trying to access array offset on value of type bool in /home/puppylan/public_html/administrator/components/com_virtuemart/helpers/vmcrypt.php on line 59

Using Joomla 3.9
virtuemart3.8
Template mx_joomla157

I have messaged the developer of the template and they said it works with virtuemart as seen here.    http://demo7.mixwebtemplates.com/?template=mx_joomla157


So not sure how to fix it now.

Thanks for any help Annie
Title: Re: Add to cart not working
Post by: GJC Web Design on June 25, 2020, 09:27:42 am
the warnings and notices are probably breaking the cart ajax return .. therefore the page is stuck on the throbber

the auspost warning would be fixed by using a well maintained up to date plugin like  https://extensions.joomla.org/extension/vm-aus-post-shipping-for-virtuemart/  ;)

the notices .. hmmm .. have you set up your safepath etc correctly... ? Which vm3.8 version?
you can try setting your error reporting to none

BTW .. please do not cross post into others postings .. your problem has nothing to do with the original... make anew post for a new problem

Title: Re: Add to cart not working
Post by: orangia on June 25, 2020, 10:02:58 am
We have now solved our issue! It seemed like the shop had been set offline! Not sure how I missed that!  ;D

/Johanna, https://orangia.se
Title: Re: SOLVED Add to cart not working
Post by: pinochico on June 25, 2020, 14:07:28 pm
to AnnieG13:

Quote
I now am having the same problem

is not the same problem. Is problem with shipment plugin, you must fixed - send info to developers this plugin


to orangia:

Great :)
Title: Re: SOLVED Add to cart not working
Post by: AnnieG13 on June 26, 2020, 15:34:05 pm
thanks for the advise.
Title: Re: SOLVED Add to cart not working
Post by: madscotsman on September 12, 2020, 18:16:57 pm
I have this problem too.

When I try to add a product to the cart, I just get a spinning wheel which doesn't seem to stop. I've tried a couple of templates, but it doesn't seem to make any difference.

Also I can only access the VM control panel when SEO is switched off in Joomla Global Configuration.

I'm currently using the Joomla Default Template. I also have the shipping information completed too.

Joomla 3.9.21 and VM  3.8.4 10335

Any hints as to how to fix this please?
Title: Re: SOLVED Add to cart not working
Post by: pinochico on September 12, 2020, 23:14:38 pm
Yes :)

No URL - No hints
Title: Re: SOLVED Add to cart not working
Post by: madscotsman on September 13, 2020, 09:49:09 am
HI,

Thanks for the reply.

My site is at www.nav-e-gate4less.co.uk
Title: Re: SOLVED Add to cart not working
Post by: GJC Web Design on September 13, 2020, 11:09:35 am
for some reason the ajax POST for add to cart is redirected to the home page

https://www.nav-e-gate4less.co.uk/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=en&Itemid=101

it should give an ajax return e.g.

http://demo.virtuemart.net/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=en&Itemid=925

check you have a VM menu and/or try with SEF off
Title: Re: SOLVED Add to cart not working
Post by: madscotsman on September 13, 2020, 12:24:37 pm
Hi Thanks for the reply.

The "Shop" Menu item is linked to the VM Categories

I've tried with SEO off and when I click on any categories to view some products, it just goes back to the home page. Same happens when I try and click on any of the products displayed on the home page.
Title: Re: SOLVED Add to cart not working
Post by: madscotsman on September 13, 2020, 13:05:44 pm
I've left SEO off just now, so you can see what is happening.
Title: Re: SOLVED Add to cart not working
Post by: GJC Web Design on September 13, 2020, 15:58:28 pm
I have no suggestions other than double check everything..
start disabling extensions etc

all vm links now simply 301'd to the home page .. 
Title: Re: SOLVED Add to cart not working
Post by: madscotsman on September 13, 2020, 18:04:55 pm
I've solved it now.

I had a component installed for Redirects, ReDir, as well as the core component for Redirects. So it was a case of transferring all the redirects in ReDir to the Core Component and uninstalling ReDir.

Many thanks for your help.