Author Topic: Add to Cart - 0 Products Added  (Read 7827 times)

dave collerton

  • Beginner
  • *
  • Posts: 16
Add to Cart - 0 Products Added
« on: December 24, 2011, 01:44:53 am »
Firstly, good job guys, this release looks great.

I am using V2 with joomla 1.5.25 - I also have SH404SEF installed. I have hit a couple of problems, notably the Add to Cart. Although it now functions (I had some jscript conflicts which at first stopped it from working - now resolved) it does not add anything to the cart - see image attached. Everything looks OK in firebug i.e. no errors are thrown but the cart is not updated. I can't for the life of me see how to get round this - it's pretty important that the products get to the cart!!

I have reviewed lots of posts - notably with respect to jscript conflicts but I can't see anything out of the ordinary - then again, I am not an expert.

Grateful if someone brighter than me could offer suggestions or take a look - the site URL is http://www.sofasonlineltd.com

Happy Christmas to all

Regards
Dave

[attachment cleanup by admin]

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10428
  • VirtueMart Version: 3+
Re: Add to Cart - 0 Products Added
« Reply #1 on: December 24, 2011, 01:54:27 am »
you are running 3 different Jquery files. Thats not good

Plus many other java files

what happens when you change to a default joomla template?

dave collerton

  • Beginner
  • *
  • Posts: 16
Re: Add to Cart - 0 Products Added
« Reply #2 on: December 24, 2011, 02:05:30 am »
Thank you for the mega quick response.

I have had a look with JA Purity - it runs less jscripts but the cart still doesn't work.

I figured out that i can see the scripts if I use chrome and use inspect element - not sure though how to condense scripts down but at least i can now see what is running.

I have left the JA Purity theme running - it's a development site so no problem for a while.

Regards
Dave

dave collerton

  • Beginner
  • *
  • Posts: 16
Re: Add to Cart - 0 Products Added
« Reply #3 on: December 24, 2011, 18:52:09 pm »
Desperation is creeping in now guys!!

I have reduced jscripts running on the site, tried various templates, even loaded VirtueMart on a completely different joomla 1.5.25 website - the cart simply does not function!! Either I am incredibly unlucky or there is a bug / problem with cart functionality on J1.5.25 when running V2. SH404SEF also doesn't work with VirtueMart V2 - on either of the two websites I tried. It may be that all the testing was done on J1.6/1.7 and j1.5 has been overlooked as a viable platform!

I have tried all sorts of things such as turning off modules, jscript confict solutions, removing components, bland templates (e.g. JA Purity) etc etc and still the damn cart refuses to accept products. Because V2 is so new, it also seems that there are as yet, no 3rd party carts I could try / buy to get round this problem. If anyone knows of one please let me know - I will take a look immediately.

In order to help others help me, I have used a blank T3 template from Joomlarts - see http://www.sofasonlineltd.com/index.php/buy-sofas.html?view=category&virtuemart_category_id=5 - I have also left debug on to give more script info in case this is helpful. This blank template seems to be running just enough jscripts to do what it is supposed to - the jscript duplication mentioned by BanquetTables.pro is I believe now sorted.

My primary question is, has anyone else hit this functionality problem with V2 / J1.5 - if yes, have you solved it and how? I would be very, very grateful for some community help at this point, else I am gonna end up as the turkey this Christmas.

Glad tidings to all

Regards
Dave

charles99

  • Jr. Member
  • **
  • Posts: 57
Re: Add to Cart - 0 Products Added
« Reply #4 on: December 24, 2011, 20:06:11 pm »
just disable the VM Call for Jquery in the back and use one of the other plugins or modules that calling for JQuery!  Or try adding  a No-Conflict statement to your header to see if that solves your problem.  It most likely the modules or plugins you are using are bumping VM 2.0. 

There are 3 plugins on Joomla that will help you loading J Query and add the no conflict statement to your header that will allow VM 2.0 to run!

Go to Extension Manager
then click on Manage
locate all of the modules and plugins connected to "RDCloudZoom"  and disable them.  Now don't make a mistake and click on the un-install button.

Once you have that done go back to VMart and enable Jqery load from Google and use Jquery on the template page then see what happens.

