This is a discussion on Affiliate - country/state (Bug ID - 162) within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; I think solution is very simple, open /includes/modules/affiliate_account_details.php Find - <?php // +Country-State Selector $zones_array = array(); $zones_query = tep_db_query("select ...
| |||||||
| Register | FAQ | Donate | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I think solution is very simple, open /includes/modules/affiliate_account_details.php Find - <?php // +Country-State Selector $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = " . (int)$country . " order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } if (count($zones_array) > 0) { echo tep_draw_pull_down_menu('state', $zones_array); } else { echo tep_draw_input_field('state'); } // -Country-State Selector if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT; ?> </td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_COUNTRY; ?></td> <?php // BOF: MOD - Country-State Selector ?> <td class="main"> <?php echo tep_get_country_list('country',$a_country,'onChang e="return refresh_form(affiliate_details);"') . ' <br>' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td> <?php // EOF: MOD - Country-State Selector ?> replace with - <?php // +Country-State Selector $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = " . (int)$a_country . " order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } if (count($zones_array) > 0) { echo tep_draw_pull_down_menu('a_state', $zones_array); } else { echo tep_draw_input_field('a_state'); } // -Country-State Selector if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT; ?> </td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_COUNTRY; ?></td> <?php // BOF: MOD - Country-State Selector ?> <td class="main"> <?php echo tep_get_country_list('a_country',$a_country,'onCha nge="return refresh_form(affiliate_details);"') . ' <br>' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td> <?php // EOF: MOD - Country-State Selector ?> This will solve country issue. Now other issue remains - selected state is not saved in affiliate_affiliate table. For that, open /affiliate_signup.php Find - 'affiliate_city' => $a_city, replace with - 'affiliate_city' => $a_city, 'affiliate_state' => $a_state, Let me know if it works. |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Country-State Selector | michael_s | New osCommerce Contributions | 0 | 04-20-2008 09:54 AM |
| Country-State Selector | michael_s | New osCommerce Contributions | 0 | 04-20-2008 03:51 AM |
| Country-State Selector | michael_s | New osCommerce Contributions | 0 | 04-20-2008 03:15 AM |
| Country-State Selector | michael_s | New osCommerce Contributions | 0 | 04-12-2008 02:11 PM |
| Country-State Selector | michael_s | New osCommerce Contributions | 0 | 03-23-2008 04:27 AM |