X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Pre-Login Shipping Calculator (https://forum.x-cart.com/showthread.php?t=6927)

dem 06-25-2007 03:51 AM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by g0t0pless
Did I miss the answer for this? I, too, am running 4.1.7 and would like to have this option added.

Thanks


The process from post #197 above worked for me.

jeanne 06-28-2007 05:09 PM

Re: Pre-Login Shipping Calculator
 
I'm working on a 4.1.8 site using Fast Lane Checkout and user defined shipping rates. All my shipping rates and taxes are set by zipcode only. No states.

In cart.php right after
x_session_register("ga_track_commerce");

add this:
Code:

x_session_register("zipcode_estimate");
x_session_register("default_country_estimate");

 if($zip_estimate == "clear")
{
      $zipcode_estimate = "";
      func_header_location("cart.php");
}

if(!empty($zip_estimate))
{
      $zipcode_estimate = $zip_estimate;

      $default_country_estimate= $country_estimate;

    if($country_estimate == "US")
    {
        $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");

        if($count != 5)  //checking for 5 digits
          $zipcode_estimate = "";

    }
  if(($country_estimate == "CA" || $country_estimate == "GB") && strlen($zipcode_estimate)!=6)
      $zipcode_estimate= "";

      if($mode=="checkout")
        func_header_location("cart.php?mode=checkout");
      else
        func_header_location("cart.php");
}
if($zipcode_estimate != "")
{
  $config["General"]["default_country"] = $default_country_estimate;
      $config["General"]["apply_default_country"] = "Y";

      $config["General"]["default_zipcode"] = $zipcode_estimate;
      $config["General"]["default_state"] = "";


      $smarty->assign("estimate","NO");
}
$smarty->assign("zipcode_estimate",$zipcode_estimate);


In /skin1/modules/Fast_Lane_Checkout/cart_subtotal.tpl right after

{$cart.applied_giftcerts[gc].giftcert_id} <a href="cart.php?mode=unset_gc&gcid={$cart.applied_g iftcerts[gc].giftcert_id}"><img src="{$ImagesDir}/clear.gif" width="11" height="11" border="0" valign="top" alt="{$lng.lbl_unset_gc|escape}" /></a> : <font class="ProductPriceSmall">{include file="currency.tpl" value=$cart.applied_giftcerts[gc].giftcert_cost}</font><br />
{/section}
{/if}

add
Code:

{* BCSE Begin *}
{if $login}
{else}
  {if $estimate ne "NO"}
        <br>
        <BR>Zip Code:
      <input type=TEXT name='zip_estimate' size=6 maxlength=6>&nbsp;&nbsp;
                          <select name='country_estimate'>
        <option value="US">United States</option>
        <option value="CA">Canada</option>
                <option value="GB">United Kingdom</option>
        </select>&nbsp;&nbsp;
      {include file="buttons/button.tpl" button_title="Calculate Shipping" href="javascript: document.cartform.submit()"  js_to_href="Y"}
 <br>  {$lng.txt_order_total_msg}
      {else} <p>Current zip code: {$zipcode_estimate} <a href="cart.php?zip_estimate=clear">Click here to change your zip code</a>

    {/if}
    <BR><BR>
{/if}
{* BCSE End *}
{if $login ne "" || $config.General.apply_default_country eq "Y" || $cart.shipping_cost gt 0 || $estimate eq "NO"}
{foreach from=$shipping item=s}
<table cellpadding="1" cellspacing="0" width="50%"{cycle values=" class='TableSubHead', "}>
<tr>

        <td align="right"><label for="shippingid{$s.shippingid}">{$s.shipping|trademark:$insert_trademark}{if $s.shipping_time ne ""} - {$s.shipping_time}{/if}{if $config.Appearance.display_shipping_cost eq "Y" and ($login ne "" or $config.General.apply_default_country eq "Y" or $cart.shipping_cost gt 0)} ({include file="currency.tpl" value=$s.rate}){/if}</label></td>
</tr>
</table>
{/foreach}
<br /><br />
{/if}


It displays the costs for shipping but does not allow for a selection. I tried a bit but couldn't get it the selection to pass through to the rest of the checkout. Taxes show up also.

Jeanne
-------------
4.0.18 live store
4.1.8 in development

pig@pp 07-03-2007 01:16 PM

Re: Pre-Login Shipping Calculator
 
Looking for a way to prevent taxes from being calculated until the user logs in. Using x-cart 4.0.2

Kishy 07-06-2007 01:24 PM

One Modification?
 
That is an awesome add on! I tested it on your site and it works and looks great! One modification request: if you add an item that has free shipping then add another that does not, it still calculates them both as free shipping. Is there a way around this or how are you working this out?

thehoneyjarhomedotcom 07-16-2007 12:57 PM

Re: Pre-Login Shipping Calculator
 
Is this available for 4.1.8 yet? Anybody implemented it? Also does this only work with real time shipping rates or does it work with user defined rates as well?

Thanks.

DogByteMan 07-29-2007 06:29 PM

Re: Pre-Login Shipping Calculator
 
WARNING: I am not a programmer and I only tested this on my soon to be live 4.1.8 test store. But it is goooooood....

That Being said....

Pre-Login Shipping Calculator for X-Cart 4.1.8 With Fast Lane Checkout


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:

#SHIPPING CALCULATOR
x_session_register("zipcode_estimate");

if($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");

      if($count != 5){  //checking for 5 digits
          $zipcode_estimate = "";}
      if($mode=="checkout")
        func_header_location("cart.php?mode=checkout");
      else       
        func_header_location("cart.php");
}
if($zipcode_estimate != "")
{
      $config["General"]["apply_default_country"] = "Y";
      $config["General"]["default_zipcode"] = $zipcode_estimate;
      $smarty->assign("estimate","NO");
}

$intershipper_recalc = "Y";
#SHIPPING CALCULATOR


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=5 maxlength=5>&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}


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

