Miva Merchant: Customer Account Creation on INVC Page

Recently there’s been lots of buzz on the Miva Merchant User Support Forum about moving the account creation process to the end of the checkout. There are a number of good reasons for doing this. First, you eliminate one of the checkout screens, and streamline the checkout process. Second, and more importantly, you eliminate a decision from the checkout process.

There’s a great usability book out there by a fellow named Steve Krug, called “Don’t Make Me Think” That book title couldn’t be more apt for the checkout process in a shopping cart. When your shoppers commit enough to hit the checkout button, don’t present them with a new decision to have to make before they can get started.

As one person put it, your shoppers aren’t looking to develop a relationship with you. You have something they want, and they want to give you their money so you can send it to them. Since you want to get their money and send them things, it seems you have a common goal. So why not make it easier to achieve that goal? Get the sale, and then offer them the opportunity to create an account if they think they’d like to come back and shop again. But don’t clutter the checkout process with an unnecessary decision.

So, to the meat of the matter. How does one go about creating an account for a customer using the information available on the INVC page? Since they’ve already provided their shipping and billing information, there are only two additional bits you need from them: a user name, and a password. The rest you can feed to the form from what they’ve already told you.

In your INVC page template, decide where you want to present the account creation option, and add the following code. The hidden input for PrevPage isn’t required, but it gives you a global variable to test against if you want to customize the ACED page to display a “Thank you for creating your account” message instead of the account edit form.

You’ll have to do your own form styling, but this should give you the bare bones you need to get started.

<form method="post" action="&mvt:global:secure_sessionurl;">
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
<input type="hidden" name="Action" value="ICST">
<input type="hidden" name="Screen" value="ACED">
<input type="hidden" name="PrevPage" value="INVC">
<label for="login">User Name</label>
<input type="text" id="login" name="Customer_Login" value="&mvte:global:Customer_Login;">
<label for="pass">Password</label>
<input type="password" id="pass" name="Customer_Password" size="25" value="&mvte:global:Customer_Password;">
<label for="verifypass">Confirm Password</label>
<input type="password" id="verifypass" name="Customer_VerifyPassword" size="25" value="&mvte:global:Customer_VerifyPassword;">
<input type="hidden" name="Customer_PasswordEmail" value="&mvte:order:bill_email;">
<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_ShipFax" value="&mvte:order:ship_fax;">
<input type="hidden" name="Customer_ShipAddress" value="&mvte:order:bill_addr;">
<input type="hidden" name="Customer_ShipCompany" value="&mvte:order:ship_comp;">
<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_BillFax" value="&mvte:order:bill_fax;">
<input type="hidden" name="Customer_BillAddress" value="&mvte:order:bill_addr;">
<input type="hidden" name="Customer_BillCompany" value="&mvte:order:bill_comp;">
<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;">
<mvt:item name="buttons" param="Save" />
Be Sociable, Share!

