View Single Post
  #19  
Old 05-27-2005, 05:14 AM
 
sstillwell@aerostich.com sstillwell@aerostich.com is offline
 

eXpert
  
Join Date: Jun 2004
Location: Duluth, MN
Posts: 242
 

Default

Quote:
I would just like to figure out how to keep the Yes checked after the customer is registered with a different shipping address. So far it just defaults to No, confuses the customer if he wants to ship something to the billing address at a later time

Just a thought, but you could have smarty do a test on the value of the address fields. If it's the same then leave it as "no" if it is different then make it "yes".

Code:
Shipping same as billing? Yes<input type="radio" name="shipping" {if $userinfo.s_address eq $userinfo.b_address} checked="checked"{/if} onclick="flipdiv('shippingaddress','hide')" /> No<input type="radio" name="shipping" {if $userinfo.s_address ne $userinfo.b_address} checked="checked"{/if}onclick="flipdiv('shippingaddress','show')" />

You'll also need to add that to the css that hides that block of markup.
Code:
{if $userinfo.s_address eq $userinfo.b_address} style="display: none;" {/if}

I have not implemented this so it's just a guess.
__________________
No longer using Xcart, was good while it lasted.
Reply With Quote