"/></td> </tr> <tr> <td>Country</td> <?php $form = new MM_CheckoutForm(); $field = new stdClass(); $field->fieldId = "mm_field_shipping_country"; $field->fieldName = "shippingcountry"; $field->label = "Country"; $data = array(); $data["mm_field_shipping_country"] = $user->getShippingCountry() ? $user->getShippingCountry() : ""; $form->shippingCountryList = MM_HtmlUtils::getCountryList($data["mm_field_shipping_country"]); ?> <td><?php echo MM_CheckoutForm::generateInputFormField($field->fieldName, $data, $form, "mm-myaccount-form-field"); ?> </td> </tr> </table> </td> </tr> </table> <div style='clear: both; height:10px;'></div> <div style="width:600px"> <input type="button" class="mm-ui-button blue" value="Update Member" onclick="mmjs.updateMember(<?php echo $user->getId(); ?> );">
$field->fieldId = "mm_field_billing_zip"; $field->fieldName = "billingzipcode"; $field->label = "Zip Code"; $fieldInfo[] = $field; $field = new stdClass(); $field->fieldId = "mm_field_billing_country"; $field->fieldName = "billingcountry"; $field->label = "Country"; $fieldInfo[] = $field; $data = array(); $data["mm_field_billing_address"] = $user->getBillingAddress(); $data["mm_field_billing_city"] = $user->getBillingCity(); $data["mm_field_billing_state"] = $user->getBillingState(); $data["mm_field_billing_zip"] = $user->getBillingZipCode(); $data["mm_field_billing_country"] = $user->getBillingCountry(); $form = new MM_CheckoutForm(); if (!isset($data["mm_field_billing_country"])) { $data["mm_field_billing_country"] = ""; } $form->billingCountryList = MM_HtmlUtils::getCountryList($data["mm_field_billing_country"]); echo $form->getJavascriptIncludes(false); ?> <div id="mm-form-container"> <table> <?php foreach ($fieldInfo as $field) { ?> <tr> <td><span class="mm-myaccount-dialog-label"><?php echo $field->label; ?>
$field->label = "CC Security Code"; $fieldInfo[] = $field; if (isset($_POST["mm_use_test_data"])) { MM_OptionUtils::setOption(MM_OptionUtils::$OPTION_KEY_USE_CHECKOUT_FORM_TEST_DATA, $_POST["mm_use_test_data"]); if ($_POST["mm_use_test_data"] == "1") { // collect/store form information $data = array(); foreach ($fieldInfo as $field) { $data[$field->fieldId] = $_POST[$field->fieldId]; } MM_TestDataUtils::saveCheckoutFormTestData($data); } } $useTestData = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_USE_CHECKOUT_FORM_TEST_DATA); $testData = MM_TestDataUtils::getCheckoutFormTestData(); $form = new MM_CheckoutForm(); if (!isset($testData["mm_field_shipping_country"])) { $testData["mm_field_shipping_country"] = ""; } $form->shippingCountryList = MM_HtmlUtils::getCountryList($testData["mm_field_shipping_country"]); if (!isset($testData["mm_field_billing_country"])) { $testData["mm_field_billing_country"] = ""; } $form->billingCountryList = MM_HtmlUtils::getCountryList($testData["mm_field_billing_country"]); $ccExpDateRendered = false; echo $form->getJavascriptIncludes(); ?> <p style="width:650px"> By filling out the test data below you're instructing MemberMouse to prepopulate checkout forms with the data entered. This can be very helpful when you're doing testing as it means you don't have to manually type in data for each test.