How to avoid changing the email address when chcking out?

General ShopSite user discussion

How to avoid changing the email address when chcking out?

Postby Jopyance » Wed Sep 01, 2010 8:42 am

I have a question for help.
On the billing screen, customer's email address will be automatically filled in the email address. But some of them like to change the email, it is not permitted for us, how should we do? Thanks
Jopyance
 
Posts: 6
Joined: Wed Sep 01, 2010 8:27 am

Re: How to avoid changing the email address when chcking out

Postby Jim » Wed Sep 01, 2010 9:03 am

Why is it not permitted? ShopSite doesn't do anything to prevent the email address on the billing screen from being changed.

What is a link to the page where the email address can't be changed?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: How to avoid changing the email address when chcking out

Postby Jopyance » Wed Sep 01, 2010 12:10 pm

as we have another system to link with Shopsite. If the email address is modified, we lose the connection between the two system. Could you give us some suggestions?
Jopyance
 
Posts: 6
Joined: Wed Sep 01, 2010 8:27 am

Re: How to avoid changing the email address when chcking out

Postby Jim » Wed Sep 01, 2010 4:19 pm

I'm not a css expert but you might be able to put some css in to make the field non-editable.
here is the form information with the classes
<tr><td class="addr">Email<font color=blue>*</font></td><td class="addr_val"><input class="addr" type=text name="transaction[customer][email]" value="jim@shopsite.com" size="28"></td></tr>

The class on a number of fields is "addr" but I think you can use that with the name "transaction[customer][email]" and get a style that will affect just that field.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: How to avoid changing the email address when chcking out

Postby Jopyance » Thu Sep 02, 2010 8:39 am

Thx. But when I add script at the part of "Javascript added at start of built-in CheckIt function:" in page of Checkout Screen, some debug sentences are displayed on the top of webpage. like "if (button == "68") return (true); ...". the Email address still can be edited. Could you tell me what's the problem? Thanks a lot.

Here is my JS:

<script language="javascript">
function disableField()
{
if (document.getElementsByName("transaction[customer][email]")[0]){
document.getElementsByName("transaction[customer][email]")[0].readOnly = true;
}

}
</script>
Jopyance
 
Posts: 6
Joined: Wed Sep 01, 2010 8:27 am

Re: How to avoid changing the email address when chcking out

Postby Jopyance » Thu Sep 02, 2010 8:55 am

I found my mistake. Now it is ok. here is the script.

<script language="javascript">
if (document.billing.Email.value != "")
{
document.billing.Email.readOnly = true;
}

</script>

Thank you, Jim.
Jopyance
 
Posts: 6
Joined: Wed Sep 01, 2010 8:27 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 36 guests

cron