| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Problem with: register.php?mode=update | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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} -->
__________________
X-Cart 4.4.0 PHP 5.2.5 |
|||||||
#2
|
|||||||||
|
|||||||||
Code:
There. Now THAT is easier to read. |
|||||||||
#3
|
|||||||||
|
|||||||||
This is my code from 3.5.10.
It works. Look in skin1/customer/main/reigister.tpl Code:
I commented out one line with {* code *} Code:
|
|||||||||
#4
|
|||||||||
|
|||||||||
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.
|
|||||||||
#5
|
|||||||
|
|||||||
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?
__________________
X-Cart 4.4.0 PHP 5.2.5 |
|||||||
#6
|
|||||||||
|
|||||||||
Why in God's great name would you want to eliminate user names and passwords?
|
|||||||||
#7
|
|||||||
|
|||||||
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.
__________________
X-Cart 4.4.0 PHP 5.2.5 |
|||||||
#8
|
|||||||
|
|||||||
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.
__________________
x-cart 4.0.5 (live and heavily modded) Server: freebsd |
|||||||
#9
|
|||||||
|
|||||||
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.
__________________
X-Cart 4.4.0 PHP 5.2.5 |
|||||||
#10
|
|||||||
|
|||||||
Glad I could help
__________________
x-cart 4.0.5 (live and heavily modded) Server: freebsd |
|||||||
|
|||
X-Cart forums © 2001-2020
|