DogByteMan 07-30-2007 12:56 PM

Re: Pre-Login Shipping Calculator
 
Well... I tested this 6 ways to Sunday and I can't find a problem... Anyone have any thoughts or have found a problem with my version?

DogByteMan 07-31-2007 11:12 AM

Re: Pre-Login Shipping Calculator
 
I went live with the 4.1.8 upgrade and everything seems to work fine with regards to the Pre-Login Shipping Calculator. One thing I wish i could figure out, is how to get the last selected shipping method in the calculator to carry over to the checkout page, if checkout is selected.

Any ideas???

DogByteMan 08-03-2007 06:22 AM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by DogByteMan
One thing I wish i could figure out, is how to get the last selected shipping method in the calculator to carry over to the checkout page, if checkout is selected.

Any ideas???


Anybody????

thehoneyjarhomedotcom 08-03-2007 06:30 AM

Re: Pre-Login Shipping Calculator
 
I don't have any ideas. I'm focussing on other things right now. Good luck.

pumpkins 08-03-2007 07:34 AM

Re: Pre-Login Shipping Calculator
 
Hey DogByteMan, I've tried your version of the code for 4.1.8, but are having some problem. Any zip code entered that are outside of California will give

"Sorry, there are no available shipping methods for your location.: anonymous"

Not sure if it is the code or something else I did, since I was setting up shipping all together for the first time yesterday. California is the only zone I listed in "destination zone" since I have a tax rule. But I tried creating a zone for Indiana and used a Indiana zip code to calculate shipping, unfortunately, the same "Sorry, there are no available shipping methods for your location.: anonymous". message.

I am using fedex Ship manager direct to get the shipping price.

Any ideas?

Qdox 08-03-2007 12:25 PM

Re: Pre-Login Shipping Calculator
 
It seems that you haven't populate the Rate table for the other states. If using Fedex goto options and click the import button.

Quote:

Originally Posted by pumpkins
"Sorry, there are no available shipping methods for your location.: anonymous"
I am using fedex Ship manager direct to get the shipping price.
Any ideas?


pumpkins 08-03-2007 12:41 PM

Re: Pre-Login Shipping Calculator
 
Under FedEx options there are two integration methods. 1)FedEx Rate Tools
and 2)FedEx Ship Manager Direct. The import rate data function is under 1)Fedex Rate Tools. If I use that option, I won't receive the "Sorry, there are no available shipping methods for your location.: anonymous" message. It is when I use 2)FedEX Ship Manager Direct that I will get the message whenever the zip code is outside of California.

Well, I guess as long as one of the intergration method works, I should be happy. So I am just going to be using FedEx Rate Tools for now.

DogByteMan 08-03-2007 04:31 PM

Re: Pre-Login Shipping Calculator
 
I'm using real time shipping (UPS) but it sure sounds like a rate table problem to me

balinor 08-06-2007 09:52 AM

Re: Pre-Login Shipping Calculator
 
It does not appear this mod works correctly (at all) with FedEx enabled. Turn off FedEx and rates appear fine. So...anyone successfully implement this with FedEx?

pumpkins 08-06-2007 10:35 AM

Re: Pre-Login Shipping Calculator
 
Balinor, When you say that it doesn't work with Fedex, what and when does the problem occur? I am using the code from post #206 by Dogbyteman with Fedex and it seems to work. The only thing is that I have to select FedEx Rate Tools instead of FedEx Ship Manager direct. Perhaps I haven't test it enough. You can try it out on our site www.dvrsecuritylab.com

