Forums / General Questions / Required attributes bypassed?

Required attributes bypassed?

Locked
Results 1 to 6 of 6
This thread is locked. New replies are disabled.
16 Sep 2009, 13:49
#1
sajuuk avatar

sajuuk

New Zenner

Join Date:
Sep 2009
Posts:
7
Plugin Contributions:
0

Required attributes bypassed?

I have just been appointed as maintainer for a ZenCart configured by one of our summer interns, and honestly, I've got no idea what I'm doing with it. Yesterday I was tasked with adding birthdate validation onto some of the products, and that was easy enough. However, apparently a feature that was coded by the intern has utterly vanished, and it wasn't due to my code (I've disabled all my code to verify this).

ZenCart Version: 1.3.8a
Site: https://store.goremountain.com

The problem I am running into is that the Add To Cart buttons on the product category (such as this one: https://store.goremountain.com/index.php?main_page=index&cPath=1) displays allow bypassing of required attributes on products.

What should happen when the Add To Cart button is pressed is it should take the user to the product page with multiple instances of the form fields depending on the quantity of the item requested.

Apparently this was working when our intern left, but has since stopped working. I've got no idea how to get it working again, nor can I find code to indicate that it ever worked to begin with.
16 Sep 2009, 15:41
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Posts:
19,793
Plugin Contributions:
2

Re: Required attributes bypassed?

I'd be surprised if it ever worked. I get a blank page when I click any of the Add to Cart buttons in the product listing.

A stock Zencart installation will replace the Add to Cart button in the product listing with 'more info ...' when a product has attributes.

I can't tell for sure, but it looks like your intern (or the template designer) added those buttons. You can use Admin - Tools - Developers Tool Kit to search for 'addbtn' to see where they were added, and exactly what they're supposed to do, and go from there.
16 Sep 2009, 15:46
#3
sajuuk avatar

sajuuk

New Zenner

Join Date:
Sep 2009
Posts:
7
Plugin Contributions:
0

Re: Required attributes bypassed?

It apparently worked before they added SEO to the store. I've been in communication with the intern and we've traced it down to some custom written code in includes\shopping_cart.php.

The blank pages are due to the testing we've been doing to figure out whats causing it. Working on live sites can be a pain sometimes.
16 Sep 2009, 15:52
#4
sajuuk avatar

sajuuk

New Zenner

Join Date:
Sep 2009
Posts:
7
Plugin Contributions:
0

Re: Required attributes bypassed?

And here I am forced to doublepost to add information. The problem appears to be related to zen_redirect. After some wrestling with the code, I finally got it to dump/email me the link its redirecting to: https://store.goremountain.com/index.php?main_page=product_info&products_id=1&QTY=2. Which is obviously not a valid link. It SHOULD be https://store.goremountain.com/index.php?main_page=product_info&products_id=1&QTY=2, which does work and takes you to the page you should see. So, now I'm off to figure out how html special character codes are ending up in the link.
16 Sep 2009, 16:53
#5
sajuuk avatar

sajuuk

New Zenner

Join Date:
Sep 2009
Posts:
7
Plugin Contributions:
0

Re: Required attributes bypassed?

Okay, progress has been made. The page now redirects correctly, sort of. It seems that for a fair amount of products, it is redirecting to a completely different product now. Example: attempting to add 2 2009/2010 Adult Non-Holiday Season Passes from the Season Passes list brings up a form for one 10 week all-day Saturday Kids Program.
16 Sep 2009, 16:59
#6
sajuuk avatar

sajuuk

New Zenner

Join Date:
Sep 2009
Posts:
7
Plugin Contributions:
0

Re: Required attributes bypassed?

Nevermind about issue in previous post. Was missing an ampersand in the redirect parameter string.