Zen Cart Logo
Forums / General Questions / Validating product_info page

Validating product_info page

Locked

Views: 1,133

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
23 May 2007, 6:57 PM
#1
sake avatar

sake

New Zenner

Join Date:
May 2007
Posts:
18
Plugin Contributions:
0

Validating product_info page

Hi guys,

I'd like to be able to validate the form on the product_info page.

That is, when I look at a product, I have an "I agree to pre-purchase three months of insurance" (for example), and I'd like for the user not to be able to go to the shopping cart page until the field is checked.

I've discovered that there's a file in /includes/modules/pages/product_info/header_php.php where I should likely put my code in. This seems to be the case with the validation on the shopping cart page, for example.

However, I don't know what code to put here. Should I check directly the values of $_POST? And how do I stop the page from forwarding to the shopping cart page?

I hope this makes sense, feel free to ask me any questions

23 May 2007, 7:05 PM
#2
sake avatar

sake

New Zenner

Join Date:
May 2007
Posts:
18
Plugin Contributions:
0

Re: Validating product_info page

Really, the part I'm having a REALLY hard time figuring out is how I stop the product_info page from forwarding to the shopping cart page if an error has occured.

Can anyone shed some light on the matter?