Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Hide Shipping Until Address is filled in

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 10-23-2004, 12:40 PM
 
Ripbud Ripbud is offline
 

Member
  
Join Date: Oct 2004
Posts: 17
 

Default Hide Shipping Until Address is filled in

Sorry,
To create a new post in this mess - but I can't locate an answer.

Running 4.05 Gold

Problem:

-Customer browses for product adds 2 of Miss Piggy's Ham Cream

-Customer clicks check out and is show that the (2) Ham Cream's come out to 12.95 + shipping of 5.00 dollars.

-Customer fills in address / creates account and clicks enter

-Customer now sees the Ham Cream shipping is 20.00 bucks because they live on the east coast.

How can I stop the intial shipping charge from being show until I have a shipping address?

Thanks!

Ripbud
__________________
4.13
Reply With Quote
  #2  
Old 10-24-2004, 10:48 AM
 
Ripbud Ripbud is offline
 

Member
  
Join Date: Oct 2004
Posts: 17
 

Default Bump

Bump
Hey! You all answered the questions that were above mine but no response to mine...er yeah... How about some help here?!
__________________
4.13
Reply With Quote
  #3  
Old 10-26-2004, 09:28 PM
 
Ripbud Ripbud is offline
 

Member
  
Join Date: Oct 2004
Posts: 17
 

Default BUMP

BUMP

Really even "Hey Jerk you're posting in the wrong section!"

Would be helpful...
-Ripbud
__________________
4.13
Reply With Quote
  #4  
Old 10-27-2004, 04:17 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

post was ok but moved to wish list anyway
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 10-27-2004, 06:54 AM
 
TonyD TonyD is offline
 

eXpert
  
Join Date: Mar 2004
Location: Okc
Posts: 288
 

Default

Rip, i use a rather simple work around to solve this problem temporarily(in 95% of my cases)

i set a default zip of some small town in idaho(that isnt close to a major city) and set my stores to presume that the shopper is from the default location....thus when shipping is show to the customer if it is off, it will almost always be high..

ie: Jane shown a shipping charge of $13.48 (software assumes she's in idaho and it's shipping from Oklahoma)

Jane enters her address and sh'e actually in Texas...her shipping just dropped to $8.38 ....

in this solution she's happy and i'm happy cause i didnt lose a customer because her shipping jumped way up.....

i am working on a solution for this...but this workaround should work till i complete the fix...

~TonyD
__________________
X-Cart v 4.7.8(live)
Reply With Quote
  #6  
Old 10-27-2004, 08:28 AM
 
TonyD TonyD is offline
 

eXpert
  
Join Date: Mar 2004
Location: Okc
Posts: 288
 

Default

actually, rackit and Carrie have already completed the fix i was working on doing.... does not show shipping till the customer enters his/her zipcode......

Quote:
Originally Posted by BCSE
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
__________________
X-Cart v 4.7.8(live)
Reply With Quote
  #7  
Old 10-27-2004, 11:06 PM
 
Ripbud Ripbud is offline
 

Member
  
Join Date: Oct 2004
Posts: 17
 

Default Thanks for the responses!

Thanks for all the responses.
__________________
4.13
Reply With Quote
  #8  
Old 10-27-2004, 11:07 PM
 
Ripbud Ripbud is offline
 

Member
  
Join Date: Oct 2004
Posts: 17
 

Default Thanks for the responses!

Thanks for all the responses.

I also received a response from Maxim Sokolov - as follows:

To resolve this issue you need to find cart.php and replace the following line:

Code:
if ($need_shipping) {
with the following line:

Code:
if ($need_shipping and $login) {


This one seemed a lot easier to implement and appears to be doing what I want - I just changed the message to warn that shipping will not be shown until the person logs in / fills out there shipping/billing information - I haven't tested it fully yet.


By the way... Wish list??? Maybe template editing would be a better spot??
Anyway, again thanks for the responses. Nice to meet you all - I think you'll be seeing more of me since I'm customizing X-cart for my needs.
-Ripbud
__________________
4.13
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 06:31 AM.

   

 
X-Cart forums © 2001-2020