Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

UPS Choice 1.0


zzfritz

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

Link to comment
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);

Link to comment
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;

 

}

 

//

Link to comment
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;

 }

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

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

Link to comment
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..

Link to comment
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.

Link to comment
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..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...