Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add to Cart Not Working - Which Files to Look For?

Add to Cart Not Working - Which Files to Look For?

Views: 986

Results 1 to 10 of 10
30 Oct 2011, 4:51 PM
#1
mk1990 avatar

mk1990

New Zenner

Join Date:
Jul 2011
Posts:
31
Plugin Contributions:
0

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!

30 Oct 2011, 4:52 PM
#2
mk1990 avatar

mk1990

New Zenner

Join Date:
Jul 2011
Posts:
31
Plugin Contributions:
0

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?

30 Oct 2011, 9:23 PM
#3
mk1990 avatar

mk1990

New Zenner

Join Date:
Jul 2011
Posts:
31
Plugin Contributions:
0

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?

30 Oct 2011, 11:00 PM
#4
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

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.

30 Oct 2011, 11:45 PM
#5
mk1990 avatar

mk1990

New Zenner

Join Date:
Jul 2011
Posts:
31
Plugin Contributions:
0

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?

30 Oct 2011, 11:49 PM
#6
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Add to Cart Not Working - Which Files to Look For?

Okay, try:

includes/classes/shopping_cart.php

30 Oct 2011, 11:53 PM
#7
mk1990 avatar

mk1990

New Zenner

Join Date:
Jul 2011
Posts:
31
Plugin Contributions:
0

Re: Add to Cart Not Working - Which Files to Look For?

Also no change. :no:

31 Oct 2011, 5:11 AM
#8
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Add to Cart Not Working - Which Files to Look For?

Looks like you got this fixed

31 Oct 2011, 1:29 PM
#9
mk1990 avatar

mk1990

New Zenner

Join Date:
Jul 2011
Posts:
31
Plugin Contributions:
0

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

  1. "Admin->Configuration->Sessions->Add period prefix to cookie domain to False resolved the problem"

It did!!!!

Thanks everyone who commented & helped :)

8 Jan 2012, 8:22 AM
#10
nao_1 avatar

nao_1

New Zenner

Join Date:
Jan 2012
Location:
London, UK
Posts:
5
Plugin Contributions:
0

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!