1

i have tried to pre-populate the memeber data in checkout template. but prepouplation of any of the custom member field is not working.

{exp:store:checkout register_member="yes" next="shop/payment"
             error_delimiters='<span class="help-inline">|</span>'
            require="first_name|address1|city|country|order_email"}

            {if no_items}
                {redirect="shop"}
            {/if}
                    <label class="tburaddrlab" for="billing_first_name">First Name</label>
                    <div class="tburfield">
                        <input type="text" name="billing_first_name" value="{if billing_first_name}{billing_first_name}{if:elseif logged_in}{billing_first_name}{/if}">
                        {error:billing_first_name}
                    </div>
                    <label class="tburaddrlab" for="billing_last_name">Last Name</label>
                    <div class="tburfield">
                        <input type="text" name="billing_last_name" value="{if billing_last_name}{billing_first_name}{if:elseif logged_in}{billing_last_name}{/if}">
                        {error:billing_last_name}
                    </div>

            {/exp:store:checkout}

Store and Member field mapping

Could you pleas help me finding out,what i am doing wrong here?

Update: For old user ids its not prepopulating but for the new user id s its doing the job. dont know why? is there any solution to fix this or my understanding is wrong?

Here is an another update:

Trick is there in the cart data clearing - time set in CP.

Once i empty the cart, and update the cart again then new updated profile value is prepopulating.

Thnaks, sus

1

If the users have already populated the custom fields in either FreeMember or by completing a purchase in the past they should automatically populate without having to use a conditional since the data is already in the mapped custom fields.

So in your template:

<label class="tburaddrlab" for="billing_first_name">First Name</label>
<div class="tburfield">
  {field:billing_first_name}
  {error:billing_first_name}
</div>

Should be all that you need to have to pull the data from the mapped fields. I would assume the reason that you are having problems comes down to the EE parse order.

Also the mapped billing fields are only pulled on the initial load so you need to make sure that if you make template changes or mapped data is not loading that you empty your cart to retest.

  • Thanks Justin, cart reset is getting value from updated profile data. – sus Mar 29 '14 at 1:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.