Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

UPS - Setting Maximum Weight per box

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 01-23-2005, 02:54 AM
 
jmell jmell is offline
 

Senior Member
  
Join Date: Sep 2003
Posts: 127
 

Default UPS - Setting Maximum Weight per box

I have a few items that ship in one box at 47Lbs. When you order 4 of them UPS will not rate it because it comes back over weight. How do I tell UPS to Rate it as 4 Boxes?
__________________
X-Cart 4.1.9
Reply With Quote
  #2  
Old 02-24-2005, 07:04 AM
 
sheylak sheylak is offline
 

Newbie
  
Join Date: Feb 2005
Posts: 3
 

Default ups

yup same question how? <3
__________________
_________________
Sheyla Karina <3

X-Cart version 4.0.1
PHP 4.3.10
MySQL version 4.0.22-standard
Operation system Linux
Reply With Quote
  #3  
Old 02-24-2005, 07:31 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

i think this got looked at in later versions.

check the changelog for more info
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 03-01-2005, 01:20 PM
 
nick1628 nick1628 is offline
 

Member
  
Join Date: Nov 2004
Posts: 15
 

Default

i just upgraded to the latest stable of xcart 4.0.12 and no this hasn't been fixed ever...this is actually extremely easy to fix (although it took me a long time to track down)....i've heard of people paying huge chunks of cash for this simple fix....this works in every version of 4.x that i've tried

as it is...i have it rating them as all seperate boxes but if someone wants i could update the code to put as many items into a box as possible.....

so..here's the code

Before: (file /shipping/mod_UPS.php)
Code:
$query=<<<EOT <?xml version='1.0'?> <AccessRequest xml:lang='en-US'> <AccessLicenseNumber>$UPS_accesskey</AccessLicenseNumber> <UserId>$UPS_username</UserId> <Password>$UPS_password</Password> </AccessRequest> <?xml version='1.0'?> <RatingServiceSelectionRequest xml:lang='en-US'> <FreightCharges> <CurrencyCode>USD</CurrencyCode> </FreightCharges> <Request> <TransactionReference> <CustomerContext>Rating and Service</CustomerContext> <XpciVersion>1.0001</XpciVersion> </TransactionReference> <RequestAction>Rate</RequestAction> <RequestOption>shop</RequestOption> </Request> <PickupType> <Code>$pickup_type</Code> </PickupType> $customer_classification_query <Shipment> <Shipper> <Address> <City>$src_city</City> <PostalCode>$src_zipcode</PostalCode> <CountryCode>$src_country_code</CountryCode> </Address> </Shipper> <ShipFrom> <Address> <City>$src_city</City> <PostalCode>$src_zipcode</PostalCode> <CountryCode>$src_country_code</CountryCode> </Address> </ShipFrom> <ShipTo> <Address> <City>$dst_city</City> <PostalCode>$dst_zipcode</PostalCode> <CountryCode>$dst_country_code</CountryCode> $residental_flag </Address> </ShipTo> <Package> <PackagingType> <Code>$packaging_type</Code> </PackagingType> <PackageWeight> <UnitOfMeasurement> <Code>$UPS_wunit</Code> </UnitOfMeasurement> <Weight>$UPS_weight</Weight> </PackageWeight> $dimensions_query $pkgparams </Package> </Shipment> </RatingServiceSelectionRequest> EOT;

After:
Code:
$query=<<<EOT <?xml version='1.0'?> <AccessRequest xml:lang='en-US'> <AccessLicenseNumber>$UPS_accesskey</AccessLicenseNumber> <UserId>$UPS_username</UserId> <Password>$UPS_password</Password> </AccessRequest> <?xml version='1.0'?> <RatingServiceSelectionRequest xml:lang='en-US'> <FreightCharges> <CurrencyCode>USD</CurrencyCode> </FreightCharges> <Request> <TransactionReference> <CustomerContext>Rating and Service</CustomerContext> <XpciVersion>1.0001</XpciVersion> </TransactionReference> <RequestAction>Rate</RequestAction> <RequestOption>shop</RequestOption> </Request> <PickupType> <Code>$pickup_type</Code> </PickupType> $customer_classification_query <Shipment> <Shipper> <Address> <City>$src_city</City> <PostalCode>$src_zipcode</PostalCode> <CountryCode>$src_country_code</CountryCode> </Address> </Shipper> <ShipFrom> <Address> <City>$src_city</City> <PostalCode>$src_zipcode</PostalCode> <CountryCode>$src_country_code</CountryCode> </Address> </ShipFrom> <ShipTo> <Address> <City>$dst_city</City> <PostalCode>$dst_zipcode</PostalCode> <CountryCode>$dst_country_code</CountryCode> $residental_flag </Address> </ShipTo> EOT; //<? //only in here to make code look nicer in php editor..doesn't affect anything global $cart; foreach($cart['products'] as $prodKey => $prodArray) { for( $quantity=0; $quantity<$prodArray['amount'];$quantity++) { $prodWeight = $prodArray['weight']; $query .=<<<EOT <Package> <PackagingType> <Code>$packaging_type</Code> </PackagingType> <PackageWeight> <UnitOfMeasurement> <Code>$UPS_wunit</Code> </UnitOfMeasurement> <Weight>$prodWeight</Weight> </PackageWeight> $dimensions_query $pkgparams </Package> EOT; } } $query .=<<<EOT </Shipment> </RatingServiceSelectionRequest> EOT;


and the other file

Before: (file cart.php around line 285)
Code:
$cart["products"][]=array("cartid"=>$cartid, "productid"=>$productid,"amount"=>$amount, "options"=>$product_options, "free_price"=>@price_format(@$free_price),"distribution"=>$product_distribution);


After:
Code:
$cart["products"][]=array("cartid"=>$cartid, "productid"=>$productid,"amount"=>$amount, "options"=>$product_options, "weight"=>$added_product["weight"], "free_price"=>@price_format(@$free_price),"distribution"=>$product_distribution);

Hope this helps, if you have any problems just drop me a message.

- Nick
__________________
xcart pro v3.5.12 [win]
Reply With Quote
  #5  
Old 03-21-2005, 05:39 AM
 
leonp leonp is offline
 

Newbie
  
Join Date: Mar 2005
Posts: 2
 

Default

Nick,

Thanks for the code but I must have done something wrong when trying to install it.

I basically cut and pasted the code you supplied in both programs but now I come up with the following error message:

Parse error: parse error, unexpected T_SL in /home/dropship/public_html/store/shipping/mod_UPS.php on line 218

Just in case I messed up, I cut and pasted a second time with the same results.

Any help would be greatly appreciated because this is the last problem that I have to solve before going live with my store.

I am running Version 4.0.12

Thanks,
Leon P.
http://www.DropShipSupplier.com
__________________
Version 4.0.12
Reply With Quote
  #6  
Old 03-21-2005, 09:46 AM
 
nick1628 nick1628 is offline
 

Member
  
Join Date: Nov 2004
Posts: 15
 

Default

Hi,

I replied to your PM to me with my thoughts. I'm assuming this should fix it, so for anyone else, make sure that there are no spaces after the $query=<<<EOT on line 218 and also that the EOT; on line 266 is all the way against the left side with no spaces after. I'll update this later if that doesn't help leon.

- nick
__________________
xcart pro v3.5.12 [win]
Reply With Quote
  #7  
Old 03-21-2005, 11:06 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 480
 

Default

This has been discussed in the following thread:

http://forum.x-cart.com/viewtopic.php?t=2094
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #8  
Old 03-21-2005, 02:35 PM
 
sabrina sabrina is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Indianapolis, IN., USA
Posts: 53
 

Default UPS

Same problem
__________________
X-CART GOLD: 4.0.14

Operating system Linux
Apache version 1.3.33 (Unix)
PERL version 5.8.1
PHP version 4.3.10
MySQL version 4.0.22-standard
Reply With Quote
  #9  
Old 03-22-2005, 05:45 AM
 
leonp leonp is offline
 

Newbie
  
Join Date: Mar 2005
Posts: 2
 

Default

To anyone having this problem,

I have installed the mods that nick1628 posted on Tue Mar 01, 2005 5:20 pm and that has taken care of the problem.

I can now ship via UPS, mutiple items in one order even if the total weight is greater than 150 lbs..

Thanks Nick for the code and the quick response when I had a problem installing it (really my lack of knowledge that caused the problem).

X-Cart wanted to charge me to fix their module. Is that how they normally treat customers that find problems in their programs?

Leon P.
__________________
Version 4.0.12
Reply With Quote
  #10  
Old 03-22-2005, 01:15 PM
 
sabrina sabrina is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Indianapolis, IN., USA
Posts: 53
 

Default

Can you post here for others?
__________________
X-CART GOLD: 4.0.14

Operating system Linux
Apache version 1.3.33 (Unix)
PERL version 5.8.1
PHP version 4.3.10
MySQL version 4.0.22-standard
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:26 PM.

   

 
X-Cart forums © 2001-2020