We will be doing some site maintenance and need to take the site down for 10 minutes.

Site will go down at 19:00 UTC

Forums / All Other Contributions/Addons / "Add to Cart" redirecting to page not found

"Add to Cart" redirecting to page not found

Started by ksookma on 6 Jan 2012, 6:06 PM · Views: 9,212

Results 1 to 20 of 24
6 Jan 2012, 6:06 PM
#1
ksookma avatar

ksookma

Zen Follower

Join Date:
Aug 2009
Posts:
212
Plugin Contributions:
1

"Add to Cart" redirecting to page not found

Hello,

I'm hoping that someone can help me with this very strange issue I'm having while upgrading my clients from 1.39h to 1.5. I'm having this particular issue on all three upgrades im working on right now and need to figure out how to get this fixed before starting more!:yuck:

The problem is that when I click on the add to cart button on the product_info page im sent to a page not found page. I can get to the shopping cart by clicking on it in the header but not on the product_info page. I disabled the htaccess file and almost all the mods and still no luck. It's very strange, I dont think I have ever run in to this particular issue before. I also switched the template over to the default to see if that would work but no luck. Any help on thie would be GREATLY appreciated.

Thanks!

6 Jan 2012, 7:26 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: "Add to Cart" redirecting to page not found

Do all of these "client sites" have their settings set to NOT display the shopping cart page after clicking add-to-cart?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Jan 2012, 7:48 PM
#3
ksookma avatar

ksookma

Zen Follower

Join Date:
Aug 2009
Posts:
212
Plugin Contributions:
1

Re: "Add to Cart" redirecting to page not found

That might be the case on the other site. I just rebuilt the one im working on right now and reinstalled the mods and it seems to be workin. Thanks for the help. :D

9 Jan 2012, 5:32 PM
#4
hiprabhat avatar

hiprabhat

New Zenner

Join Date:
Jan 2012
Posts:
4
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

I installed a new version of zencart 1.5, added avonlee contempo template and zen lightbox module. facing the same issue. However it is working on the same browser where I have the admin logged in.

Display Cart After Adding Product true or false does not make any difference to the error...

9 Jan 2012, 5:48 PM
#5
hiprabhat avatar

hiprabhat

New Zenner

Join Date:
Jan 2012
Posts:
4
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

Also seems to be working well on firefox but not on chrome and opera and safari. firefox, chrome and opera on ubuntu, safari on ios 5.1.
Clearing cookies makes no difference.

9 Jan 2012, 6:10 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: "Add to Cart" redirecting to page not found

Your URL would be a big help.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

12 Jan 2012, 4:04 PM
#7
hiprabhat avatar

hiprabhat

New Zenner

Join Date:
Jan 2012
Posts:
4
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

Am running the server locally for testing. However, if there are any specific files that can help I can upload them. Just let me know.

12 Jan 2012, 4:36 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: "Add to Cart" redirecting to page not found

Two possible causes:

  • paths wrong in configure.php
  • PHP sessions not working properly, perhaps because the browser is set to block session cookies
  • browser doesn't like the cookie content as generated by your localhost setup ... in this latter case, try adjusting the "dot-prefix" setting in Admin->Configuration->Sessions. DO NOT MESS WITH OTHER SETTINGS IN THAT SCREEN.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Jan 2012, 2:17 PM
#9
hiprabhat avatar

hiprabhat

New Zenner

Join Date:
Jan 2012
Posts:
4
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

Thanx a lot. Appreciate it. Setting the period parameter works.

Changed from:

Add period prefix to cookie domain True

To

Add period prefix to cookie domain False

4 Feb 2012, 8:45 AM
#10
moretooo avatar

moretooo

New Zenner

Join Date:
Feb 2012
Posts:
3
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

zen cart version 1.5.0

install modules:Ultimate SEO URLs

when click the button "add to cart" then redirecting to page_not_found.

.htaccess file

##### NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteBase /

# From Ultimate SEO URLs
RewriteRule ^(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-m-([0-9]+).html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+).html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+).html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+).html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+).html$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]

# For Open Operations Info Manager
RewriteRule ^(.*)-i-([0-9]+).html$ index\.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

# For dreamscape's News & Articles Manager
RewriteRule ^news/?$ index\.php?main_page=news&%{QUERY_STRING} [L]
RewriteRule ^news/rss.xml$ index\.php?main_page=news_rss&%{QUERY_STRING} [L]
RewriteRule ^news/archive/?$ index\.php?main_page=news_archive&%{QUERY_STRING} [L]
RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$ index\.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]
RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html$ index\.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^news/(.*)-a-([0-9]+)-comments.html$ index\.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]
RewriteRule ^news/(.*)-a-([0-9]+).html$ index\.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]

# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f [NC] 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]

RewriteEngine on
RewriteCond %{http_host} ^hermeshuts.com [NC]
RewriteRule ^(.*)$ http://www.hermeshuts.com/$1 [L,R=301]

i have test the method
http://www.zen-cart.com/forum/showthread.php?t=190699
, but can not work.:frusty:

4 Feb 2012, 8:58 AM
#11
moretooo avatar

moretooo

New Zenner

Join Date:
Feb 2012
Posts:
3
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

hiprabhat:

Thanx a lot. Appreciate it. Setting the period parameter works.

Changed from:

Add period prefix to cookie domain True

To

Add period prefix to cookie domain False

do not work~~~~:censored:

4 Feb 2012, 12:30 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: "Add to Cart" redirecting to page not found

moretooo:

zen cart version 1.5.0

install modules:Ultimate SEO URLs

Are you reporting a bug in the Ultimate SEO URL addon?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Feb 2012, 3:17 AM
#13
wlanguide avatar

wlanguide

New Zenner

Join Date:
Feb 2012
Posts:
6
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

DrByte:

Are you reporting a bug in the Ultimate SEO URL addon?

I do think there is an issue with ultimate seo urls. I have the same problem. I tried to upgrade 4 of my websites from 1.39h to 1.5 and hadn't a single problem during the upgrade process.

Then I installed ultimate seo urls and it reported a 404 error when adding items to the shopping cart.

Then I uploaded and unzipped zencart 1.5 to overwrite every file that had been replaced by ultimate seo urls and my website worked all OK, I could add any item to the shopping cart, but the SE friendly URLs were gone.

It seems the addon was last updated in 2010, so I suppose it does not work with zencart 1.5?

15 Feb 2012, 3:22 AM
#14
gorie avatar

gorie

New Zenner

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

i've noticed this too in testing v1.5. it seems to happen if i leave a product page open for awhile and come back at a later time and then try to add to cart it will send me to a page not found error.
if i hit the back button and try again it works.
so this is an issue with cookies?

29 Apr 2012, 4:27 AM
#15
rony avatar

rony

New Zenner

Join Date:
Aug 2010
Posts:
77
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

I am having the same error ....

I DIDN'T installed the "Ultimate SEO URL addon" ...

I tried all... IE, Firfox, Chrome ... same error

I even tried adjusting the "dot-prefix" setting in Admin->Configuration->Sessions as suggested by Dr Byte

but still same error message ....

Any help is very appreciated ...

Thanks

29 Apr 2012, 4:36 AM
#16
rony avatar

rony

New Zenner

Join Date:
Aug 2010
Posts:
77
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

Seems like the culprit is this file 'html_output.php' file located in includes/functions

When I use the Original file, every thing works fine ....

30 Apr 2012, 4:16 PM
#17
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

I am having a similar issue. Mine does not show up every time, nor have I actually seen the issue, even with hundreds of 'add to cart' tests with various browsers.

http://www.zen-cart.com/showthread.php?195426-Not-really-a-review-Can-you-add-this-product-to-your-cart

I am going to try the prefix setting, but unless I can recreate it, I don't know how to fix it.

16 Jul 2012, 10:59 AM
#18
alibaba99 avatar

alibaba99

New Zenner

Join Date:
Mar 2011
Location:
guernsey , uk
Posts:
39
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

i have a similar but different problem.

my add to cart option works when the main products are shown in the category listing, but when you go into view the description page of a product, the 'add to cart' button then redirects to page not found ???

website is https://www.supergiftstore.com

any suggestions please

17 Jul 2012, 1:23 PM
#19
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: "Add to Cart" redirecting to page not found

I believe that many of the page_not_found redirects that have been reported in v1.5.0 are related to the bug I posted here. I reproduced this last night by:

  • Create a fresh install on my XAMPP/localhost setup (with demo products)
  • Click the Login link at the top of the screen
  • Leave that screen up for at least the session timeout (24 minutes); I left it overnight.
  • Click the Login button without entering any data.

At that point, I should be rewarded with an error message indicating that there is no match for that userid/password ... instead, I was taken to the page_not_found page. Pressing the back-arrow on my browser (FireFox) to return to the login page and clicking the Login button again "rewards" me with the expected message.

23 Jul 2012, 3:42 AM
#20
metaus avatar

metaus

New Zenner

Join Date:
Jul 2012
Posts:
35
Plugin Contributions:
0

Re: "Add to Cart" redirecting to page not found

can I ask what files you replaced that Ultimate SEO URLS altered? this exact issue has happened with me, and I believe its due to installing ultimate SEO Urls (althought I thought I had deleted the files it added/altered