![]() |
Problem with: register.php?mode=update
When my customers click on the modify button to change their personal info they are taken to register.php?mode=update. However after they make the modification and click the submit button, they get the error:
Access denied ! You are not allowed to access that resource! In customer/main/register.tpl I commented out the membership section below because I don't need members. However, if I don't comment this section out, updating the form is successful. But if I comment it out, I get the access denied error. Any suggestions? <!-- <tr valign=middle> <td height=20 colspan=3>{$lng.lbl_username_n_password}<hr size=1 noshade></td> </tr> {if $userinfo.login eq $login and $login and $userinfo.usertype ne "C"} <input type=hidden name=membership value="{$userinfo.membership}"></d> <input type=hidden name=pending_membership value="{$userinfo.pending_membership}"></d> {else} {if $config.General.membership_signup eq "Y" and ($usertype eq "C" or ($active_modules.Simple_Mode ne "" and $usertype eq "P") or $usertype eq "A")} {include file="admin/main/membership_signup.tpl"} {/if} {if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode ne "")} {include file="admin/main/membership.tpl"} {/if} {/if} {if $anonymous ne "" and $config.General.disable_anonymous_checkout ne "Y"} {* Anonymous account *} <tr> <td colspan=3>{$lng.txt_anonymous_account_msg}</TD> </tr> <tr valign=middle> <td align=right>{$lng.lbl_username}</td> <td></td> <td nowrap> <input type=text name=uname size=32 maxlength=32 value="{$userinfo.login}"> </td> </tr> <tr valign=middle> <td align=right>{$lng.lbl_password}</td> <td></td> <td nowrap><input type=password name=passwd1 size=32 maxlength=32 value="{$userinfo.passwd1}"> </td> </tr> <tr valign=middle> <td align=right>{$lng.lbl_confirm_password}</td> <td></td> <td nowrap><input type=password name=passwd2 size=32 maxlength=32 value="{$userinfo.passwd2}"> </td> </tr> {else} {* NOT anonymous account *} <tr valign=middle> <td align=right>{$lng.lbl_username}</td> <td><font class=Star>*</font></td> <td nowrap> {if $smarty.get.mode eq "update" or $smarty.post.mode eq "update"} {$userinfo.login} <input type=hidden name=uname value="{$userinfo.login}"> {else} <input type=text name=uname size=32 maxlength=32 value="{$userinfo.login}"> {if $reg_error ne "" and $userinfo.login eq ""}<font class=Star><<</font>{/if} {/if} </td> </tr> <tr valign=middle> <td align=right>{$lng.lbl_password}</td> <td><font class=Star>*</font></td> <td nowrap><input type=password name=passwd1 size=32 maxlength=32 value="{$userinfo.passwd1}"> {if $reg_error ne "" and $userinfo.passwd1 eq ""}<font class=Star><<</font>{/if} </td> </tr> <tr valign=middle> <td align=right>{$lng.lbl_confirm_password}</td> <td><font class=Star>*</font></td> <td nowrap><input type=password name=passwd2 size=32 maxlength=32 value="{$userinfo.passwd2}"> {if $reg_error ne "" and $userinfo.passwd2 eq ""}<font class=Star><<</font>{/if} </td> </tr> {/if} {* <tr valign=middle> <td align=right>{$lng.lbl_password_hint}</td> <td></td> <td nowrap><input type=text name=password_hint size=32 maxlength=32 value="{$userinfo.password_hint}"></td> </tr> <tr valign=middle> <td align=right>{$lng.lbl_password_hint_answer}</td> <td></td> <td nowrap><input type=text name=password_hint_answer size=32 maxlength=32 value="{$userinfo.password_hint_answer}"></td> </tr> *} {if ($active_modules.Simple_Mode ne "" and $usertype eq "P") or $usertype eq "A"} <tr valign=middle> <td colspan="2"></td> <td nowrap> <input type=checkbox name=change_password value="Y" {if $userinfo.change_password eq "Y"}CHECKED {/if}> {$lng.lbl_reg_chpass} </td> </tr> {/if} --> |
Code:
<!-- There. Now THAT is easier to read. |
This is my code from 3.5.10.
It works. Look in skin1/customer/main/reigister.tpl Code:
{if $config.General.membership_signup eq "Y" and ($usertype eq "C" or ($active_modules.Simple_Mode ne "" and $usertype eq "P") or $usertype eq "A")} I commented out one line with {* code *} Code:
{* include file="admin/main/membership_signup.tpl" *} |
You can't comment out all of the password code. I think you have too much caffeine in your diet. Maybe it is time for a vacation.
|
Yeah you're right. I don't know what I was thinking, looking for a quick fix i guess.. What's the easiest way to hide the username password stuff on the registration form?
|
Why in God's great name would you want to eliminate user names and passwords?
|
I don't have repeat customers because I only have three products. Creating a username/password isn't necessary because the customer won't need to log in in the future so I want to hide it.
|
why not just remove any links to the registration page so that the only place that will get to it is in the checkout, then make sure anon checkout is ticked, in your registration template change the login and password fields to hidden fields and either remove the login and password txt labels or just blank them in the language editor.
|
did all the above and it worked, thanks! Originially I tried putting the username/password section in a div tag and setting the visibility to hidden, but that didn't work. So I followed your suggestion and deleted the labels and set the fields to hidden and it worked with no problems.
|
Glad I could help :D
|
I want everyone to have a default membership level (defined) and not show a drop down to select.
Mt little comment trick posted above didn't work so good in 4.0.5. Any suggestions? |
havent tried this is 4.0.5 yet but add a customer with the membership level you want, check with phpmyadmin what the level code is (in 3.x version it was C i think) go into register.tpl change the field to a hidden field and then set the default value as C
|
All times are GMT -8. The time now is 10:12 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.