News:

Looking for documentation? Take a look on our wiki

Main Menu

Add to cart issues - what's the actual solution?

Started by stuclark, January 06, 2012, 18:30:11 PM

Previous topic - Next topic

PRO

Quote from: another_reality on March 06, 2012, 21:34:56 PM
http://tinyurl.com/6rhhvjd .

virtuemart add to cart functionality works. Some do have java conflicts.

You do not have java problems.

Its going to be
A wrong setting in vmart config.
A Server setting
Are the filespermissions 644?
htaccess problem/security setting


another_reality

Thanks for your reply, yes file permissions are 644. What i must look closer about that, i think that the configuration (from the admin area) is configured properly. What i must look closer.

I have try it, with SEF enable and disable, i have  Firewall - csf on this server and trying to disable it.

I have 2 days that trying to make these function work, i have read almost all posts regarding to this & trying all solutions, but the problem persist.

Quote from: BanquetTables.pro on March 06, 2012, 21:59:01 PM
Quote from: another_reality on March 06, 2012, 21:34:56 PM
http://tinyurl.com/6rhhvjd .

virtuemart add to cart functionality works. Some do have java conflicts.

You do not have java problems.

Its going to be
A wrong setting in vmart config.
A Server setting
Are the filespermissions 644?
htaccess problem/security setting

dontflinch

#92
I am not sure if this is it or not but the "base href" of your page is messed up - it should be the directory not a file.  it makes me think your config file has that wrong.
<base href="http://www.bodyfarm.gr/test/index.php" />
should be:
<base href="http://www.bodyfarm.gr/test/" />

specifically you should check the paths to your log and temp folders.  for example:
/home/yourserver/public_html/yourdomain.com/tmp

also the joomla system info page might be helpful, check that all permissions etc are right:
administrator/index.php?option=com_admin&view=sysinfo
then check directory permissions tab at least

flaterik

I have a problem with add to cart ...
It works until i do a restore of the system with akeba backup
Now doesn't works

The site is www.nympheaestetica.com/ecommerce.html

HC

Quote from: flaterik on March 13, 2012, 01:42:04 AM
I have a problem with add to cart ...
It works until i do a restore of the system with akeba backup
Now doesn't works

The site is www.nympheaestetica.com/ecommerce.html


It works fine for me in IE, FF and Chrome.
Good work  :)

cyberholic

Hi everyone, i am also in trouble with the ADD-TO-CART situation.
I tried to find out where the problem could be and wanted to tell you about my path so that this might be of help for a solution.

My Situation:
In Details-view i can change the quantity with PLUS and MINUS.
I can click the ADD TO CART button but the page does not refresh, nor does the modal small window appear saying that the item has been added to the cart.
BUT: when i move to some other part of the page now, the cart gets refreshed and shows me the correct amount of items.

What i did as workaround to see where the failur is
From within this forum i found a thread where someone wanted to have the add-to-cart button on the categories view. i copied this and added it to the details view so that i have two add-to-cart buttons..
What happens is this: my first one works as the same as mentioned above.

The new one is clickable and the modal box comes up saying that the article was added.
BUT when i check the cart, there is an item without name nor price - only the quantity is shown.


A question i have too is:
When i change this:
$button_cls = 'addtocart-button';
into this
$button_cls = '';

The button once clicked moves over to the cart page, but nothing is added.
Does this mean that the jquery or whatever is controled through the class of a button?
Weird....

Hope this is of any help to you.
Greetings,
Carlos

palpal

Hi Cyberholic,

I have the same situation as you described, once i installed the "jQuery Easy" plugin -  the quantity button working but the cart need to be refreshed to update.

when i upgrade my Firefox to v11. It was perfectly now. You may also try in different updated browsers.   :)




Betuaelmon

#97
Hi everyone, i am also in trouble with the ADD-TO-CART situation.

I'm creating a shop with Joomla 1.5 and Virtuemart 2.02 PHP version: 5.2.13-pl1-gentoo. http://vps16666.ovh.net/~admin/escueladeinteligencia.info/ (I havent a domain pointing to my hosting yet). I have to reload the web to see the cart updated only in IE 9. When you clic Add to Cart you will be redirected to http://vps16666.ovh.net/~admin/escueladeinteligencia.info/index.php?option=com_virtuemart&view=cart.  In Firefox, Chrome and Opera works great.

