zzfritz Posted November 28, 2002 Share Posted November 28, 2002 I have uploaded a contribution that enhances ups.php v.1.46, includes the admin control to select which UPS service types are enabled, and filters out the duplicate 3 Day Select quote: http://www.oscommerce.com/downloads.php/co...ions,734/type,2 Quote Link to comment Share on other sites More sharing options...
xaraya Posted November 28, 2002 Share Posted November 28, 2002 Much needed. thank you :D Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2002 Share Posted November 28, 2002 getting the following error: Parse error: parse error in /Users/jeffchas/Sites/tep/admin/includes/functions/general.php on line 1287 which equates to: function tep_cfg_select_multioption($select_array, $key_value, $key = ) { I tried removing the = from $key = ) and then I get a parse error at the following line: $string .= <br><input type="checkbox" name=" . $name . " value=" . $select_array[$i] . "; Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2002 Share Posted November 28, 2002 sorry, after removing the = from key = in the function call, then the parse error moves to this line: $name = (($key) ? configuration[ . $key . ][] : configuration_value); Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2002 Share Posted November 28, 2002 here is the fixed version..... // Alias function for array of configuration values in the Administration Tool function tep_cfg_select_multioption($select_array, $key_value, $key ='') { for ($i=0; $i<sizeof($select_array); $i++) { $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value'); $string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"'; $key_values = explode( ", ", $key_value); if ( in_array($select_array[$i], $key_values) ) $string .= CHECKED; $string .= '> ' . $select_array[$i]; } return $string; } // Quote Link to comment Share on other sites More sharing options...
zzfritz Posted November 28, 2002 Author Share Posted November 28, 2002 Oops, the first line of the function got garbled and should be function tep_cfg_select_multioption($select_array, $key_value, $key = '') { for ($i=0; $i<sizeof($select_array); $i++) { $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value'); $string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"'; $key_values = explode( ", ", $key_value); if ( in_array($select_array[$i], $key_values) ) $string .= 'CHECKED'; $string .= '> ' . $select_array[$i]; } return $string; } Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2002 Share Posted November 28, 2002 when clicking update in the admin for UPS the following error occurs: 1054 - Unknown column 'MODULE_SHIPPING_UPS_STATUS' in 'where clause' update configuration set configuration_value = 1 where configuration_key = MODULE_SHIPPING_UPS_STATUS [TEP STOP] generated form the mod'ed line in admin modules.php tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = " . $value . " where configuration_key = " . $key . ""); Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2002 Share Posted November 28, 2002 when clicking update in the admin for UPS the following error occurs: 1054 - Unknown column 'MODULE_SHIPPING_UPS_STATUS' in 'where clause' update configuration set configuration_value = 1 where configuration_key = MODULE_SHIPPING_UPS_STATUS [TEP STOP] generated form the mod'ed line in admin modules.php tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = " . $value . " where configuration_key = " . $key . ""); Quote Link to comment Share on other sites More sharing options...
rossdev Posted November 28, 2002 Share Posted November 28, 2002 and filters out the duplicate 3 Day Select quote: Did you know that the second "3 Day Select" is for commercial? I made a simple fix to checkout_shipping.php <? if($quotes[$i]['methods'][$j]['title']=="3 Day Select"){ if($show=="commercial"){ echo '<td align="center" valign="top" class="main">' . $quotes[$i]['methods'][$j]['title'] . ' Commercial</td>'; } else { echo '<td align="center" valign="top" class="main">' . $quotes[$i]['methods'][$j]['title'] . '</td>'; $show="commercial"; } } else { echo '<td align="center" valign="top" class="main">' . $quotes[$i]['methods'][$j]['title'] . '</td>'; } ?> :D Brian.. Quote Link to comment Share on other sites More sharing options...
zzfritz Posted November 28, 2002 Author Share Posted November 28, 2002 Yes, we have all concluded that the second 3DS quote is commercial and the first one is residential, despite their having identical UPS codes. I suppose we could invent a pseudo-UPS code for it, and stick that in the module. Lemme sleep on it, and consider the ramifications. My store assumes deliveries are residential, and that if you gave customers a choice between residential and commercial they will pick the cheaper one. But if we create a code for it, the store could choose to display it or not. Quote Link to comment Share on other sites More sharing options...
rossdev Posted November 28, 2002 Share Posted November 28, 2002 My store assumes deliveries are residential, and that if you gave customers a choice between residential and commercial they will pick the cheaper one. My client said leave it.. He can?t control the customer, and if the customer say their commercial and there actually residential then the customer has to deal with UPS not the store Brian.. Quote Link to comment Share on other sites More sharing options...
zzfritz Posted November 28, 2002 Author Share Posted November 28, 2002 I revised the contribution to assign unique codes to the 3 Day Select quotes, so they can be specifically selected/disabled and then identified for what they are. Now we have all the choices: http://www.oscommerce.com/downloads.php/co...ions,738/type,2 Quote Link to comment Share on other sites More sharing options...
rossdev Posted November 29, 2002 Share Posted November 29, 2002 I revised the contribution to assign unique codes to the 3 Day Select quotes, so they can be specifically selected/disabled and then identified for what they are. Now we have all the choices: http://www.oscommerce.com/downloads.php/co...ions,738/type,2 Works great!! Brian.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.