osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Affiliate - country/state (Bug ID - 162)

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 ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Closed Thread

 

LinkBack Thread Tools
  #1  
Old 05-13-2008, 06:17 PM
osCMax Testing Team
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
pas75
Lightbulb Affiliate - country/state (Bug ID - 162)

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 '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main">&nbsp;<?php echo ENTRY_COUNTRY; ?></td>
<?php // BOF: MOD - Country-State Selector ?>
<td class="main">&nbsp;&nbsp;<?php echo tep_get_country_list('country',$a_country,'onChang e="return refresh_form(affiliate_details);"') . '&nbsp;<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 '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main">&nbsp;<?php echo ENTRY_COUNTRY; ?></td>
<?php // BOF: MOD - Country-State Selector ?>
<td class="main">&nbsp;&nbsp;<?php echo tep_get_country_list('a_country',$a_country,'onCha nge="return refresh_form(affiliate_details);"') . '&nbsp;<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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -8. The time now is 08:26 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design