Make A Account

Chris Embry

Member
I'm needing to know how i can make a customer be forced to make a account before they checkout. There is the register checkbox, But most of my customer are NOT choosing the checkbox.

If anyone has a idea on how to make them create a account before completing the checkout process would be great
I've been looking at the theme code and cannot seem to find a way to make the checkbox automatically check

Any ideas on how to make this HAPPEN
 

Chris Embry

Member
After going thru the code in the form tpl. I come to find out the code listed below has to deal with the customer during checkout.
When i remove the code and insert a php short code.It breaks the cart.

So any idea on how to make the code listed below to be required to make the customer be required to make account during the checkout process.

PHP:
<h1 class="head-line">
            <?php _e( 'Create Account', 'ami3' ) ?>:
        </h1>
   
        <?php
        if ( class_exists('\models\account\User') && get_option('users_can_register') == 1) {
            if ($userModel->getUser_id() == 0) : ?>
                <div class="col-md-30">
                    <div class="form-group">
                        <label for="register" class="col-sm-16 control-label">
                            <span class="label_name">
                                <?php echo __('REGISTER ME','ads');?>
                            </span>
                        </label>
                       
                        <div class="col-sm-44"
                       
                            <input type="hidden" name="register" value="0" />
                            <font color="red">*</font>
                            <input type="checkbox" name="register" id="register" value="1" required/>
                        </div>
                    </div>
                </div>
            <?php endif;?>
            <div class="col-md-30" id="password-block" style="display: none;">
                <div class="form-group">
                    <label for="password" class="col-sm-16 control-label">
                        <span class="label_name">
                           <span class="js-notifi_invalid"> <?php echo __('Password', 'ads');?><?php _e( 'This field is required', 'ami3' ); ?>
                        </span>
                    </label>
                    <div class="col-sm-44">
                        <input type="password" name="password" class="form-control input_text password_fields" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="repeatPassword" class="col-sm-16 control-label">
                        <span class="label_name">
                            <?php echo __('Confirm password', 'ads');?>
                        </span>
                    </label>
                    <div class="col-sm-44">
                        <input type="password" name="repeatPassword" class="form-control input_text password_fields" />
                    </div>
                </div>
            </div>
        <?php } ?>
        </div>
    </div>
</div>
 
Last edited:

Chris Embry

Member
I found out a way to make the customer be forced to make account using davinci code

Here is the edit _form.php code to have if you want to make them create a account during checkout

To add this code,Simply use control -F and search for <div class="col-sm-44" remove all the code below on your site and then copy and paste the code below


22efa7ce0b6f49939344b1d0b5e8edcc.png


PHP:
   <div class="col-sm-44"
                      
                            <input type="hidden" name="register" value="0" />
                            <font color="red">*</font>
                            <input type="checkbox" name="register" id="register" value="1" required/>
                        </div>
                    </div>
                </div>
            <?php endif;?>
            <div class="col-md-30" id="password-block" style="display: none;">
                <div class="form-group">
                    <label for="password" class="col-sm-16 control-label">
                        <span class="label_name">
                           <span class="js-notifi_invalid"> <?php echo __('Password', 'ads');?><?php _e( 'This field is required', 'ami3' ); ?>
                        </span>
                    </label>
                    <div class="col-sm-44">
                        <input type="password" name="password" class="form-control input_text password_fields" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="repeatPassword" class="col-sm-16 control-label">
                        <span class="label_name">
                            <?php echo __('Confirm password', 'ads');?>
                        </span>
                    </label>
                    <div class="col-sm-44">
                        <input type="password" name="repeatPassword" class="form-control input_text password_fields" />
                    </div>
                </div>
            </div>
        <?php } ?>
        </div>
    </div>
</div>

ENJOY :)
 
Last edited:

Erwin

New Member
Hello can you help me? i also want my website have this, have username and password ask for those who wants to buy, but i dunno how to make it :( and were do i put that code?
 
Last edited:

Chris Embry

Member
Hello can you help me? i also want my website have this, have username and password ask for those who wants to buy, but i dunno how to make it :( and were do i put that code?

Are you wanting to make account before they checkout are during checkout ?
 

Erwin

New Member
All you would need to is copy the code i pasted above
but were do i insert the code? i dont understand were do i put. im glad if have print screen so that i can follow were do i put the code. do you have skype? pls add me if you have chooseandshop my skype i.d :(
 
Top