|
<mvt:comment> |
|
| ------------------------------------------------ |
|
| Display Create Account Inputs on INVC |
|
| ------------------------------------------------- |
|
</mvt:comment> |
|
<mvt:if expr="l.settings:page:code EQ 'INVC'"> |
|
<mvt:if expr="NOT l.settings:order:cust_id"> |
|
<div class="column whole"> |
|
<div class="well align-center"> |
|
<div class="row"> |
|
<div class="column medium-three-fourths centered"> |
|
<h2 class="well-heading">Checkout even faster next time!</h2> |
|
<p class="well-lead">Create a password below to enjoy the member perks and even easier checkout next time.</p> |
|
<form action="&mvt:global:secure_sessionurl;" method="post" id="js-order-create-account"> |
|
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;"> |
|
<input type="hidden" name="Action" value="ICST"> |
|
<input type="hidden" name="Screen" value="LOGN"> |
|
<input type="hidden" name="PrevPage" value="INVC"> |
|
<input type="hidden" name="NewAccount" value="yes"> |
|
<input type="hidden" name="Order_ID" value="&mvte:order:id;"> |
|
<mvt:comment> |
|
<input type="hidden" name="Customer_LoginEmail" value="&mvte:order:ship_email;"> |
|
</mvt:comment> |
|
<div class="row"> |
|
<div class="column whole medium-one-third"> |
|
<div class="floating-placeholder"> |
|
<input type="email" name="Customer_LoginEmail" id="js-customer-login-email" class="input" value="&mvte:order:ship_email;"> |
|
<label for="js-customer-login-email">Login Email</label> |
|
</div> |
|
</div> |
|
<div class="column whole medium-one-third"> |
|
<div class="floating-placeholder"> |
|
<input type="password" name="Customer_Password" id="js-customer-password" class="input" oninput="document.getElementById('js-customer-verify-password').value = this.value"> |
|
<label for="js-customer-password">Password</label> |
|
</div> |
|
</div> |
|
<input type="hidden" name="Customer_VerifyPassword" id="js-customer-verify-password"> |
|
<mvt:comment> |
|
<div class="column whole medium-one-third"> |
|
<div class="floating-placeholder"> |
|
<input type="password" name="Customer_VerifyPassword" id="js-customer-verify-password" class="input"> |
|
<label for="js-customer-verify-password">Verify Password</label> |
|
</div> |
|
</div> |
|
</mvt:comment> |
|
<div class="column whole medium-one-third"> |
|
<button type="submit" class="button button-medium button-primary button-block">Create Account</button> |
|
</div> |
|
</div> |
|
<input type="hidden" name="Customer_ShipFirstName" value="&mvte:order:ship_fname;"> |
|
<input type="hidden" name="Customer_ShipLastName" value="&mvte:order:ship_lname;"> |
|
<input type="hidden" name="Customer_ShipEmail" value="&mvte:order:ship_email;"> |
|
<input type="hidden" name="Customer_ShipPhone" value="&mvte:order:ship_phone;"> |
|
<input type="hidden" name="Customer_ShipAddress1" value="&mvte:order:ship_addr1;"> |
|
<input type="hidden" name="Customer_ShipAddress2" value="&mvte:order:ship_addr2;"> |
|
<input type="hidden" name="Customer_ShipCity" value="&mvte:order:ship_city;"> |
|
<input type="hidden" name="Customer_ShipState" value="&mvte:order:ship_state;"> |
|
<input type="hidden" name="Customer_ShipZip" value="&mvte:order:ship_zip;"> |
|
<input type="hidden" name="Customer_ShipCountry" value="&mvte:order:ship_cntry;"> |
|
<input type="hidden" name="Customer_BillFirstName" value="&mvte:order:bill_fname;"> |
|
<input type="hidden" name="Customer_BillLastName" value="&mvte:order:bill_lname;"> |
|
<input type="hidden" name="Customer_BillEmail" value="&mvte:order:bill_email;"> |
|
<input type="hidden" name="Customer_BillPhone" value="&mvte:order:bill_phone;"> |
|
<input type="hidden" name="Customer_BillAddress1" value="&mvte:order:bill_addr1;"> |
|
<input type="hidden" name="Customer_BillAddress2" value="&mvte:order:bill_addr2;"> |
|
<input type="hidden" name="Customer_BillCity" value="&mvte:order:bill_city;"> |
|
<input type="hidden" name="Customer_BillState" value="&mvte:order:bill_state;"> |
|
<input type="hidden" name="Customer_BillZip" value="&mvte:order:bill_zip;"> |
|
<input type="hidden" name="Customer_BillCountry" value="&mvte:order:bill_cntry;"> |
|
</form> |
|
|
|
</div> |
|
</div> |
|
</div> |
|
<br><br> |
|
</div> |
|
</mvt:if> |
|
<br> |
|
</mvt:if> |
|
|
|
<mvt:comment> |
|
| --------------------------------------------------- |
|
| When they create an account, |
|
| assign Customer to the order they just placed |
|
| This runs on LOGN after the above form is submitted |
|
| ---------------------------------------------------- |
|
</mvt:comment> |
|
<mvt:if expr="g.Action EQ 'ICST' AND g.Order_ID AND g.Basket:cust_id"> |
|
<mvt:do file="g.Module_Library_DB" name="l.result" value="Order_Load_ID( g.Order_ID, l.order )" /> |
|
<mvt:if expr="NOT l.order:cust_id AND g.Customer_BillEmail EQ l.order:bill_email AND g.Customer_BillPhone EQ l.order:bill_phone"> |
|
<mvt:assign name="l.order:cust_id" value="g.Basket:cust_id" /> |
|
<mvt:do file="g.Module_Library_DB" name="l.result" value="Order_Update_Customer_Information( l.order )" /> |
|
</mvt:if> |
|
</mvt:if> |