Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

UPS XML Shopping_cart.php error


Recommended Posts

From the documentation for the install:



Step 9



The packaging routines are done outside of the shipping module in the class packing. It is instantiated when the page checkout_shipping is called (I tried to add it to includes/classing/shipping.php which makes more sense but the class remained invisible to the shipping module for some unknown reason... must have done something wrong).


For this a change to catalog/checkout_shipping.php is needed.


Lines 59-60




$total_weight = $cart->show_weight();

$total_count = $cart->count_contents();




// BOF changes for adding class packing


$dimensions_support = 1;

} elseif (defined('SHIPPING_DIMENSIONS_SUPPORT') && SHIPPING_DIMENSIONS_SUPPORT == 'With product dimensions') {

$dimensions_support = 2;

} else {

$dimensions_support = 0;



if ($dimensions_support > 0) {

require(DIR_WS_CLASSES . 'packing.php');

$packing = new packing;


// EOF changes for adding class packing


You're done.


Great... so checkout_shipping.php works fine.


The problem is, after installing this newer version of UPS XML (that separated the two things (bolded) above). Shopping_cart.php no longer displays the correct info for shipping at the bottom.


For example:


Checkout_Shipping.php gives == United Parcel Service (4 pkg(s), 39 lbs total)

Shopping_cart.php gives == United Parcel Service (1 pkg, 0 lbs total)


Hmm, obviously wrong.


I've tried going back to a new 2.2 file and adding the changes (step 3 in the documentation). I've tried adding them to me existing already somewhat modded version, neither case works, they all resort to that 1pkg 0 lbs quote.


I'm thinking that this is a deficiency in the mod. The issue is that customers would see the cheap shipping quote, then checkout, and see the quote has changed, and get angry.

Edited by aspen
Link to comment
Share on other sites

additionally shopping_cart.php was running very very slow and causing the whole site to run slow... from problems communicating with UPS. I rolled back the changes and the problems are gone, runs fast.

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.

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