$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;
    ?>
</span></td>
				<td>
				<span style="font-family:courier; font-size:11px; margin-top:5px;">
					<?php 
    if (!isset($data[$field->fieldId])) {
Beispiel #2
0
        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. 
</p>
<p>
	<input id="mm_use_test_data_cb" type="checkbox" <?php 
echo $useTestData == "1" ? "checked" : "";
?>
 onchange="toggleTestDataForm();" />
	Use Test Data
	<input id="mm_use_test_data" name="mm_use_test_data" type="hidden" value="<?php 
echo $useTestData;
?>