![]() |
Anybody using pre shiipin mod on 4.1.0?
|
Code:
Ok, I think I'm missing something. I've got this working perfectly, except for the tax. I have my cart set to charge MA sales tax for orders in MA. This works fine on checkout, but with the pre-login shipping calculator, it includes the tax no matter which zip code is input. This is confusing to the user as it shouldn't be showing tax in the total if they're not using a MA zip code. Jeff, I had the same problem as you do. I just changed my default city, state and zip to anywhere outside of my state (NY), which has the sales tax. That should take care of the problem. -David |
I have implemented the mentioned code in all of the previous code and I tested it and it works great as far as I can see.
What I tested: * Product with defined shipping freight. * Flat tax rate (added extra code to set the default state to another state so tax rate isn't calculated as opposed to changing the default state in the X-Cart admin) * Combination of above. I have yet to test it with defined shipping methods but I have added the appropriate mentioned code to handle it. I was wondering what other cosiderations should I be aware of. Thanks to all the contributors of this great mod. EDIT: This seems like a good free PHP solution for ZIP to state conversion. I've seen another that used arrays rather than a bunch of cases. EDIT: Before I implement FEDEX into the system, I heard that it does not play nicely with this great mod, is this true? |
I made some modifications to the original code (minor ones). The modifications are there to make the site a bit more user-friendly.
In cart.php, change Code:
func_header_location("cart.php"); Code:
func_header_location("cart.php#[anchor name]"); Code:
<a name="[anchor name]></a> Now everytime the users make a submission it'll scroll back down to your anchor which makes making multiple changes a little better and it'll show what the user choose as the Zip Code so they can reference it in case they forgot or they made a typo. Also to ask the question again, does this work with Fedex (both import rates and using the mods). The changes are pretty general so it should apply to all versions but the filenames for the changes might be different. |
Quote:
Does anybody have this working yet for 4.1 or something that would do the same for 4.1? It would be very nice to have this. Thanks |
rackit, interesting mod.
i check out ur site. i like how u have the shipping discount, tax all pre loging. however ur tax is not calcualted for ur state. i type a few CA zips and it alwasy gives me n/a tax. I even typed in ur own zip code. |
skin1/images/calculate.gif should not be used if ur thinking about multiple languages.
|
booomer, i noticed you hard coded the text messages. any way to make this language compatible?
also, is there any way that when they put the zip code, a separate line showing the tax will show? |
is this pre login shipping calculations working on 4 0 18?
how do we make it calculat tax at the same time when they put the zip? thanks |
It works for v4.0.18 and it does tax calculation as well (with some minor modification)
|
4.1.X compatible?
|
Re: Pre-Login Shipping Calculator
To prevent taxes from being calculated until the user logs in, perform the following (This was done on a 3.5.x store):
Open include/func.php and FIND: Code:
function func_calculate_taxes($products, $customer_info, $shipping_cost, $provider="") { AFTER ADD: Code:
global $current_area; FIND: Code:
$return = array("tax_cost" => 0, AFTER PUT: Code:
// WebsiteCM - Don't Show Taxes in the customer area unless we have a customer login |
Re: Pre-Login Shipping Calculator
I have a slight problem. The code being provided in quotes in this topic, is showing up wrong in my browser. IE:
Click here to change your zip code: Just shows up as linked text, so if I just paste it into my template it is unlinked text, so my customers cannot click to change their zip. I am sure the source code is different than what I am seeing in the quote boxes. If I look at the source code on the forum it shows up as href and http://cart.php?zip_estimate=clear - obviously that is not correct, so some code added here is being changed by the forum. Can someone possibly email me the code for this line, including the link format? Or post it here with *'s to keep it from being converted to a link by the forum? I would appreciate it much! |
Thanks:
Great mod. Thanks to all who did such excellent work.
Here's what I used: <a href='https://www.*****.com/store/cart.php?zip_estimate=clear'>Click here to change your zip code</a> |
Re: Pre-Login Shipping Calculator
i couldnt get the "change zip code" thing to show up at all... it just isnt visible at all.
|
Re: Pre-Login Shipping Calculator
I am using USPS & I am using Real Time Calculations. I have 4 different usps methods available in my cart, but since adding this it ALWAYS reverts to Priority and does not allow the customer to choose any other method. Maybe it is not this mod and something in my cart. I am just not sure, but people are unhappy with the lack of ability to choose shipping. Anyone else had this problem?
|
Re: Pre-Login Shipping Calculator
Since I bought the WebsiteCM EZ Checkout for 4.1.3 I have not been able to get this to work at all. I ended up just completely removing it.
Has anyone got it to work with 4.1.3 EZ Checkout? |
Re: Pre-Login Shipping Calculator
Check out this shipping calculator we had made.
it is on any product, look for the shipping calculator button. www.budgetgolf.net |
Re: Pre-Login Shipping Calculator
jfaust97
Looks great. Are you offering the coding/instructions? |
Re: Pre-Login Shipping Calculator
Thanks,
We had this made from the guys at www.finestshops.com Ask for Anton. Very reasonable pricing. |
Re: Pre-Login Shipping Calculator
Quote:
Well, he didn't seem very reasonable to me...He said he would only provide this and other solutions if you go host with him. Too bad, the mod is well done. Anybody can offer a mod like that for 4.0.15 ? Thanks |
Re: Pre-Login Shipping Calculator
out of curiousity, for those running this mod on 4.0.x, is it only for UPS shipping methods or does it work for USPS and FedEx as well? maybe that's why it's not working for me. it show the tax but not the shipping quote.
|
Re: Pre-Login Shipping Calculator
I am using it soley for USPS, so I know it works for that.
|
Re: Pre-Login Shipping Calculator
this is great, thanks
The following works as is for 4.0.18: http://forum.x-cart.com/showpost.php?p=114053&postcount=157 I'm using UPS to Canada and US. |
Re: Pre-Login Shipping Calculator
IT WORKS!...for now
i must have missed it completely but you can't have fast lane checkout enabled to use this mod. if you disable fast lane checkout it, it should work perfectly in 4.1.x |
Re: Pre-Login Shipping Calculator
Does this work for 4.0.19 Pro? Are the instructions in post 157 complete? I am completely new to this & don't want to mess anything up! Thanks!
|
Re: Pre-Login Shipping Calculator
do a full backup of your site.
ftp and copy all files that need to be changed. this way, even if you mess up, you have the originals and can easily ftp them back to the server if it doesn't work. the instructions on page 8 work with 4.1.x so i assume it'd work with your version too. the only thing "wrong" with the code is that there is a link that should be code. i think it says "click here to change your zip code" and instead of seeing the code, you get the actual link. so you will need to get the source of the link. other than that, it's right. i'm not sure if fast lane checkout is a 4.1.x feature but if it's on 4.0.x, it has to be disabled for this mod to work. good luck |
Re: Pre-Login Shipping Calculator
i was wondering if someone could tell me how to get the shipping options to display as radio buttons rather than a drop down menu?
|
Re: Pre-Login Shipping Calculator
Wow. I'm surprised to see this thread is still active. I'm even more surprised after installing 4.1.x that there is still no pre-login shipping calculator. What gives!?
|
Re: Pre-Login Shipping Calculator
So there is no pre-checkout ship calc mod for 4.1.x running Fast Lane Checkout??
|
Re: Pre-Login Shipping Calculator
I am having trouble with the "Click here to change your zip code" link. All of the previous entries have been converted to links. I tried the text in post #174, but it is not working for me. Here is my cart.php text (sorry, I don't know how to insert it in the post):
# BCSE End //include "./nocookie_warning.php"; x_session_register("cart"); x_session_register("intershipper_rates"); x_session_register("intershipper_recalc"); x_session_unregister("secure_oid"); x_session_register("extended_userinfo"); x_session_register("anonymous_checkout"); x_session_register("payment_cc_fields"); x_session_register("current_carrier","UPS"); x_session_register("is_sns_action"); # 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#[anchor name]"); } 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 Post 174 says to make the link: <a href='https://www.*****.com/store/cart.php?zip_estimate=clear'>Click here to change your zip code</a> When I do this, I get a 404 error each time I try to change to zip code. Could someone give me VERY basic instructions on how to fix this? My cart.php file is located in my "public_html" directory. I tried changing "store" to "public_html" but I don't really understand what I'm doing & it didn't work. Thanks! |
Re: Pre-Login Shipping Calculator
Quote:
Try removing "public_html" from the URL, you just need to reference the link to "http://www.themommymarketplace.com/cart.php?$zipcode_estimate=clear" Also make sure you remove any spaces before or after the word "clear" |
Re: Pre-Login Shipping Calculator
I am using 4.0.18 and one post said the code in post #157 works for that but I can't get it to work. One of my problems is in cart.php I found 3 instances of this, $intershipper_recalc = "Y"; I assumed after the first one. I did try all 3 locations but with no joy.
The problem is after I inserted a zip code the box went away as did all my shipping options. I could not do anything after that change zip codes or shipping options. I would love to get this working but after 6 hours on a live site I uninstalled it for now until I can get some advice. Thanks, Mike |
Re: Pre-Login Shipping Calculator
Could anybody clue me in on how to get the zip code the customer entered to display after they enter it?
TIA |
Re: Pre-Login Shipping Calculator
this works for me
<a href='/storename/cart.php?zip_estimate=clear'>Click here to change your zip code</a> ({$userinfo.s_zipcode}) |
Re: Pre-Login Shipping Calculator
I have read through all the post in this thread and am a bit confused. I am running 4.1.7 and would like to add a shipping estimator.
Can somebody point me to a post or two that might work with 4.1.7? Thanks, Dean |
Re: Pre-Login Shipping Calculator
Quote:
Thank you! dem I believe I used: http://forum.x-cart.com/showpost.php?p=53755&postcount=74 make sure you change: HTML Code:
Click here to change your zip code to the proper <a href ...> tag. The forum upgrade seems to have messed them up. |
Re: Pre-Login Shipping Calculator
Hey BSCE,
I have X-Cart 4.0.19 I installed your modification but I found a little glitch in my site with it. Goto www.biodieselwarehouse.com then add some items to your cart. Then put in a test zip code....then click CHECKOUT....it will then ask you for all your personal info...but BEFORE entering it....click the Click to change your Zip Code link. It ends up making my layout all screwy. ANy suggestions? Thanks! -Mike Lannen -X-Cart Gold 4.0.19 -Linux -UPS Real Time Calculator Quote:
|
Re: Pre-Login Shipping Calculator
Quote:
Did I miss the answer for this? I, too, am running 4.1.7 and would like to have this option added. Thanks |
Re: Pre-Login Shipping Calculator
Thanks rackit for this awesome mod!! :)
|
All times are GMT -8. The time now is 12:17 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.