VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: nc on April 27, 2014, 19:11:23 PM

Title: Add to cart doesn't working / state id doesn't working
Post by: nc on April 27, 2014, 19:11:23 PM
Virtuemart 2.6.0
Joomla 2.5.19

Add to cart doesn't work (http://maderasagrada.com/index.php/tienda-online-venta-palo-santo/palo-santo/palo-santo-100-gramos-detail)
state_id doesn't work (http://maderasagrada.com/index.php/tienda-online-venta-palo-santo/user/editaddresscartBT)

I do not how to deal with this trouble. People cannot make orders. I got this trouble on the cart about 15 days and i need to solve it. Pleas anyone here can help me please.
Title: Re: Add to cart doesn't working / state id doesn't working
Post by: jenkinhill on April 27, 2014, 19:43:13 PM
You must load VirtueMart's jQuery - looks like you have turned it off in Configuration/Templates/Activate Css Styles & Javascripts

Then you load another version of jQuery in your template. The code is
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>

You probably will have to stop that version loading as it will be the very latest jQuery version which almost certainly will break VirtueMart's functions. For JavaScript debugging see http://forum.virtuemart.net/index.php?topic=119638.0
Title: Re: Add to cart doesn't working / state id doesn't working
Post by: nc on April 27, 2014, 20:15:47 PM
Thank you four your help.
I have turned on virtuemart's jquery and added those line of code in my template.

:D Quantity box is workin'. Now the people can choose the number of products, great !!.

:( State:id still not

:( And the cart is empty after choose a product

What else should i do to fix those troubles?

UPDATED: i had installed a few days ago 'jquery easy' and 'ExT safe query' following the instructions here in the forum but i do not know if they behavior are not good for the site. Also, i got firebug but i can not see any troubles there. I'm a virtuemart/coder medium user and maybe i make some mistakes.

Thanks in advance
Title: Re: Add to cart doesn't working / state id doesn't working
Post by: GJC Web Design on April 27, 2014, 20:46:55 PM
I use Jquery easy on all my VM sites - you won't need both those - just easy

It has no performance drawbacks BUT - look in your Firebug console - on some VM installs I need to add the chosen.js to the Jquery easy exceptions
shows as an error:  TypeError: $(...).chosen is not a function

on the Jquery tab  ->  Advanced Site Options (Expert users only)-> other->add scripts

add :  components/com_virtuemart/assets/js/chosen.jquery.min.js

the reason is jquery easy sees the jquery.min.js in the file name and leaves it out..

Title: Re: Add to cart doesn't working / state id doesn't working
Post by: nc on April 27, 2014, 21:03:24 PM
Thanks for your answer !!

I have disabled EXT safe query.

I have added:  components/com_virtuemart/assets/js/chosen.jquery.min.js in jquery

but nothing has happen. Still in troubles.

Maybe the jquery configuration is not good:
LOAD JQUERY:NO
VERSION: 1.7
LOCAL
UI: 1.8
...

Thanks in advance !!
Title: Re: Add to cart doesn't working / state id doesn't working
Post by: GJC Web Design on April 27, 2014, 21:37:54 PM
on http://maderasagrada.com/index.php/tienda-online-venta-palo-santo/user/editaddresscartBT  there is no jqueryeasy published and at least 2 versions of jquery being loaded

check your settings - is it even published??

Title: Re: Add to cart doesn't working / state id doesn't working
Post by: nc on April 28, 2014, 19:56:15 PM
This shop online is alive more than 2 years without problems.
Jquery easy is installed 1 week ago trying to solve mentioned problems.
I've checked FTP folders and there's no jquery folder inside libraries folder. (i cannot put the paht to jquery libraries in the jquery easy configuration because it doesn' exist: /libraries/jquery/v1.7/jquery.min.js).This could be the problem?.
Why is not that folder, has it disappear?

Also, i put jquery easy as the last one to be called in the plug-ins joomla directory, as it says in the jquery easy documentation.

I do not understand nothing and my technical profile is not enough to solve it. It is frustating.

Please, help me. I'm losing lots of orders. Sorry about my english, I write from Spain.

Thanks !!
Title: Re: Add to cart doesn't working / state id doesn't working
Post by: GJC Web Design on April 28, 2014, 20:34:56 PM
But your not following the advice or answering our questions !

There is no jquery easy plugin published or it is wrongly configured.
If it was at the very least  the no-conflict script  from jquery easy would be in the scripts..  there is nothing in the head from jquery easy and at least 2 jquery libraries being loaded - that is the problem

If you say that it worked fine for 2 years then stopped - something you did stopped it - code doesn't write its-self...

If jquery easy was installed, published and configured correctly the 3 entries in the screen shot wouldn't exist - they would be replaced by ONE entry from jquery easy  for the jquery library and another for the no-conflict

[attachment cleanup by admin]
Title: Re: Add to cart doesn't working / state id doesn't working
Post by: nc on April 29, 2014, 13:26:26 PM
 :D IT'S SOLVED !!!!!!!!!!!!!
:D THANK YOU FOUR YOUR HELP !!!!!!!!

The problem was in COOKIES ACCEPT plugin. It was adding a jquery script line loading jquery before virtuemart jquery.

Message for anyone who is in trouble with jquery:
Try to publish/unpublish your plugins one by one until find the plugin who is adding this script line.

Thank you and i hope this message could help.

Title: Re: Add to cart doesn't working / state id doesn't working
Post by: kelecz on January 14, 2015, 15:15:06 PM
Quote from: GJC Web Design on April 27, 2014, 20:46:55 PM
I use Jquery easy on all my VM sites - you won't need both those - just easy

It has no performance drawbacks BUT - look in your Firebug console - on some VM installs I need to add the chosen.js to the Jquery easy exceptions
shows as an error:  TypeError: $(...).chosen is not a function

on the Jquery tab  ->  Advanced Site Options (Expert users only)-> other->add scripts

add :  components/com_virtuemart/assets/js/chosen.jquery.min.js

the reason is jquery easy sees the jquery.min.js in the file name and leaves it out..

Can you please help me. Pop up won't show, I tryed that you wrote.
Live is on www.petproba.konji.rs

Thx in advance
Title: Re: Add to cart doesn't working / state id doesn't working
Post by: GJC Web Design on January 14, 2015, 16:16:27 PM
Boy - thats some JS your loading!!!!

have you selected the popup in the admin - goes (successfully) straight to cart
Title: Re: Add to cart doesn't working / state id doesn't working
Post by: kelecz on January 14, 2015, 20:16:46 PM
Quote from: GJC Web Design on January 14, 2015, 16:16:27 PM
Boy - thats some JS your loading!!!!

have you selected the popup in the admin - goes (successfully) straight to cart

Is that a compliment for me ? ;D
If you have some suggestion, please? I always listen to you.
I solved it! See picture. It was unchecked that what is marked.

THANK you!

[attachment cleanup by admin]