Download Sample Code


In the previous example we built a checkout form that collected account and billing information and allowed customers to pay using their credit card or an offsite payment method like PayPal. In this example we'll extend that by adding form fields related to shipping information such as shipping address and shipping method. Collecting shipping information is never required by MemberMouse. If the shipping address fields aren't present, then MemberMouse will just assume that the shipping address is the same as the billing address. This allows you to ignore shipping information altogether when what you're selling is delivered digitally.


Address: [MM_Form_Field name="shippingAddress"]
City: [MM_Form_Field name="shippingCity"]
State: [MM_Form_Field name="shippingState"]
Zip Code: [MM_Form_Field name="shippingZipCode"]
Country: [MM_Form_Field name="shippingCountry"]
  1. The first thing we'll do is create two form sections where we can put Form SmartTags related to shipping information. Creating these form sections is not required but is recommended. Doing this allows MemberMouse to only show shipping information when necessary. Using this example as a starting point you'll add the following below the billing information section:


    [MM_Form_Section type="shippingInfo"]
    <!-- shipping method and billing same as shipping address checkbox go here -->

    [MM_Form_Subsection type="shippingAddress"]
    <!-- all shipping address Form SmartTags and design elements go here -->
    [/MM_Form_Subsection]
    [/MM_Form_Section]

    The reason we use two sections for shipping information is because there are two scenarios where MemberMouse can help by showing or hiding sections. Both the shippingInfo and shippingAddress sections are only shown if the product being purchased requires shipping (as defined by the product configuration in MemberMouse). On top of that, the shippingAddress section is only shown if the customer has indicated that their shipping address is different from their billing address. This keeps them from having to enter the same address twice.


  2. Next, we'll add some form fields inside the shippingInfo MM_Form_Section block so that the user can specify which shipping method they want to use and indicate whether or not their billing and shipping addresses are the same. Here's what you'll add:


    Shipping Information
    Shipping Method: [MM_Form_Field name="shippingMethod"]

    [MM_Form_Field name="shippingSameAsBilling"]
    Shipping is the same as billing

  3. Next, we'll add form fields inside the shippingAddress MM_Form_Subsection block so that the user can enter in their shipping address. Here's what you'll add:


    Address: [MM_Form_Field name="shippingAddress"]
    City: [MM_Form_Field name="shippingCity"]
    State: [MM_Form_Field name="shippingState"]
    Zip Code: [MM_Form_Field name="shippingZipCode"]
    Country: [MM_Form_Field name="shippingCountry"]

    Now the customer can provide their shipping information and MemberMouse will ensure that the sections associated with shipping only show up when a customer is purchasing a shippable product.



Collecting Shipping Information Form Examples


Below are two examples of the shipping information form:

Checked to use same address as billing:



Note: The form will look different depending on the theme you've chosen. 


Unchecked to allow separate address from billing:



Note: The form will look different depending on the theme you've chosen. 


Checkout Page Examples Overview