17 Responses to “Miva Merchant: Customer Account Creation on INVC Page”

  1. Anonymous says:

    I tweaked the “bare bones” you posted and put it in a table in my INVC footer wrapped in a conditional to check to see if the user was already logged in. Thanks a bunch TQ…just what I was looking for!!!

  2. Shannon says:

    Is it possible to provide a form with a checkbox and a button called “create account” that takes the customer to the ACED page to fill in their username and password instead of doing it right on the INVC page? Having the username and password fields on the invoice makes it a bit distracting on the printed form of the invoice.

  3. Tiny Queen says:

    Hi Shannon,

    Sure it is. You would make the following changes to the form above.

    First, delete this line:
    <input type=”hidden” name=”Action” value=”ICST”>

    Second, change the screen destination to the ACAD page:
    <input type=”hidden” name=”Screen” value=”ACAD”>

    Then, remove the inputs for the login name and password:
    <label for=”login”>User Name</label>
    <input type=”text” id=”login” name=”Customer_Login” value=”&mvte:global:Customer_Login;”>
    <label for=”pass”>Password</label>
    <input type=”password” id=”pass” name=”Customer_Password” size=”25″ value=”&mvte:global:Customer_Password;”>
    <label for=”verifypass”>Confirm Password</label>
    <input type=”password” id=”verifypass” name=”Customer_VerifyPassword” size=”25″ value=”&mvte:global:Customer_VerifyPassword;”>

    Finally, add your checkbox.
    <input type=”checkbox” value=”Account_Create”> Check here to save your information to an account.

    If you wanted to get fancy, you could edit the ACAD page to check for the checkbox value, and display a special message to the customer.

  4. Shannon says:

    Thanks! That works perfectly. I’m now working on tweaking the layout to look the way I want, but that helps a lot!

    Can you suggest what coding I need do the check on the ACAD/ACED to display the special message as you mentioned at the bottom of your response? I’m sure it is an if/else statement but not sure what code is needed to check to see if came from the INVC page after checking the checkbox.

  5. Tiny Queen says:

    Hi Shannon,

    You can create a global variable within a form on any page that will be passed to the next page when the form is submitted. Then you can use that global variable in a conditional to display your custom content.

    You create your global variable by putting a hidden input field into your form, for example:
    <input type=”hidden” name=”MyVariable” value=”1″>

    Then, on the ACAD page, you would write your conditional like so:
    <mvt:if expr=”g.MyVariable EQ ‘1’”>
    Show my special message.

    Since the global variable won’t persist past the current page, if you wanted to carry the conditional message through to the ACED page, you would add a second hidden form input inside a conditional (otherwise it will send all of the time), like so:
    <mvt:if expr=”g.MyVariable EQ ‘1’”>
    <input type=”hidden” name=”MyVariable” value=”1″>

  6. Bob Derber says:

    Can one replicate the ACED as a new page so that a customer sign-up or edit can be customized for different circumstances? I tried this by effectively copying the ACED page to a new page but the token would not draw in the particular customer data. I checked to see that it existed and it does…..

    I like passing the variable in the form via a hidden input – might this be done with a &MyVariable=’1′ (i.e. as a “GET” variable) in an tag href string?

    Enjoy your expertise.

  7. Bob Derber says:

    As an aside – I noted that your form above uses


    rather than the value statement in ACAD –


    Might you explain the difference?

  8. Tiny Queen says:


    Yes, global variables can be created in one of three ways:
    1. By passing them to the page as a POST variable in a form submission from a prior page
    2. By appending them to the URL as a GET variable
    3. By creating and assigning them on the current page using one of the “tool” modules

    Have you assigned the customer item to your new page?

  9. Tiny Queen says:

    Hi Bob,

    I’m a little puzzled, as I don’t see &mvt:global:customer:ship_fname; anywhere in the code above. Are you referring to this line in the code:

    <input type=”hidden” name=”Customer_ShipFirstName” value=”&mvte:order:ship_fname;”>

    If so, global variable that is created will be g.Customer_ShipFirstName just like on the
    ACAD page. The value &mvte:order:ship_fname is used because on the invoice page, that’s the variable that holds the customer’s first name.

    If that doesn’t answer your question, please clarify and I’ll be glad to help.

  10. Nathan says:


    I’m thinking about implementing this on our site, however I was wondering how you tackled the problem of existing customers trying to log in.

    For instance, you have to have a place for customers who already have an account to log in. However, if you have a place to log into an account, but no option to create an account, you’re going to confuse people who want to create an account before placing an order. However, if you have an option to log in, create an account, or place an order without creating an account, that’s what I already have.

    The only benefit is that you might get some customers to create an account that wouldn’t have otherwise.

  11. Tiny Queen says:

    Hi Nathan,

    On some sites, I have added an account login form directly on the OCST page. On the left are the login fields, and on the right is a message to new customers that they’ll be given the option to create an account after checkout. So far it seems to work well with little customer confusion.

  12. Margo says:

    how do I style the form buttom of this item button — mvt:item name=”buttons” param=”Save” — ?

  13. Tiny Queen says:

    Hi Margo,

    There are a couple of ways to do this. Each button’s input tag can be edited by clicking your store name, and then clicking the tab for Buttons on the right hand side. Then, over on the right hand side beside the button you want to edit, you’ll see a link for Show Code. If you click that, you can access the input tag, and edit it to add your css class. Be aware that if you click Hide Code it will reset to the original, so you’ll want to leave it set on Show Code.

    Editing it this way will update the entire site with that css class. You may not want the class on all of your save buttons, in which case you can easily replace the mvt:item tag with a regular input tag, with your css class added.

  14. mark says:

    A problem we’re having with this method is this first order from a new customer. It’s not linked to their newly created account because the account is created after placing the order. Is there a way around that?

  15. Tiny Queen says:

    Unfortunately, you’re correct Mark, that is a downside to this method of account creation. The best route would be a module that would associate the order with the account but I’m afraid at the moment this would be a custom project as I’m not aware of a module that currently does this. Alternatively, you could use something like the tool kit to run a small php script to modify the MySQL database and update the record. The benefit of a module using the API over this method is that the script might break in a future update of Miva.

  16. Bruce Golub says:

    There actually is a module that does all of this (and a LOT more), including associating the current order with the customer’s history. Its called Easy Account (from us) @ Phosphormedia.com.

  17. Tiny Queen says:

    Yes, not associating the current order with the account is a definite downside to this method. Here’s a link to the module for anyone interested in a better out-of-the-box solution. Easy Account