Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Adding Media Mail Transit time (7 - 10 days)

Adding Media Mail Transit time (7 - 10 days)

Locked

Views: 4,084

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
1 May 2007, 8:17 PM
#1
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Adding Media Mail Transit time (7 - 10 days)

I ship almost exclusively media mail in the US, I notice the transit time is not listed like the other methods (first class, priority etc...)

How can I add (7 - 10 days) next to "media mail" in the shipping pop up estimate and checkout shipping page?

Can't find the file with the developer tool kit, and have looked through the obvious english files....

where is it? :lookaroun

2 May 2007, 4:37 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding Media Mail Transit time (7 - 10 days)

You would need to edit the shipping module:
/includes/modules/shipping/usps.php

and locate the lines around 191 to 192 that read:

          // BOF: UPS USPS
          $title = ((isset($this->types[$type])) ? $this->types[$type] : $type);
          if(in_array('Display transit time', explode(', ', MODULE_SHIPPING_USPS_OPTIONS)))    $title .= $transittime[$type];

and change to read:

          // BOF: UPS USPS
          $title = ((isset($this->types[$type])) ? $this->types[$type] : $type);
          if(in_array('Display transit time', explode(', ', MODULE_SHIPPING_USPS_OPTIONS)))    $title .= $transittime[$type];
          echo $title . '<br>';
          if ($title == 'Media Mail') {
            $title .= ' (7-10 days)';
          }
2 May 2007, 2:11 PM
#3
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: Adding Media Mail Transit time (7 - 10 days)

Thank you for the code!

It works, but seems to generate two different groups of usps shipping options and travel time.

The old usps shipping options are located in the top left of both pages (media with no transit time) and the new usps shipping options in the correct place with the media mail transit time.

did I leave something out?

     // BOF: UPS USPS 
          $title = ((isset($this->types[$type])) ? $this->types[$type] : $type); 
          if(in_array('Display transit time', explode(', ', MODULE_SHIPPING_USPS_OPTIONS)))    $title .= $transittime[$type]; 
         echo $title . '<br>'; 
          if ($title == 'Media Mail') { 
            $title .= ' (7-10 days)'; 
          }  
2 May 2007, 5:09 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding Media Mail Transit time (7 - 10 days)

Silly me ... take out that extra echo I put in there when testing it ... :cool:

2 May 2007, 7:56 PM
#5
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: Adding Media Mail Transit time (7 - 10 days)

Smokin'! :smoke:

Works great now! thank you for the coding!

2 May 2007, 10:48 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding Media Mail Transit time (7 - 10 days)

Most welcome ... remember us when you are rich and famous ... :smartalec: