2

This is about a software downloads facility where I want account registration for new members during the order confirmation stage. I have read the documentation about this, but have questions:

1 should I use register_member="" just like that or is it register_member="true"

2 do I have to require the email address via parameter or does the presence of the register_member= parameter cause that?

3 the docs say that an account will be created based on the email address. What feedback is provided when this actually happens?

4 what happens if a returning customer goes through another order process? The docs only say "and the email address must not already be used for a member account." Does this mean an error will be generated or is there a way to steer the user to login before completing the order?

2
  • I have done some testing: Q1 Tried both, made no difference by itself Q2 Have to use the parameter (duh) Q4 Nothing happens - I just go to the PayPal Express checkout even though the name is fictitious and the email address already exists. I MUST be doing something very wrong - this would indicate a massive security problem – John de Beer Mar 12 '13 at 17:17
  • OK now on Q1 - must be set to "yes" to check the email address against the DB, so no security problem if the parameter is used correctly. However, still stumped on how to treat existing customers. Seems like I need a conditional on the parameter if the customer is logged in? – John de Beer Mar 12 '13 at 17:52
3

You need to set register_member="yes" in your checkout tag. All this does is add a hidden field to the template like this:

<input type="hidden" name="register_member" value="1" />

Instead of the template, you could make this a checkbox for your customers:

{field:register_member}

This would output HTML like this:

<input type="hidden" name="register_member" value="0" />
<input type="checkbox" name="register_member" value="1" />

For more details on what fields to submit, see the documentation here.

The order_email field is required for every order, regardless of whether an account is being created. However, you may want to make it required on the specific page you are asking for it, using the require="order_email" checkout tag parameter.

The customer will also automatically see an error if the email address is already used, if they have opted to create an account. Normally you would give them the option to log into an existing account instead of filling out the order fields, so this wouldn't happen.

Assuming the email is valid, an account will be created after the order is completed. If you have member email confirmation disabled, they will be automatically logged in. If you want more of a manual registration process (or more feedback for your customers), you should probably just add a regular login/register step to your checkout using Freemember or another member management plugin.

2

I was puzzled with question four as well and figured out another option on how to take orders from logged in members without showing a log in form during the checkout process (if they are already logged in).

On my final checkout page I used the following:

In the exp:store:checkout tag I used register_member="yes" and used the following on the page.

{if logged_out}
<fieldset>
    <legend>Log In or Create an Account</legend>            
    <p>This will allow you to track your order.</p>                        
        <div class="control-group {if error:email}error{/if}">
           <label class="control-label" for="email">Email</label>
               <div class="controls">
                  <input type="email" id="email" name="email" value="" />
                  {if error:email}<br />{error:email}{/if}
                </div>
        </div>

        <div class="control-group {if error:password}error{/if}">
            <label class="control-label" for="password">Password</label>
                <div class="controls">
                   <input type="password" id="password" name="password" value="" />
                   {if error:password}<br />{error:password}{/if}
                </div>
        </div>

        <div class="control-group {if error:password_confirm}error{/if}">
            <label class="control-label" for="password_confirm">Confirm Password</label>
                 <div class="controls">
                    <input type="password" id="password_confirm" name="password_confirm" value="" />
                    {if error:password_confirm}<br />{error:password_confirm}{/if}
                 </div>
        </div>
</fieldset>
{/if}

{if logged_in}
    <input type="hidden" name="register_member" value="0" />
{/if}

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.