Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] Order Profile in GlobalSub



******    message to minivend-users from Oscar Tapia <macross@interplace.com.pe>     ******

Greetings



I am using the emal as the username , and in an order profile that  use
a GlobalSub , I check that the email has never submited before .
The GlobalSub is like this :
GlobalSub <<EOF
sub set_up_extra {
 BEGIN {
  package Vend::Order;
     sub _alreadyregistred {
  my $myemail=$Values->{email};
  my $myemailchecked=$Tag->data('userdb','username',$myemail);
  if (q{$myemailchecked}) {
      return 0;
   }
   else {
      return 1;
   }
  }
 }
}
EOF


and the form /page   is like : (huaja is its name)


<FORM ACTION="[process-target]" METHOD="POST" >
<TR><TD>
<INPUT TYPE="text" NAME="email" VALUE="[read-cookie MV_USERNAME]"
SIZE=25 maxlength=30>
<INPUT TYPE="hidden" NAME="mv_session_id" VALUE="[data session id]">
<INPUT TYPE="hidden" NAME="mv_todo" VALUE=submit>
<INPUT TYPE="hidden" NAME="mv_failpage" VALUE=multi/huaja>
<INPUT TYPE="hidden" NAME="mv_order_profile" VALUE=first_time>
</TD>
</TR>
[if type=explicit compare="[error all=1 show_var=1 keep=1]"]
<P>
<FONT COLOR=__CONTRAST__>There were errors in your last
submission.</FONT>
They are shown in <FONT COLOR=__CONTRAST__>__CONTRAST__</FONT>
below.</FONT>
<P>
[/if]

[if type=explicit compare="q{[read-cookie MV_SESSION_ID]}"]
<INPUT TYPE="hidden" NAME="selector" VALUE="retu" >
[else]
<INPUT TYPE="hidden" NAME="selector" VALUE="first">
[/else]
[/if]
<TR><TD>
[error name=email required=1]
</TD>
</TR>
<TR>
<TD><B><U>Check this if you don't have an
account</U>&nbsp;&nbsp;&nbsp;</B>
<INPUT TYPE="radio" NAME="mv_check" VALUE="First" >
</TD>
</TR>
<TR>
<TD><B><U>I have an account </U>
<INPUT TYPE="radio" NAME="mv_check" VALUE="Returning" >
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE="password" NAME="pass" SIZE=10 MAXLENGTH=10>
</TD>
</TR>
<TR><TD>
<INPUT TYPE="IMAGE" SRC="submit.gif" border=0>
</TD></TR>
</FORM>

[set Returning]
[value name=mensaje set=0]
[if type=explicit compare="[userdb function=login username='[value
email]' password='[value pass]']"]
mv_nextpage=multi/b_address
[else]
mv_nextpage=multi/huaja
[/else]
[/if]
[/set]

[set First]
mv_nextpage=multi/checkout
[/set]


The order profile is

__NAME__ first_time
email=required "[value email]" is not a valid email address
email=email
[if type=explicit compare='$CGI->{mv_check}=~ /First/i']
 email=alreadyregistred User name already exit
[if]

&fatal=yes
__END__



All actions , return the huaja  page   , What can I do ?, Please help me



Thanks , bye

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: