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

Pre-Login Shipping Calculator

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #41  
Old 07-02-2004, 01:56 PM
 
joestern joestern is offline
 

Senior Member
  
Join Date: Apr 2004
Posts: 187
 

Default

Here you go...

Code:
Environment components info: Component Status X-Cart version 3.5.8 X-Cart directory /var/www/html/cart PHP 4.1.2 details >> MySQL server 3.23.58 MySQL client 3.23.58 Web server unknown Operation system Linux Perl 5.006001 details >> XML parser (expat) found HTTPS modules Net::SSLeay 1.23 active libCURL libcurl 7.8 (OpenSSL 0.9.6b) (ipv6 enabled) CURL executable curl 7.8 (i386-redhat-linux-gnu) libcurl 7.8 (OpenSSL 0.9.6b) (ipv6 enabled) OpenSSL executable OpenSSL 0.9.6b [engine] 9 Jul 2001 HTTPS-cli executable not found Modules for the payment methods VeriSign PayFlow Pro client /var/www/html/cart/payment/bin/pfpro L305 PayBox client not found Saferpay client not found TrustCommerce (tclink.so) not found
Reply With Quote
  #42  
Old 07-02-2004, 02:30 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Quote:
Originally Posted by joestern
We are using FedEx rates, which were downloaded into x-cart.
It may be because Fedex doesn't actually query a server but looks up a rate sheet?

Just guessing here...
Reply With Quote
  #43  
Old 07-02-2004, 10:44 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Just tried on 3.5.9 with no success.

I'm using Canada Post RealTime Shipping here.

I expanded the text field to 6 digits (characters) in the php file and the template, but basically this doesn't work so good for me.
Reply With Quote
  #44  
Old 07-04-2004, 11:22 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Rackit,

I think I may have tracked down why this is not working for Fedex or Canada Post.

Mod_UPS calls for

Code:
$dst_country_code=$userinfo["s_country"]; $dst_city=$userinfo["s_city"]; $dst_zipcode=$userinfo["s_zipcode"];

Mod_CPC (Canada Post Corporation) requires

Code:
$cp_dest_country = $userinfo["s_country"]; $cp_dest_city = $userinfo["s_city"]; $cp_dest_zip = $userinfo["s_zipcode"]; $cp_dest_state = $userinfo["s_state"];

I believe that the Canada Post server validates the Postal code with the province (state).

Mod_Fedex asks for a whole bunch of stuff which is probably beyond keeping this estimator simple.

Code:
# do all these queries only if FedEx is present. if ($FEDEX_FOUND) { $supportHome=array('US'=>1,'CA'=>1); $supportGrnd=array('US'=>1,'CA'=>1,'PR'=>1); $ozip = $config["Company"]["location_zipcode"]; $dzip = $userinfo["s_zipcode"]; $s2res = ($supportHome[$userinfo["s_country"]] ? $params["param02"] : "false"); $ctyp = ($supportGrnd[$userinfo["s_country"]] ? $params["param00"] : "Express"); $isex = ($ctyp == "Express" ? true : false); $isgr = ((($ctyp == "Ground" || $ctyp == "Both") && $s2res != "true") ? true : false);

So because I am concerned with Mod_CPC (Canada Post) I need to add the province (state) data to the information sent by the shipping estimator.

I can either

1. Let the customer choose there province from a drop down (in addition to the postal code entry)
2. Have the postal code look-up in PHP for the correct province (state) info.

Canadian Postal Codes work like this

Letter-Number-Letter<space>Number-Letter-Number

ie.
R7N 2G6
A1N 9D9
N7X 4J0

The first character a letter dictates which province the postal code is for. List for lookup in PHP purposes.

Newfoundland/Labrador - "A"
Nova Scotia - "B"
Prince Edward Island - "C"
New Brunswick - "E"
Quebec - "G", "H", "J"
Ontario - "K", "L", "M", "N", "P"
Manitoba - "R"
Saskatchewan - "S"
Alberta - "T"
British Columbia - "V"
Northwest and Nunavut Territories - "X"
Yukon Territory - "Y"

I could use some help and would be happy to donate or something. I can guarantee that an ENTIRE nation of X-Cart users would be very excited and grateful to have this mod.
Reply With Quote
  #45  
Old 07-04-2004, 07:28 PM
 
joestern joestern is offline
 

Senior Member
  
Join Date: Apr 2004
Posts: 187
 

Default

I'd also be delighted to donate for the time it takes to tinker the code to work with FedEx lookup!
Reply With Quote
  #46  
Old 07-09-2004, 08:38 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Is this dead, because I only need a little help with the PHP to add a Canadian Postal Province (state) drop down and have it submit with the postal code.

It's worth some money to me if anyone is listening...
Reply With Quote
  #47  
Old 07-09-2004, 08:51 PM
 
rackit rackit is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 31
 

Default

which parts exactly do you need help with?
Reply With Quote
  #48  
Old 07-09-2004, 10:14 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

IN my second to last post (before this one)i chronicled how Canada Post needs one more piece of info over UPS. I need the state.

I think the easiest way is to use a drop down.

I am good at Smarty but lousy at PHP. I have no idea how to get started.
Reply With Quote
  #49  
Old 07-15-2004, 10:20 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

BUMP
Reply With Quote
  #50  
Old 07-21-2004, 11:08 PM
 
doersam@hotmail.com doersam@hotmail.com is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Snohomish, WA
Posts: 153
 

Default Can't get this modification to work in 3.5.10

I can't get the zip code calculation to show up in 3.5.10 Can anyone tell me exactly where in the cart_totals.tpl I should insert the code? Thank you very much.
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 09:53 PM.

   

 
X-Cart forums © 2001-2020