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
  #61  
Old 08-25-2004, 10:25 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

btw, try this and it should fix the issue for 3.5.8+: open up top.inc.php

find:

Code:
if (!in_array($__key, array("HTTP_GET_VARS","HTTP_POST_VARS","HTTP_SERVER_VARS","HTTP_ENV_VARS","HTTP_COOKIE_VARS","HTTP_POST_FILES","__key","__val")))
to:
Code:
if (!in_array($__key, array("HTTP_GET_VARS","HTTP_POST_VARS","HTTP_SERVER_VARS","HTTP_ENV_VARS","HTTP_COOKIE_VARS","HTTP_POST_FILES","__key","__val","_GET","_POST","_SERVER")))

I just noticed this mod uses _GET globals which was capped in 3.5.8+ for security reasons. Although it breaks quite a few mods. hth.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #62  
Old 08-25-2004, 04:15 PM
 
joestern joestern is offline
 

Senior Member
  
Join Date: Apr 2004
Posts: 185
 

Default

Thanks very much for the input. This did something, but it did not seem to do the trick. Before the change, we would input a zip code and the screen would refresh, but the shipping would not calculate. Instead, the "Enter your Zip code" input box would remain. Also, after we enter a zip code, the shipping drop down box disappears, and the follow shows up "To calculate shipping costs, please proceed to step one of checkout. anonymous."

Now, after Boomer's suggested change, X-cart seems to get the zip-code entry (because it gives the "To change your zip code click here" option), but it does not calculate shipping. Also, once you have entered a zip code, the "To change your zip code" option is dead--it does not actually work.

Our troubleshooting shows:
X-Cart IS getting the zip code (it is changing zipcode_estimate)
X-Cart IS setting "default country" to "Y"

Any thoughts?
Thanks!
__________________
X-Cart version 4.7.12
Reply With Quote
  #63  
Old 08-28-2004, 06:54 AM
 
adubas adubas is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 71
 

Default

Will this work with v4.0.3 ?
Reply With Quote
  #64  
Old 09-01-2004, 05:21 AM
 
inksticks inksticks is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 34
 

Default pre-login shipping calculator

I would really appreciate it if someone could post a pre-login shipping calculator mod for version 4.0.3. I would also like to request that their would be a country drop down menu in addition to the zip/postal code box so that international customers could also figure their shipping costs. Thank you for the assistance.
__________________
X-Cart 4.0.5
http://www.inksticks.com/
Reply With Quote
  #65  
Old 09-04-2004, 12:17 AM
 
jburdi jburdi is offline
 

Newbie
  
Join Date: Mar 2004
Posts: 5
 

Default

i dunno if anyone else is having this problem, but for some reason when I use this to calculate shipping, it adds NY state sales tax, no matter what zip I put in. the spot that says "Tax" still says n/a, but tax is figured into the order total. i dont want take to be figured out at all unless they are logged in.

i am using 3.5.6, any information would be helpful, thanks.
Reply With Quote
  #66  
Old 09-15-2004, 10:23 PM
 
nbsp nbsp is offline
 

Member
  
Join Date: Aug 2004
Posts: 12
 

Default

I feel this is a very important mod and would like to thank the contributors.

Can anyone confirm that this work with x-cart 4.0.3 and FedEx?

(I assume I am using Net::SSLeay since the Admin Summary states that one as active.)
__________________
-------------------------
X-Cart 4.0.18
AOM 4.0.18
Apache 1.3.37 (Unix) / PHP 4.4.4 / MySQL 4.1.21 / Site5.com
Reply With Quote
  #67  
Old 09-22-2004, 02:52 AM
 
inksticks inksticks is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 34
 

Default pre-login shipping calculator

I would really appreciate knowing if someone is having success developing a pre-login shipping calculator for version 4.0.4. I want it to work internationally which would require 2 fields: zip code and country. Zip code could not be limited to 5 digits or only numbers or it would not work for Canada. Please let me know what the possibilities are of getting this. Thanks!
__________________
X-Cart 4.0.5
http://www.inksticks.com/
Reply With Quote
  #68  
Old 09-22-2004, 05:46 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Zipcode would really only work with a live shipper like UPS or Fedex. I'm testing this mod on a 3.5.11 setup and using just a zipcode with zone shipping charges won't do anything because x-cart has to know the country and state in order to apply you to the proper zone.

I agree the zipcode mask should be greater than 5 for other country zip codes. But I think allowing the user to choose their country/state should give them the most accurate shipping quote.

I'll let you know what I find.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #69  
Old 09-23-2004, 10:36 AM
  BCSE's Avatar 
BCSE BCSE is offline
 

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

Default

I just installed this on a 4.0.4 version today. Here's the code I used:

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("extended_userinfo"); x_session_register("anonymous_checkout"); x_session_register("payment_cc_fields"); x_session_register("current_carrier");

Insert:
Code:
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"); }

Then in skin1/customer/main/cart_totals.tpl Before:
Code:
{if $not_logged_message eq "1"}{$lng.txt_order_total_msg}{/if}

Add:
Code:
{* BCSE Begin *} {if $login} {else} {if $estimate ne "NO"} Enter your zip code to calculate shipping charges. <input type=TEXT name='zip_estimate' size=5 maxlength=5> {include file="buttons/button.tpl" button_title="Calculate Shipping" href="javascript: document.cartform.submit()" js_to_href="Y"} {else} Click here to change your zip code {/if} {/if} {* BCSE End *}

Hope this helps! Thanks for the original code rackit!

Carrie
__________________
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
  #70  
Old 09-23-2004, 02:21 PM
 
inksticks inksticks is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 34
 

Default Thank you

Thank you for the post for 4.0.4 It works great! Any chance of modifying the code a little so that we could get a country field in there and so that international customers could use it. The zip code field would also have to be expanded to accept more that just 5 characters and would need to accept letters as well as numbers since some countries zip codes, like Canada for example, use alfa/numeric codes. I would really appreciate such a modification.
__________________
X-Cart 4.0.5
http://www.inksticks.com/
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 10:10 AM.

   

 
X-Cart forums © 2001-2020