The only tiny problem I can find with this mod right now is that it can only take 5 digit zip code, so you can't use it with any international orders (canada). Also with international orders, USPS express (EMS) quote is not showing up, but the problem with that is probabaly not related to this mod.

balinor 08-06-2007 10:37 AM

Re: Pre-Login Shipping Calculator
 
Sorry, I mean for Ship Manager Direct....the live rate feed is MUCH less cumbersome, as you don't have to update it regularly.

pumpkins 08-06-2007 10:55 AM

Re: Pre-Login Shipping Calculator
 
Then it is not working for me either.

DogByteMan 08-06-2007 11:04 AM

Re: Pre-Login Shipping Calculator
 
I'm having a hard time understanding.... Since basicly we're just transfering the code contents of cart.tpl to cart_subtotal.tpl... Then if all methods work in cart.tpl shouldn't they work in the post mod cart_subtotal.tpl as well?

balinor 08-06-2007 11:23 AM

Re: Pre-Login Shipping Calculator
 
You'd think that would be the case, but it is not :(

keystone 08-07-2007 10:02 AM

Re: Pre-Login Shipping Calculator
 
DogByteMan, what happens if someone with an odd zipcode wants to place an order? Does the pre-shipping calculator prevent countries without zipcodes from being able to order? or countries with odd zipcodes like Canada (letters) or Norway(only 4 digits)? I have user defined rates with no realtime set up. Just want to make sure before I implement it. Also, what is your website? I'd like to check out the calculator.

JTheed 08-07-2007 05:18 PM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by keystone
DogByteMan, what happens if someone with an odd zipcode wants to place an order? Does the pre-shipping calculator prevent countries without zipcodes from being able to order? or countries with odd zipcodes like Canada (letters) or Norway(only 4 digits)? I have user defined rates with no realtime set up. Just want to make sure before I implement it. Also, what is your website? I'd like to check out the calculator.


The Pre-Login calculator only runs if the customer chooses to run it, so no, it wouldn't prevent someone without a zipcode from purchasing.

keystone 08-08-2007 07:15 AM

Re: Pre-Login Shipping Calculator
 
Just implemented the pre-shipping calculator from step #206...works like a champ. Hopefully this will help with fewer abandoned carts.

mltriebe 08-17-2007 04:05 AM

Re: Pre-Login Shipping Calculator
 
Works great, this is a must for everyone.

Thanks, DogByteMan

Mike

balinor 08-17-2007 04:06 AM

Re: Pre-Login Shipping Calculator
 
If someone could figure out the calculation issue with real-time FedEx it would be perfect ;)

DogByteMan 08-17-2007 05:59 AM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by balinor
If someone could figure out the calculation issue with real-time FedEx it would be perfect ;)


I would be curious to know if real-time FedEx works in the standard checkout mode, since the code is the same for the mod...

This still baffles me

balinor 08-17-2007 06:00 AM

Re: Pre-Login Shipping Calculator
 
Works fine. I get the rates showing up in the checkout area, just not using the calculator.

DogByteMan 08-17-2007 06:09 AM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by balinor
Works fine. I get the rates showing up in the checkout area, just not using the calculator.


I'm speaking regular checkout, completely outside of FastLane Checkout, since the code in cart_totals.tpl is used for the actual checkout routine there. If it works there it should work on the modded cart_subtotal.tpl. I feel very strongly this is a simple fix... I'm just not a coder.

Someone should fix this for Balinor.... He would do the same, when he can.

balinor 08-17-2007 06:33 AM

Re: Pre-Login Shipping Calculator
 
I don't use FastLane, so that isn't the issue either :(

photo 08-17-2007 06:53 AM

Re: Pre-Login Shipping Calculator
 
Are you guys aware of the BCSE Free X-cart Shipping Estimator for Fastlane Checkout

Thank you Carrie for this free mod.

balinor 08-17-2007 07:32 AM

Re: Pre-Login Shipping Calculator
 
Hadn't seen that one..will try it right now :)

DogByteMan 08-17-2007 08:35 AM

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.

dire_lobo 08-17-2007 11:17 AM

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!

DogByteMan 08-17-2007 12:07 PM

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

dire_lobo 08-17-2007 12:33 PM

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!

BCSE 08-17-2007 12:43 PM

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! :D

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

Jayk 08-17-2007 12:54 PM

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! :D

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

dire_lobo 08-17-2007 01:13 PM

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! :D

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 ;-)

DogByteMan 08-18-2007 02:38 PM

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

mosaic-andy 09-24-2007 03:45 AM

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


All times are GMT -8. The time now is 07:27 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.