Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customizing text on UPS XML?


Guest

Recommended Posts

I have the UPS XML module installed and working correctly, but I want to change the text that is being displayed. Does someone know how to do that and can show me where the code is?

 

Here is what I want to change. On the shipping checkout page that displays the shipping methods and rates, the UPS XML module displays the text:

 

United Parcel Service (XML) (1 pkg x 82.5 lbs total)

 

All I want it to display is:

 

United Parcel Service

Link to comment
Share on other sites

I want to change the text that is being displayed.

I guess that line is constructed somewhere around line 225 in includes/modules/shipping/upsxml.php:

// EOF Time In Transit

       $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 ') . $shipping_weight . ' ' . strtolower($this->unit_weight) . ' total)');
           }

Look for the "else" statement and I suggest you try changing that part to:

            } else {
// original code below
/*                $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . $shipping_weight . ' ' . strtolower($this->unit_weight) . ' total)'); */
// new code, not showing number of boxes and weight
               $this->quotes = array('id' => $this->code, 'module' => $this->title);
           }

Link to comment
Share on other sites

Cool! That took out the information about the number of packages and the package weight. To take out the word "XML" in the text "United Parcel Service (XML)" I edited the upsxml.php file found in \includes\languages\english\modules\shipping

 

Thanks for the help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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