I installed the plugin System - jQuery++ Integrator by tushev.org, but it doesn't solve my problem.

PatrickVisser

Hi All

I'm also having issues with the Add-to-cart button. It was all good during test phase of this particular website. We go live and no add-to-cart functionality.

check it out if you think you can help http://www.partystarter.co.nz

VM2.0.3
Joomla2.5.3e

PatrickVisser

Ok, I've got the add-to-cart button working again by disabling htaccess and Apache mod rewrite.

Problem solved? Nope.

htaccess is an integral part of our onsite SEO.

Has anyone got a fix, or modified htaccess that allows add-to-cart functionality?

StevenO

I have the same problem as patrick visser www.prinsesenridder.nl. The cart doesnt update, except you navigate to another page (only in chrome it works). i have tried everything whats written in this forum. Nothing works. Does anyone knows a solution.

Joomla 2.5 / VM 2.0.2

Thanks, Steven

stAn99

Hello folks,
i must confirm that you should firstly check the javascript error console in FF (ctrl + shift + J) or in google chrome (f12) and if you see any errors there you should get them fixed as this can simply lead to add to cart malfunction.

Secondoly as i adviced during the early RC developement the add to cart is still missing a default action when json breaks:
http://forum.virtuemart.net/index.php?topic=90617.0
Json breaks when any of your system-plugins or other system parts of joomla issue a php notice while error reporting is turned on. This can be fixed either by the underlying plugin or by changing the javscript to issue form submit.

This issue has not been resolved till now (2.0.3H)

Best Regards,
Stan
----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart


palpal

Hi stAn99,

The Add to cart button works fine when I use the latest browser like Chrome 18 and FireFox 11, but still not working in IE 7 or Safari 5.

i turn on the firebug in FireFox and realize the following two statements are executed to have the add to cark button working good.

GET babyshop.mysassyjane.com/index.php?option...emart_category_id%255B%255D%3D12&_=1333112006026         
GET babyshop.mysassyjane.com/index.php?option...osef=1&view=cart&task=viewJS&format=json&lang=en   

For those non-working browser version , i realized the second statement does not execute at all which includes the " JSON " you mentioned.

what do you actually mean when you said " fixed either by the underlying plugin" ?? Do you mean i should turn off some plugins ?? Great to have some clues from you. thanks!!

I am using joomla 2.5.2 / VM2.0.2 /  "jQuery Easy" plugin turn on.

stAn99

Hello, what i meant by the underlying plugins is that sometimes they trigger php notices, fatal errors or warnings even for ajax pages as they always trigger when called from joomla context. To see the notice, you have to put the url that you found directly to the browser bar ans see the json encoded data. On VM2 RC version there was a problem with mysqli and since then i tried to persuade VM team to add an error handler to the ajax-json function to have a disaster function as i propose which would simply submit the form.

The normal add to cart ajax page should look like this (vm 2.0.2):
http://vm2onj25.rupostel.com/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=en&quantity%255B%255D%3D1%26option%3Dcom_virtuemart%26view%3Dcart%26virtuemart_product_id%255B%255D%3D5%26virtuemart_category_id%255B%255D%3D1&_=1333141662904

says:

{"msg":"<a class=\"continue\" href=\"\/index.php\/component\/virtuemart\/\" >Continue Shopping<\/a><a class=\"floatright\" href=\"\/index.php\/virtuemart\">Show Cart<\/a><div>The product quantity has been updated.<\/div>","stat":"1"}


If the page includes something like this:

Notice: undefined variable xyz...
{"msg":"<a class=\"continue\" href=\"\/index.php\/component\/virtuemart\/\" >Continue Shopping<\/a><a class=\"floatright\" href=\"\/index.php\/virtuemart\">Show Cart<\/a><div>The product quantity has been updated.<\/div>","stat":"1"}


Then add to cart function in all VM2 versions will not work.
There are two possible solutions:
- to deserialize json not directly from the ajax output, but only from the first occurance of {
- to add the disaster function .error on the  json statement in the add to cart function (sendtocart) which will simply submit the form (this used to be default in VM1 days)

To debug this it helps to enable Log XMLHttpRequests within google chrome (the little wheel at the right bottom corner when f12 is pressed) so you know what pages are loaded from within your main page load.
----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart