![]() |
Quote:
Yes that is the same problem. If 'display cart/order totals including tax' but in the way I 'think' Jeanne has it. This way actually shows tax calculation on each value in the cart. e.g. with the box checked Subtotal: $10.31 Discount: $0.95 Discounted subtotal: $9.28 Shipping: $5.38 TOTAL: $14.65 Including: Sales Tax: $1.16 e.g. without the box checked Subtotal: $9.49 Discount: $0.95 Discounted subtotal: $8.54 Shipping: $4.95 Sales Tax 8.625%: n/a TOTAL: $14.65 e.g. when customer is logged in (the way I want it) Subtotal: $9.49 Discount: $0.95 Discounted subtotal: $8.54 Shipping: $4.95 Sales Tax 8.625%: $1.16 TOTAL: $14.65 Certainly will post if I come up with the solution. Jeanne am I correct in assuming what I did about your taxes calculation? |
If the tax zone is looking for cities then the only way that you will get taxes to show with the zip code estimate is to either build a routine in cart.php that will translate the zip to a city or set up your tax zone by zip code.
if($zipcode_estimate >= 10001 && $zipcode_estimate <= 10002){ $config["General"]["default_city"] = "A City"; }elseif($zipcode_estimate >= 10003 && $zipcode_estimate <= 10004){ $config["General"]["default_city"] = "Another City"; } (I don't know what the correct zip codes would be.) I think that it would be easier to set up your tax zone up by zip code though so if you needed to change any zip codes you would not have to dig through the code. |
Sorry I didn't see that part about having that box unchecked before.
That is the way that I have it on my site (The "Display cart/order totals including tax" is unchecked). It looks like this when someone enters a zip code (not logged in) that is from California. Subtotal: $32.95 Shipping: $2.00 California State Tax 7.25%: $2.39 TOTAL: $37.34 |
OK Duh, I obviously don't keep close enough track on what I change in my files. Go to main/customer/cart_totals.tpl
Instead of Code:
{if $cart.taxes and $config.Taxes.display_taxed_order_totals ne "Y"} Code:
{if $cart.taxes and $config.Taxes.display_taxed_order_totals ne "Y"} That should get the tax to show up instead of n/a |
THANK YOU JEANNE! That fixed it. You are a star!
|
=D> ALL HAIL JEANNE =D> Thank you . Also special thanks to Rackit and all others who. But right now Jeanne you are the :-#
|
Got it working on 4.0.13. The problem I was having was with the taxes, but Jeanne's cart_totals.tpl tweak fixed my issue.
Thanks, Jason |
I use xcart 4.0.13
and modify cart.php and cart_totals.tpl as follow 1- cart.php after Code:
x_session_register("cart"); Addition: Code:
x_session_register("shipping_country_name"); 2-cart_totals.tpl Addition: Code:
{if $estimate ne "NO"} I setup zones manually and all shipping price depending on country only If I choose the country form Drop-Down list I have no change (the shipping price stile 0$) for check on cart.php I use this url Code:
http://www.sanaabel.com/estore/cart.php?shipping_country=US I found it works good with no error (correct value of shipping price) I down't know what I do? I think I need to modify in cart_totals.tpl . |
Has anyone come up with a solution to this one:
Quote:
This happens when using the Canada Post Sell Online Shipping Module and entering a US zip code. I am wondering if Canada Post requires a State as well? Thanks, Jason |
update mod
Here we are over a year old on this mod. Over 9 pages to read thru and try to figure out what was good is not good now and need to change that to this to make it work now. Can someone post the most current code for 4.0.14. This way we can start from there to keep this mod alive.
Thank you |
I don't have time to go through all the pages, but if someone can e-mail me the code, I'll put it in the first post.
|
Quote:
It's on its way to you. Thanks, Jason |
What is the code needed to change if wanting to get this installed on 4.0.9?
|
This is the current code I am using, pulled together from the 9 pages of this post. I have used it on 4.0.12 through 4.0.14 and I assume it should work on 4.0.9.
In cart.php After: Code:
x_session_register("cart"); Insert: Code:
# BCSE Then in skin1/customer/main/cart_totals.tpl Before: Code:
{if $not_logged_message eq "1"}{$lng.txt_order_total_msg}{/if} Insert: Code:
{* BCSE Begin *} Go to main/customer/cart_totals.tpl Instead of Code:
{if $cart.taxes and $config.Taxes.display_taxed_order_totals ne "Y"} Code:
{if $cart.taxes and $config.Taxes.display_taxed_order_totals ne "Y"} That should get the tax to show up instead of n/a. The only other thing that seems to be needed is as addition of US states for the Sell Online Canada Post Shipping Module to work properly. Cheers, Jason |
On this modification, how do we make it so that the default shipping method used is ground?
Also, we get this error on the page before entering a zipcode: UPS Realtime shipping rate calculation service returned the following error: The requested service is unavailable between the selected locations. (errorcode: 111210) Sorry, there are no available shipping methods for your location.: It sounds like this error is caused because it hasn't yet received the zipcode yet. Is it possible to make it so it doesn't show this error? Thank you. |
bump
|
How to we prevent this error
Quote:
from appearing before a zipcode is inputed by the user the first time? |
sbtiti,
Go to your general settings and make sure "When a customer isn't logged in, it is presumed that he is from the default country.:" is unchecked. That should keep you from gettin the error. T.J. |
For this module to work properly with other defined shipping methods I had to make one small change. This is the fix to the problem I was having in my May 31, 2005 post where the "Select a Carrier" drop down box was disappearing after I selected "Other Carriers":
Go to skin1/customer/main/cart_totals.tpl Find: Code:
{* $Id: cart_totals.tpl,v 1.67.2.10 2005/03/14 13:03:32 mclap Exp $ *} Change To: Code:
{* $Id: cart_totals.tpl,v 1.67.2.10 2005/03/14 13:03:32 mclap Exp $ *} |
Thank you. That fixed the problems we were having, but I found another problem. In the "Select a carrier" there are only the options for UPS and "Other carriers". But in the adminCP we have fedex options enabled under shipping methods. Why and/or how do I get it so that the FedEx option appears as well?
Is there a field I need to fill in somewhere in the adminCP? Any help would be appreciated. Thank you! |
How do we get this mod to work with fedex? I followed the instructions in the "Step by Step setup of FedEx" thread ( http://forum.x-cart.com/viewtopic.php?t=21128&highlight= ) and now we get this error:
UPS Realtime shipping rate calculation service returned the following error: The requested service is unavailable between the selected locations. (errorcode: 111210) Sorry, there are no available shipping methods for your location.: before a zipcode is inserted. Any ideas? |
Newbie here!
I used the MOD on page 5. Every thing works perfectly. However, when one types in their shipping zip code, it gives you the actual cost of shipping not the shipping with markup. For example: USPS Priority for a 1lb item cost $3.85. The customer sees on the pre-login shipping calculator $3.85 instead of the $4.85 which includes markup. Anyone have a solution or knows what files to manipulate so that it will show shipping with markup? Help appreciated. Thanks! |
Quote:
By any chance are you using Intershipper? If so, they have a markup section where you can do this. If not, I too would be interested in seeing this... |
Tried this but got an error
Hi Rackit --
I tried your code on my version (4.0.5) but I got an error ("missing T-STRING on line 57") That line is: $zipcode_estimate = ""; I also noticed that the block of code you replace doesn't match mine exactly. I have this for the block: 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"); Any suggestions as to what I should be looking for? Thanks, John |
Dear RackIt,
I really liked your change so I tried to implement it. But when I press the calculate button nothing happens. It looks like there is a link missing. Can you tell me what it should be? Many Thanks in advance. NOTE: Never mind. I asked the question before I realized there were 10 pages of posts. :oops: The post by Carrie works great! Thanks anyway. :D |
Has anyone modified this mod to include tax calculation? Either based on states or zipcode?
Whle the latter would be more work, it would keep the interface for this mod nice and clean (instead of requiring a states drop down plus the zip input field). Also, I was wondering if we'll encounted problems with zip+4, or does X-Cart already handle the +4 part? I'd like to thank the OP and contributors in this thread for their hard work in producing a nice little S&H calculator. Kudos. Thanks, Brian |
Pomfret, you can find instructions on how to calculate tax based on zipcode on page 6 of this thread. I'm not sure about the zip+4 issue but I don't think the +4 will make a difference when it comes to shipping or tax calculations.
|
Quote:
Wow, I can't believe I missed that. Thanks for the note! Brian |
Has anyone been able to add this to the right side box that displays the # of items in your cart? I would like something that has an input box that lets you enter your zip code, and display the shipping rates. It seems like this mod only works while you are actually on the shopping cart page, correct?
|
Quote:
I pasted in this mod, but couldn't get it to work right away. BCS Engineering came to my rescue and got it working. The box on the right that you are referring to, I believe is known as the "mini-cart." On mine, with the mod working now, the mini-cart does show the total including shipping, but only if you have already gone to the shopping cart and entered your ZIP code. My mini-cart does not show the breakdown of product vs shipping, just a grand total. And you do have to go to the actual cart page to enter the ZIP code. |
It doesn't help much if the user can't easily find out what the shipping is for the items in their cart. One day... someone will create/sell the mod.
|
It is VERY easy! And it's working now!
I highly recommend this mod. |
I've got this mod to work in 4.0.16 for fedex rates - but once a customer adds a zip code and calculates the shipping the option to change that entry doesn't appear.
It should be displaying "Click here to change your zip code" Anyone have any ideas? Heres what my code looks like Code:
{if $not_logged_message eq "1"} |
I figured out what the problem was with my previous post. Works now thats to BCS Engineerings Mod.
Nwo I'm trying to remove the default shipping message "Sorry, there are no available shipping methods for your location.: anonymous" Does anyone have any idea on how hide this message - I assume its tied to the login querry in cart.php And that if someone enters a zip which fedex doesn't ship to - they'll get a similar message So I can't just delete the function Any thought/ideas would be great |
Does this mod work for version 4.0.17?
|
Tax
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.
Any ideas. I'm in version 4.0.17 by the way. Thanks, jeff |
Shipping Estimator for US and Canada
I've modified the original code to take Canada into consideration and allow both US and CA zipcodes to be utilized.
Edit Cart.php locate: Code:
$intershipper_recalc = "Y"; BEFORE this add: Code:
# prelogin calculator start Now onto the .tpl, edit skin1/customer/main/cart_totals.tpl and locate: Code:
<input type=hidden name=paymentid value="{$smarty.get.paymentid|escape:"html"}"> BEFORE this line add: Code:
{* Shipping Estimate *} :!: Note the original commented code that will need to be replaced as well: Code:
{*{if $not_logged_message eq "1"}{$lng.txt_order_total_msg}{/if}*} Anyhow, I figured I would contribute this extension to an already much needed mod X-Cart should have by default if you ask me :) |
Some people have asked about this and no one has responded. Does anyone know of way to let the customer calculate the shipping cost for an item BEFORE adding it to the cart? Like maybe adding this to the product description page? This seems much more logical than making the customer add the product to the cart and THEN seeing how much the shipping is.
|
Best method I could think of is to utilize this same code but rather make a seperate form on product pages that submits to a custom PHP page where you can easily add it to the customers cart, get the calculation, display it to the user and remove the item from the customers cart.
Basically adding and removing the product to the customers cart would be transparent as to get all the needed $cart variables to perform the estimation. Problem with this is if a customer already has something in their cart, the calculation would be for both items instead of one. |
Advanced Order Management
Has anyone figured out how to get this to wok in AOM? If you attempt to modify an order, it throws an error:
Invalid argument supplied for foreach() in /xxx/shipping/mod_UPS.php on line 275 I'm assuming that the problem is due to the fact that the products aren't "in the cart" anymore, but rather in an orders table. The section of code that causes the error is: Code:
EOT; |
All times are GMT -8. The time now is 09:40 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.