VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: fing086 on January 25, 2021, 23:41:44 PM

Title: Add to Cart not functioning on Category Page
Post by: fing086 on January 25, 2021, 23:41:44 PM
Hi, Im using VirtueMart 3.8.6 10373 and Joomla 3.9.24.

When I try to 'add to cart' from the category page, nothing happens, no errors etc.
When I 'add to cart' from the products page, it works fine with no issues.

The site is www.lasercraftandcommercial.com

Any advice will be gratefully appreciated, I have searched the forums but can't find a suitable solution that works for me.
Title: Re: Add to Cart not functioning on Category Page
Post by: pinochico on January 26, 2021, 00:14:32 AM
QuoteWhen I try to 'add to cart' from the category page, nothing happens, no errors etc.

Sure?
Try again pls, I see JS error :)
Title: Re: Add to Cart not functioning on Category Page
Post by: fing086 on January 26, 2021, 00:51:17 AM
Im not seeing any error at all, im using Safari and Chrome?

If you are seeing an error then that's better than I'm getting, could you tell me what the error is and how to fix it?
Thanks
Title: Re: Add to Cart not functioning on Category Page
Post by: pinochico on January 26, 2021, 05:07:43 AM
QuoteIm not seeing any error at all, im using Safari and Chrome?
I use safari and chrome too on my macbook pro.

and see this error:

[Error] TypeError: undefined is not an object (evaluating 'jQuery.fancybox.showActivity')
   (anonymous function) (vmprices.js:95)
   (anonymous function) (vmprices.js:83)
   (anonymous function) (vmprices.js:223)
   dispatch (jquery.min.js:2:44210)
   (anonymous function) (jquery.min.js:2:40946)

the problem is then fancybox is not defined if you loaded jquery. I don't know fix exactly now - I would have to do the analysis and devote more time to it , but I think the problem is

conflict between template and a lot of uncompatible extensions together.
Title: Re: Add to Cart not functioning on Category Page
Post by: pinochico on January 26, 2021, 05:20:36 AM
Yes, you don't load fancybox JS on category page.

On my demo page (basic instalation VM3.8.6) the fancybox is loaded on category page correctly:
https://email.minijoomla.org/shop

Are you setup VM corectly (loadsome JS)?
Title: Re: Add to Cart not functioning on Category Page
Post by: fing086 on January 26, 2021, 16:11:43 PM
Hi, thanks for the replies.
The template I am using is a third party 'Virtuemart template' in that it came with Virtuemart pre installed inside the template.
I'm only using a few other components (K2, Ignite Gallery Akeeba) on the site so its quite a small installation.

Where would I look to enable FancyBox within the category layout, I can see that it is ticked for products and these are indeed working fine.
Its just the category buttons which are not functioning.


Thanks again
Title: Re: Add to Cart not functioning on Category Page
Post by: fing086 on January 26, 2021, 17:09:03 PM
Also (not sure if related) Ive just noticed that there is no 'add to art' button on the product pages at all when viewing on a mobile device (iPhone)??
The category buttons are there but again these dont work..

D
Title: Re: Add to Cart not functioning on Category Page
Post by: GJC Web Design on January 26, 2021, 17:50:20 PM
the first thing is to switch to a standard Beez or protostar and get your configs working correctly

http://www.lasercraftandcommercial.com/index.php/online-store?tmpl=protostar

you can see u immediately have problems -- fancy box is still not loading  it has been said a 100 times on here .. don't use pre-installed or all in one installs
you will spend more time debugging than if u had installed a clean install and then added the template

switch off any system plugins associated with the template/framework

then when u switch to your template and it doesn't work contact your template provider
Title: Re: Add to Cart not functioning on Category Page
Post by: fing086 on January 26, 2021, 17:55:02 PM
Ok cheers for that... ill get them to sort it out if its an issue with that type of site.
I think I'll keep clear of the All in one type of template in the future !