If the product loads in the cart it means you will need a Module or plugin that has a no-conflict option: meaning you can run multi modules off of one Jquery statement.  If RDCloudZoom doesn't have a turnoff switch download a plugin that will manage Jquery for you... Or you may not be able to use RDCloudZoom with Virtuemart 2.0...




dave collerton

  • Beginner
  • *
  • Posts: 16
Re: Add to Cart - 0 Products Added
« Reply #5 on: December 24, 2011, 20:37:35 pm »
Great reply Charles99 - something to actually work on. I'll give it a go....thnx for the suggestions

Regards
Dave

AmStaF

  • Beginner
  • *
  • Posts: 47
Re: Add to Cart - 0 Products Added
« Reply #6 on: December 26, 2011, 07:36:43 am »
I met this in 1.98M, you have got it in 2.0, but I think the js/jQ is not the case.

Maybe this way.

Look at your screenshot, at pop-up window: there is "Continue shopping", but there is no "Go to the Cart". And DON`T believe "The product was added to you cart", it`s a bug :)

It happens when you try to add products that are out of stock. Or products are in stock but there are a lot of orders for it and it doesn`t have enough available for a new order. I don`t know why there is no corresponding message, but.. no "Go to the Cart" = no adding to the cart = product is out of stock :)

I came across just such a situation.

P.S. Should it be moved to bug section?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4436
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add to Cart - 0 Products Added
« Reply #7 on: December 26, 2011, 10:12:16 am »
Hi,
In virtuemart 2.0 the message are more explicit.
Please report the incorrect string for vm2.0 only.
Thanks for your report.

dave collerton

  • Beginner
  • *
  • Posts: 16
Re: Add to Cart - 0 Products Added
« Reply #8 on: December 26, 2011, 14:29:49 pm »
Hope the attached virtuemart dialog might help - I extracted this for the product page just after adding a product to the cart

[attachment cleanup by admin]

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4436
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add to Cart - 0 Products Added
« Reply #9 on: December 26, 2011, 18:02:22 pm »
Hi,
Thanks for the details.

For me it's a simple jQuery conflict.

PLz disable jQuery from virtuemart, go to config administrator/index.php?option=com_virtuemart&view=config
TAB >> templates
in Activate Css Styles & Javascripts
uncheck Using the Virtuemart jQuery
and save your config.

Try it and give me some news ;)

fire47

  • Jr. Member
  • **
  • Posts: 90
Re: Add to Cart - 0 Products Added
« Reply #10 on: December 27, 2011, 01:19:48 am »
Same problem here, need some help...

fire47

  • Jr. Member
  • **
  • Posts: 90
Re: Add to Cart - 0 Products Added
« Reply #11 on: December 27, 2011, 02:19:35 am »
I did some more testing and it seems the add to cart buttons ONLY work if the VM jQuery is turned ON.  Unfortunately this conflicts with my menu system.  I have tried other templates and the same thing happens.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4436
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add to Cart - 0 Products Added
« Reply #12 on: December 27, 2011, 09:00:20 am »
hi fire47,

If you can't remove the conflict then, add the javascript declaration in the template and remove all reference to jquery in your modules/component.
TO remove it in vm2.0 follow my post, try to find the jQuery load from your menu and add in your template this lines
Code: [Select]
if (!class_exists( 'VmConfig' )) require(JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'config.php');
vmJsApi::jQuery();

this prevent virtuemart to reload jquery and on adding it in your template, you are sure it's always loaded.

alesbennetti

  • Beginner
  • *
  • Posts: 4
Re: Add to Cart - 0 Products Added
« Reply #13 on: December 31, 2011, 07:13:52 am »
Had the same problem, but I disabled the "Using the Script ajax Countries / Regions" and all works fine now.

hiccupsolutions

  • Beginner
  • *
  • Posts: 7
Re: Add to Cart - 0 Products Added
« Reply #14 on: June 24, 2012, 05:25:01 am »
Hi, here is the solutions

Replace the cart.php file from the attached file

Components/VM/Helpers/cart.php


Thanks a lot
http://www.hiccupsolutions.com

[attachment cleanup by admin]