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
  #231  
Old 08-17-2007, 07:32 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Pre-Login Shipping Calculator

Hadn't seen that one..will try it right now
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #232  
Old 08-17-2007, 08:35 AM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default Re: Pre-Login Shipping Calculator

Quote:
Originally Posted by balinor
Hadn't seen that one..will try it right now

It was taken straight off of here.... She bills it as relieving you the burden of filtering through this thread.
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #233  
Old 08-17-2007, 11:17 AM
  dire_lobo's Avatar 
dire_lobo dire_lobo is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 53
 

Thumbs up Re: Pre-Login Shipping Calculator

Quote:
Originally Posted by DogByteMan
It was taken straight off of here.... She bills it as relieving you the burden of filtering through this thread.

She/they don't seem to be misrepresenting that fact. And it IS a loong thread. And you can't really blame her/them for using it to generate traffic to their site. You know those internet entrepreneurs are always lookin' for an edge.

However, IMHO, it would be nice if the description gave you more specific credit instead of just referring to the thread. It looks to be a SOLID build, easy to implement, and well crafted mod that really adds value to X-Cart. Your contribution is very much appreciated. You done good. And thank you!
__________________
4.1.8 live
shared server/hosted linux
Physical Location: New Mexico, USA
Server Location: Arizona, USA
Reply With Quote
  #234  
Old 08-17-2007, 12:07 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default Re: Pre-Login Shipping Calculator

Quote:
Originally Posted by dire_lobo
She/they don't seem to be misrepresenting that fact. And it IS a loong thread. And you can't really blame her/them for using it to generate traffic to their site. You know those internet entrepreneurs are always lookin' for an edge.

However, IMHO, it would be nice if the description gave you more specific credit instead of just referring to the thread. It looks to be a SOLID build, easy to implement, and well crafted mod that really adds value to X-Cart. Your contribution is very much appreciated. You done good. And thank you!

You take me wrong... I don't think there is a problem with it, nor do I need credit... I wrote nothing. I just meant Balinor was unlikely to find the answer, since it came from here.... hey Carrie and BCSE are great.... Don't have a bad word to say about them
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #235  
Old 08-17-2007, 12:33 PM
  dire_lobo's Avatar 
dire_lobo dire_lobo is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 53
 

Default Re: Pre-Login Shipping Calculator

Quote:
Originally Posted by DogByteMan
You take me wrong... I don't think there is a problem with it, nor do I need credit... I wrote nothing. I just meant Balinor was unlikely to find the answer, since it came from here.... hey Carrie and BCSE are great.... Don't have a bad word to say about them

Doh! I didn't mean to imply that you did have a problem - sorry it came across that way. Please accept my humble apologies. Of course I then gave you credit for initially writing it.. what can I say - it's a long thread Those "props" should rightly have gone to those who did. I do want thank you for the code in post 206. Thank you!
__________________
4.1.8 live
shared server/hosted linux
Physical Location: New Mexico, USA
Server Location: Arizona, USA
Reply With Quote
  #236  
Old 08-17-2007, 12:43 PM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,091
 

Default Re: Pre-Login Shipping Calculator

Yes we built that for ease of use. We install it for our clients many times and always have trouble finding the "right" post to refer to. Takes us more time to figure out what code to use than to install it!

So we built that to make it easy for everyone including us. If we forgot to acknowledge anyone PLEASE let me know!

Thanks!

Carrie

P.S. We will be working to make it FedEx compatible in the upcoming weeks
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #237  
Old 08-17-2007, 12:54 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: Pre-Login Shipping Calculator

Quote:
Originally Posted by BCSE
Yes we built that for ease of use. We install it for our clients many times and always have trouble finding the "right" post to refer to. Takes us more time to figure out what code to use than to install it!

So we built that to make it easy for everyone including us. If we forgot to acknowledge anyone PLEASE let me know!

Thanks!

Carrie

P.S. We will be working to make it FedEx compatible in the upcoming weeks

Hi Carrie,

Does your consolidation of this thread handle Canadian postal codes and Canada Post shipping? I remember you had done a tweak somewhere in this thread to handle the 6 digit Canadian postal codes. Also, I'm not sure if the Canada Post module requires a province or state as well. I haven't used this mod since 4.0.12 and I'm really considering giving it another shot on 4.1.8.

Thanks,
Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
  #238  
Old 08-17-2007, 01:13 PM
  dire_lobo's Avatar 
dire_lobo dire_lobo is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 53
 

Default Re: Pre-Login Shipping Calculator

Quote:
Originally Posted by BCSE
Yes we built that for ease of use. We install it for our clients many times and always have trouble finding the "right" post to refer to. Takes us more time to figure out what code to use than to install it!

So we built that to make it easy for everyone including us. If we forgot to acknowledge anyone PLEASE let me know!

Thanks!

Carrie

P.S. We will be working to make it FedEx compatible in the upcoming weeks

Based on my reading of your readme for it, it looks like you did some work to it too! Thanks!
See, I'm getting smarter - I actually read manuals and readme's and stuff and follow directions... mostly
__________________
4.1.8 live
shared server/hosted linux
Physical Location: New Mexico, USA
Server Location: Arizona, USA
Reply With Quote
  #239  
Old 08-18-2007, 02:38 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default Re: Pre-Login Shipping Calculator

Canadian Instructions for Jayk

This allows for the 6 character Canadian Postal Codes in format (xxxxxx).

This also enables shipping from US to Canada in X-Cart.

Note: I only have UPS Standard to Canada enabled with this, although you should be able to apply the same technique for all Canadian methods....

