Jump to content
Sign in to follow this  
zzfritz

UPS Choice 1.0

Recommended Posts

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] . ";


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

sorry, after removing the = from key = in the function call, then the parse error moves to this line:

 

$name = (($key) ? configuration[ . $key . ][] : configuration_value);


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

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;

 

}

 

//


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

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;

 }

Share this post


Link to post
Share on other sites

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 . "");


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

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 . "");


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×