osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

PayPal email address error check in affiliate_signup

This is a discussion on PayPal email address error check in affiliate_signup within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; The bug issue was more the 'no error text on PayPal' part, since it needs to validate as both a ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 08-24-2005, 08:51 AM
Member
 
Join Date: Mar 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ganast
Default PayPal email address error check in affiliate_signup

Quote:
The bug issue was more the 'no error text on PayPal' part, since it needs to validate as both a required and legit e-mail entry... but I'm sure I can code the checks as needed. I just haven't spent a great deal of time going through all the code yet and I didn't want to recreate the entire wheel if some pieces were known to be there, so thanks for the answer on that part and I'll start digging.
For the person that wanted additional requirements in the affiliate signup:

To do the error checking find the following line in affiliate_signup.php:

$entry_payment_paypal_error = false;

Replace it with:

//$entry_payment_paypal_error = false;
if ((AFFILIATE_USE_PAYPAL == 'true')&&(AFFILIATE_USE_BANK == 'false')&&(AFFILIATE_USE_CHECK == 'false')) {
if ($a_payment_paypal = '') $entry_payment_paypal_error = true;
if (strlen($a_payment_paypal) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;
$entry_paypal_address_error = true;
} else {
$entry_paypal_address_error = false;
}
}
if (!tep_validate_email($a_payment_paypal)) {
$error = true;
$entry_paypal_address_check_error = true;
} else {
$entry_paypal_address_check_error = false;
}
Then in includes/modules/affiliate_account_details.php

find line:

if ($entry_payment_paypal_error == true) {
echo tep_draw_input_field('a_payment_paypal') . ' ' . ENTRY_AFFILIATE_PAYMENT_PAYPAL_ERROR;

replace it with:

if (($entry_payment_paypal_error == true)&&(AFFILIATE_USE_BANK == 'false')&&(AFFILIATE_USE_CHECK == 'false')) {
echo tep_draw_input_field('a_payment_paypal') . ' ' . ENTRY_AFFILIATE_PAYMENT_PAYPAL_ERROR;
} elseif ($entry_paypal_address_error == true) {
echo tep_draw_input_field('a_payment_paypal') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR;
} elseif ($entry_paypal_address_check_error == true) {
echo tep_draw_input_field('a_payment_paypal') . ' ' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;

Note that this is only a "fix" for a PayPal-Only setup... a similar fix will work for a Check-Only setup, or a Bank-Only setup... or we could make a nice case statement and check for all the possibilities.

Currently if an affiliate chooses none of the options, there is no error, however this *should* be default... I would asssume that if an affiliate wants to sign up, they should be able to regardless of whether or not a payment method is specified.

--gabe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
email status if (PayPal Processing [IPN]) kopoba11 osCMax v2 Installation issues 0 06-05-2006 03:39 PM
Want to change email address and password for admin ozstar osCMax v2 Installation issues 5 04-22-2006 03:38 PM
Adding admin: Email address format invalid xxx.yyy@xxx.co.uk JonMWilson osCMax v2 Features Discussion 3 01-09-2006 07:15 PM
Check based on Page address crashfellow osCommerce 2.2 Modification Help 1 08-01-2005 06:50 AM
[Bug] Error on email address checking function daigo75 osCMax v1.7 Discussion 0 01-24-2005 05:48 AM


All times are GMT -8. The time now is 10:05 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax