Forums / Addon Shipping Modules / Remove the number of packages, weight and delivery ETA times - UPS XML

Remove the number of packages, weight and delivery ETA times - UPS XML

Views: 3,670

Results 1 to 12 of 12
16 Sep 2010, 3:50 PM
#1
grgolf avatar

grgolf

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Remove the number of packages, weight and delivery ETA times - UPS XML

I've searched every where and couldn't seem to find my answer. I just installed the UPS XML addon and everything is working fine, but I want to remove the number of packages and weight and also all the ETA times that are displayed when checking out. Any help would be appreciated.

Thanks,
Geoff

6 Oct 2010, 10:47 PM
#2
zc_fan avatar

zc_fan

New Zenner

Join Date:
Sep 2010
Location:
SF Bay Area
Posts:
54
Plugin Contributions:
0

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

I want the same exact thing. I have found where the code is but am not able to modify and make it work. It is found in the \includes\modules\shipping\upsxml.php. Here are the lines 241 to 245:

if (DIMENSIONS_SUPPORTED) {

$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');

} else {

$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
}

See if you can modify it.

20 Jan 2011, 4:48 AM
#3
mr_pibb avatar

mr_pibb

New Zenner

Join Date:
Jul 2009
Posts:
20
Plugin Contributions:
0

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

Not sure if you solved this...

To remove the packages and weight, including the first "UPS", just comment out those lines (241-245 on mine)

 
            //if (DIMENSIONS_SUPPORTED) {
            //    $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
            //} else {
            //    $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
            // }

To leave that first "UPS" in there, this worked for me:

          if (DIMENSIONS_SUPPORTED) {
                $this->quotes = array('id' => $this->code, 'module' => $this->title  ); //.  ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
            } else {
                $this->quotes = array('id' => $this->code, 'module' => $this->title  ); //. ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
            }

To remove the delivery date estimates, comment out these lines (261-266 on mine)

             //  if (isset($this->servicesTimeintransit[$type])) {
              //      $eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
              //      $months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
              //      $eta_arrival_date = $months[(int)$eta_array[1]]." ".$eta_array[2].", ".$eta_array[0];
              //      $_type .= ", ETA: ".$eta_arrival_date;
              //  }

That's what worked for me!

9 Sep 2011, 9:24 PM
#4
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

For anyone else stumbling upon this problem... you can change settings in Admin > Configuration > Shipping/Packaging > Display Number of Boxes and Weight Status = 0

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

26 Aug 2014, 5:14 PM
#5
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

Mr.Pibb:

Not sure if you solved this...

To remove the packages and weight, including the first "UPS", just comment out those lines (241-245 on mine)

        //if (DIMENSIONS_SUPPORTED) {
        //    $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
        //} else {
        //    $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
        // }
> 
> 
> To leave that first "UPS" in there, this worked for me:
> 
> ```
          if (DIMENSIONS_SUPPORTED) {
                $this->quotes = array('id' => $this->code, 'module' => $this->title  ); //.  ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
            } else {
                $this->quotes = array('id' => $this->code, 'module' => $this->title  ); //. ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
            }

To remove the delivery date estimates, comment out these lines (261-266 on mine)

         //  if (isset($this->servicesTimeintransit[$type])) {
          //      $eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
          //      $months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
          //      $eta_arrival_date = $months[(int)$eta_array[1]]." ".$eta_array[2].", ".$eta_array[0];
          //      $_type .= ", ETA: ".$eta_arrival_date;
          //  }
> 
> That's what worked for me!

I resolved the ETA issue but not the number of boxes and weight.  When I removed the above mentioned lines my site will not progress to the shipping page and just hangs on a white screen.  Any ideas?  For now I have it showing weights and boxes.
26 Aug 2014, 5:35 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

Go to the Configuration ... Shipping/Packaging ... and set:

Display Number of Boxes and Weight Status
Display Shipping Weight and Number of Boxes?

0= off
1= Boxes Only
2= Weight Only
3= Both Boxes and Weight

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

27 Aug 2014, 9:07 AM
#7
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

Ajeh:

Go to the Configuration ... Shipping/Packaging ... and set:

I tried that but the configuration is already set to zero. I tried removing various bits of code but either the ups option doesn't show or it hangs when going to the shipping page.

27 Aug 2014, 12:56 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

My bad ... I forgot that UPSXML does not use that switch ...

Edit the file:
/includes/modules/shipping/upsxml.php

and add the code in RED:

      if (DIMENSIONS_SUPPORTED) {
          $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
      } else {
[B]//[/B]          $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
[B]          $this->quotes = array('id' => $this->code, 'module' => $this->title);
[/B]      }
      $methods = array();

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Aug 2014, 8:23 AM
#9
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

Ajeh:

My bad ... I forgot that UPSXML does not use that switch ...

Edit the file:
/includes/modules/shipping/upsxml.php

and add the code in RED:

  if (DIMENSIONS_SUPPORTED) {
      $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
  } else {

[B]//[/B] $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
[B] $this->quotes = array('id' => $this->code, 'module' => $this->title);
[/B]
}
$methods = array();

Hi Linda,
I tried adding the code and it did go to the shipping page but the ups option will not show up only fedex which I also have installed.
Below is the current code I have:

 $upsQuote = $this->_upsGetQuote();
        if ((is_array($upsQuote)) && (sizeof($upsQuote) > 0)) {
            if (DIMENSIONS_SUPPORTED) {
                $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
            } else {
                $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
            }

Thanks in advance for any suggestions.

Allan
28 Aug 2014, 1:07 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

Check your code again and make sure you just add the 1 line in RED and comment out the original line ...

If UPSXML still does not show, check for any debug logs in /logs or /cache (if using older Zen Cart version) ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Aug 2014, 2:40 PM
#11
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

Thanks a bunch. The 3rd try was the charm. :smile:

28 Aug 2014, 3:12 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Remove the number of packages, weight and delivery ETA times - UPS XML

Thanks for the update that this is working for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!