Zen Cart Logo
Forums / Addon Shipping Modules / How to remove items weight from USP XML shipping quote?

How to remove items weight from USP XML shipping quote?

Views: 1,717

Results 1 to 12 of 12
26 May 2011, 7:54 PM
#1
dazana avatar

dazana

New Zenner

Join Date:
Apr 2009
Posts:
45
Plugin Contributions:
0

How to remove items weight from USP XML shipping quote?

Can anybody help me with howto tweak USP XML module **not **to show order weight in a shipping quote? I want only ETA to show.

here is example on how it looks in standard version:

United Parcel Service (1 pkg x 9.00 kgs total) (UPS Standard, ETA: May 30, 2011)

Thank you in advance for tips.

26 May 2011, 8:10 PM
#2
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

Look in includes/modules/shipping/ups.php for the lines that look like the below. Try commenting out this entire section as it is responsible for creating the weight display string.

    if ( (is_array($upsQuote)) && (sizeof($upsQuote) > 0) ) {
      switch (SHIPPING_BOX_WEIGHT_DISPLAY) {
        case (0):
        $show_box_weight = '';
        break;
        case (1):
        $show_box_weight = ' (' . $shipping_num_boxes . ' ' . TEXT_SHIPPING_BOXES . ')';
        break;
        case (2):
        $show_box_weight = ' (' . number_format($ups_shipping_weight * $shipping_num_boxes,2) . TEXT_SHIPPING_WEIGHT . ')';
        break;
        default:
        $show_box_weight = ' (' . $shipping_num_boxes . ' x ' . number_format($ups_shipping_weight,2) . TEXT_SHIPPING_WEIGHT . ')';
        break;
      }
      $this->quotes = array('id' => $this->code,
                            'module' => $this->title . $show_box_weight);
26 May 2011, 9:10 PM
#3
dazana avatar

dazana

New Zenner

Join Date:
Apr 2009
Posts:
45
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

I think this code for ups.php and won't do anything for upsxml module.

Can somebody clarify?

26 May 2011, 9:41 PM
#4
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

look for the same line of code in the upsxml file. The code for creating the string should have not have changed. What changed was the method of getting the information and quotes from the UPS servers. I have my own version of the xml system running now as I have unique shipping issues. I still have some things to work out. I have a blogging style thread called "changing the database" if you wish to follow along.

26 May 2011, 9:46 PM
#5
dazana avatar

dazana

New Zenner

Join Date:
Apr 2009
Posts:
45
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

g2ktcf:

look for the same line of code in the upsxml file. The code for creating the string should have not have changed. What changed was the method of getting the information and quotes from the UPS servers. I have my own version of the xml system running now as I have unique shipping issues. I still have some things to work out. I have a blogging style thread called "changing the database" if you wish to follow along.

I tried that, but it doesn't have anything similar to that.

26 May 2011, 10:06 PM
#6
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

yep, I just looked through that code and did not see anything that would create the string either.

26 May 2011, 10:16 PM
#7
dazana avatar

dazana

New Zenner

Join Date:
Apr 2009
Posts:
45
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

Thank you for trying!

27 May 2011, 12:16 PM
#8
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

no problem :) just wish I could have found it. Maybe someone else more familiar with that specific module will chime in.

27 May 2011, 6:11 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: How to remove items weight from USP XML shipping quote?

Did you try adjusting the setting in Admin->Configuration->Shipping/Packaging?

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

27 May 2011, 10:31 PM
#10
dazana avatar

dazana

New Zenner

Join Date:
Apr 2009
Posts:
45
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

DrByte:

Did you try adjusting the setting in Admin->Configuration->Shipping/Packaging?

Good idea, but I have already set it to "0" and both weight and # of boxes still show in UPS quotes.

30 May 2011, 5:34 AM
#12
dazana avatar

dazana

New Zenner

Join Date:
Apr 2009
Posts:
45
Plugin Contributions:
0

Re: How to remove items weight from USP XML shipping quote?

Yes, Sir!

Worked great.

Replaced line 241-245 with

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)');
}