foreach ($_POST["mm-country"] as $iso) { $selections[$iso] = $iso; } MM_OptionUtils::setOption(MM_OptionUtils::$OPTION_KEY_COUNTRY_SELECTIONS, $selections); $saved = true; } if (isset($_POST["mm-default-country"])) { //MM_OptionUtils::setOption(MM_OptionUtils::$OPTION_KEY_DFLT_COUNTRY_SELECTION, in_array($_POST["mm-default-country"], $_POST["mm-country"]) ? $_POST["mm-default-country"] : $_POST["mm-country"][0]); MM_OptionUtils::setOption(MM_OptionUtils::$OPTION_KEY_DFLT_COUNTRY_SELECTION, $_POST["mm-default-country"]); } } // get country selections $selections = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_COUNTRY_SELECTIONS); $dfltCountry = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_DFLT_COUNTRY_SELECTION); $fullCountryList = MM_HtmlUtils::getFullCountryList($selections); $countryList = MM_HtmlUtils::getCountryList($dfltCountry); ?> <div class="mm-wrap"> <form name='savecountry' method='post'> <p><strong>Select the countries customers can make purchases from below:</strong></p> <p style="margin-left:15px;"><select name='mm-country[]' multiple size='100' style='height: 300px; width: 400px; font-size: 12px;'> <?php echo $fullCountryList; ?> </select></p> <p style="font-size:11px; margin-left:15px;"> Select Multiple Countries: PC <code>ctrl + click</code> Mac <code><img width="9" height="9" src="http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1343/ks_command.gif" alt="Command key icon" data-hires="true"> (Command key) + click</code>
$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; ?> </span></td> <td> <span style="font-family:courier; font-size:11px; margin-top:5px;"> <?php
$field = new stdClass(); $field->fieldId = "mm_field_shipping_country"; $field->fieldName = "shippingcountry"; $field->label = "Country"; $fieldInfo[] = $field; $data = array(); $data["mm_field_shipping_address"] = $user->getShippingAddress(); $data["mm_field_shipping_city"] = $user->getShippingCity(); $data["mm_field_shipping_state"] = $user->getShippingState(); $data["mm_field_shipping_zip"] = $user->getShippingZipCode(); $data["mm_field_shipping_country"] = $user->getShippingCountry(); $form = new MM_CheckoutForm(); if (!isset($data["mm_field_shipping_country"])) { $data["mm_field_shipping_country"] = ""; } $form->shippingCountryList = MM_HtmlUtils::getCountryList($data["mm_field_shipping_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