Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I tried asking this question in the Shoppe Enhancement Controller thread and it was suggested I try to ask it in the UPS shipping forum. I could not find a UPS forum so I will as it here. I hope this is the right place.

 

I am using SEC v1b with the OSC 5-18 snapshot. I want to limit the ups choices that are displayed to only ups ground. To do this I am trying to integrate the UPS Choice v1.7 contribution into SEC. This is a very simple contribution and I am having a problem with the code modification on the admin/modules.php.

 

Around line 37 change:

switch ($HTTP_GET_VARS['action']) { 

   case 'save': 

     while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { 

       tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); 

     }

To This:

    switch ($HTTP_GET_VARS['action']) { 

   case 'save': 

     while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { 

       if( is_array( $value ) ) $value = implode( ", ", $value); 

       tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); 

     }

Except that with the SEC v1b admin/modules.php has been modified to

switch ($HTTP_GET_VARS['action']) { 

   case (ADMIN_DEMO): 

     break; 

   case 'save': 

     while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { 

       tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); 

     }

 

I tried to just change the string

 

while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {

 

To

if( is_array( $value ) ) $value = implode( ", ", $value);

But that did not work.

 

Anyone have an answer on how I might get the UPS Choice v1.7 contribution to work with the SEC v1b contribution?

Posted

No ... Add the

if( is_array( $value ) ) $value = implode( ", ", $value);

 

line below the while line ins the save case.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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