Once again, this is for 4.1.8 using fast lane checkout.

HERE WE GO!


In cart.php After:

Code:
x_session_register("cart"); x_session_register("intershipper_rates"); x_session_register("intershipper_recalc"); x_session_unregister("secure_oid"); x_session_register("anonymous_checkout"); x_session_register("payment_cc_fields"); x_session_register("current_carrier","UPS");

Insert:

Code:
# prelogin calculator start # modified by cart-lab.com to allow US and CA zipcodes x_session_register("zipcode_estimate"); $trusted_post_variables = array("zip_estimate"); require $xcart_dir."/include/states.php"; if($HTTP_GET_VARS['zip_estimate'] == "clear"){ $zipcode_estimate = ""; func_header_location("cart.php"); } if(!empty($zip_estimate)){ $zipcode_estimate = $zip_estimate; #$count = substr_count($zipcode_estimate,"0") + substr_count($zipcode_estimate,"1") + substr_count($zipcode_estimate,"2") + substr_count($zipcode_estimate,"3") + substr_count($zipcode_estimate,"4") + substr_count($zipcode_estimate,"5") + substr_count($zipcode_estimate,"6") + substr_count($zipcode_estimate,"7") + substr_count($zipcode_estimate,"8") + substr_count($zipcode_estimate,"9"); $count = strlen($zipcode_estimate); if($count < 4){ //checking for 5 digits $zipcode_estimate = "";} func_header_location("cart.php"); } if($zipcode_estimate != ""){ $count = strlen($zipcode_estimate); if($count == 5) { $config["General"]["apply_default_country"] = "Y"; $config["General"]["default_zipcode"] = $zipcode_estimate; $userinfo["s_zipcode"] = $zipcode_estimate; $smarty->assign("estimate","NO"); } else { $config["General"]["apply_default_country"] = "Y"; $config["General"]["default_country"] = "CA"; $config["General"]["default_zipcode"] = $zipcode_estimate; $userinfo["s_country"] = "CA"; $userinfo["s_zipcode"] = $zipcode_estimate; $smarty->assign("estimate","NO"); } } # prelogin calculator end

Copy the entire contents of skin1/customer/main/cart_totals.tpl

Highlight the entire contents of skin1/modules/Fast_Lane_Checkout/cart_subtotal.tpl and paste the contents of cart_totals.tpl over it.

(The contents of cart_subtotal.tpl is merely a stripped out version of cart_totals.tpl taking out the very thing we all want)


Now in the newly completely changed skin1/modules/Fast_Lane_Checkout/cart_subtotal.tpl place:

Code:
{* BCSE Begin *} {if $login} {else} {if $estimate ne "NO"} <br><b>Enter your zip code below to calculate shipping charges.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b><p><b>Enter Zip Code&nbsp;</b> <input type=TEXT name='zip_estimate' size=6 maxlength=6>&nbsp;&nbsp; {include file="buttons/button.tpl" button_title="Click Here To Calculate Shipping" href="javascript: document.cartform.submit()" js_to_href="Y"}&nbsp; {else} <p><a href="cart.php?zip_estimate=clear">Click here to change your zip code</a> ({$userinfo.s_zipcode}) {/if} <BR><BR> {/if} {* BCSE End *}

Just before:

Code:
{if $not_logged_message eq "1"} {$lng.txt_order_total_msg}{/if}

In modules/UPS_OnLine_Tools/config.php
On line 83 change:
Code:
"11" => array("US" => 14, "EU" => 14, "CA" => 14, "PL" => 14),
To:
Code:
"11" => array("US" => 11, "EU" => 14, "CA" => 14, "PL" => 14),

In shipping mod_UPS.php
Starting at line 519

Find Code:
Code:
if ($sv["service_code"] == $ups_services[$mod_UPS_service][$origin_code]) { if ($sv["service_code"] == "14" && $origin_code == "US" && $dest_code == "CA") $subcode = 110; // UPS Standard to Canada

Replace with code:
Code:
if ($sv["service_code"] == $ups_services[$mod_UPS_service][$origin_code]) { if ($sv["service_code"] == "11" && $origin_code == "US" && $dest_code == "CA") $subcode = 110; // UPS Standard to Canada

Using phpMyAdmin:

Open your X-Cart database
Open xcart_shipping
Click Browse
Find shipping ID 110
Click the pencil to edit
Change service_code from 100 to 11

Finally, in languages, make a label "lbl_calc_title". It should say something like this "Order - Shipping Calculator"

In skin1/modules/Fast_Lane_Checkout/cart_subtotal.tpl find all occurences (3) of {$lng.lbl_delivery} and replace them with {$lng.lbl_calc_title}

If customer is logged in, Taxes will show on the cart/calculator page and this mod appears to not affect the checkout process at all.

YOUR DONE!!!!
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #240  
Old 09-24-2007, 03:45 AM
 
mosaic-andy mosaic-andy is offline
 

Newbie
  
Join Date: Feb 2006
Posts: 3
 

Default Re: Pre-Login Shipping Calculator

Can anyone tell me if this works on 4.1.3 Pro??? I have tried everything I can think of and I can not get it to work. If you put in a zip code outsite the default state, I get the "there is no shipping options" message.

Works fine if you put in any zip code within the default state. Can anyone suggest anything???
__________________
--
Andrew Loscher
Mosaic Networks, running x-cart Pro 4.0.17; Apache; PHP 4.4.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:07 AM.

   

 
X-Cart forums © 2001-2020