Forums / General Questions / store shipping METHOD selection for order only, with FEC?

store shipping METHOD selection for order only, with FEC?

Locked

Views: 408

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
23 Feb 2015, 4:54 PM
#1
abcisme avatar

abcisme

Zen Follower

Join Date:
Jun 2006
Posts:
298
Plugin Contributions:
0

store shipping METHOD selection for order only, with FEC?

I'm using FEC on ZC1.5.3.

For the shipping options at checkout, I would like only the shipping method to pass through to the order, not the shipping module name.

For example, instead of having "FedEx (FedEx Ground)" pass through as the shipping choice on the order, I would like to only see "FedEx Ground" get stored in the order details.

I had it set up this way on our 1.3.9 cart, but we did not use FEC. This is what I edited on my 1.3.9 cart, but it is not working when I apply those same changes to the 1.5.3 cart: http://www.zen-cart.com/showthread.php?62999-Table-Rate-Best-Way and http://www.zen-cart.com/showthread.php?196176-UPS-XML-Module-not-passing-correct-information-to-admin&p=1125677#post1125677

I think the issue may be in includes/modules/pages/checkout/header_php.php, but I'm not sure.

Possibly here?

           if($bool)
            {
              $quote = $shipping_modules->quote($method, $module);
            }
            //eof tell a freand
          } else {
            // avoid incorrect calculations during redirect
            $shipping_modules = new shipping();
            $quote = $shipping_modules->quote($method, $module);
          }
          if (isset($quote['error'])) {
            $_SESSION['shipping'] = '';
          } else {
            if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
              $_SESSION['shipping'] = array('id' => $_SESSION['shipping'],
                                'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
                                'cost' => $quote[0]['methods'][0]['cost']);
                zen_redirect(zen_href_link(FILENAME_CHECKOUT, 'fecaction=null', 'SSL'));
            }
          }

I'd appreciate any advice anyone can offer. Thanks!

23 Feb 2015, 5:14 PM
#2
abcisme avatar

abcisme

Zen Follower

Join Date:
Jun 2006
Posts:
298
Plugin Contributions:
0

Re: store shipping METHOD selection for order only, with FEC?

I figured it out. Apparently there were TWO places I had to make the change in /includes/modules/pages/checkout/header_php.php

Changed:

'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),

TO:

'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['methods'][0]['title'] . ''),