Add to Cart Not Working - Which Files to Look For?
Hi all,
First off, my site url is http://bit.ly/osvjH2
We had some modules installed and customizations recently, so I think there might have been tiny little mistakes with some files.
The add to cart button does not work (returns blank page), but I have no idea which files to look for to fix it.
Is there a way to
- find out what the problem is (a blank space? a blank line? more serious problems?)
- and in which file to fix it
Thank you so much for your help!
Re: Add to Cart Not Working - Which Files to Look For?
Also, for some reason the cache folder returns 'data error.' Are these problems interrelated?
Re: Add to Cart Not Working - Which Files to Look For?
Nothing in my error log so nowhere I can look in help articles. Anyone?
Re: Add to Cart Not Working - Which Files to Look For?
I think the file you need to look at is:
includes/languages/english/your_template/shopping_cart.php
Try uploading a fresh copy and see what happens. Note: If you aren't using overrides, you can drop "your_template" from the path.
Re: Add to Cart Not Working - Which Files to Look For?
Thanks for your tip Resco. But uploading a fresh copy didn't do the magic :(
Any other suggestions?
Re: Add to Cart Not Working - Which Files to Look For?
Okay, try:
includes/classes/shopping_cart.php
Re: Add to Cart Not Working - Which Files to Look For?
Re: Add to Cart Not Working - Which Files to Look For?
Looks like you got this fixed
Re: Add to Cart Not Working - Which Files to Look For?
Ok here's the summary of what I did:
1. Go through every single file to check if any files have a line or space before the first letter of the file.
Turns out a LOT of them had it so I'm not going to list everything here.
(Also, anything with shopping_cart in its name DIDN'T have any space or line before it, so I guess files are interrelated and you just have to check everything.)
With this first step, no blank page occurred but I got a "your cart is empty" message instead.
So I did what this guy said in this thread: http://www.zen-cart.com/forum/showthread.php?t=177200
2. "Admin->Configuration->Sessions->Add period prefix to cookie domain to False resolved the problem"
It did!!!!
Thanks everyone who commented & helped :)
Re: Add to Cart Not Working - Which Files to Look For?
Thanks for the solution, this worked for me too. Strange that the shopping cart worked fine before - must have been some change in server environment!