Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Shipping same as billing checkbox - Default unchecked Rate Topic   - - - - -

 
  • arlen
  • Senior Member
  • Members
  • Join Date: 25-Sep 06
  • 284 posts

Posted 08 November 2007 - 01:15 AM #1

I'm using the standard checkout (not one page). It appears that the "Shipping Address same as billing" checkbox is checked by default, so the shipping address fields are collapsed. I don't think it is intuitive to ask a customer to uncheck this box in order to display the additional fields, and want the default to be unchecked showing all, unless the customer actively checks the box.

I've been trying to figure it out but am stumped so far, hoping someone else has run across how to change this behavior.

I think the following code from the profile_fields.tpl file defines the checkbox and have been looking for the fn_show_tag function definition thinking it may hold the answer, but haven't tracked it down yet.

{if $shipping_flag}
<span style="padding: 15px 0px 6px 0px;">
		<input type="hidden" name="shipping_eq_billing" value="N" />
		<input class="valign" id="seqb" type="checkbox" name="shipping_eq_billing" value="Y" onclick="{if $profile_fields_equals == 'Y'}fn_show_tag('sa',this.checked);{/if} fn_copy_fields(this.checked);" {if $shipping_eq_billing == 'Y' || $mode == 'add'}checked="checked"{/if} />
		<label class="valign" for="seqb">{$lang.shipping_same_as_billing}</label>
</span>
{/if}

Any help would be greatly appreciated.

 
  • bholland
  • Senior Member
  • Members
  • Join Date: 16-May 06
  • 129 posts

Posted 08 November 2007 - 01:24 AM #2

checked="checked"


Remove the "checked". This is probably going to change the logic in that "if" statement, so you should take a look to make sure you don't end up with something backwards (or the check box label makes sense).
CS Cart 1.3.5 SP1

 
  • arlen
  • Senior Member
  • Members
  • Join Date: 25-Sep 06
  • 284 posts

Posted 08 November 2007 - 02:10 AM #3

That was my first thought, but it didn't seem to do anything. Could be I needed to clear the template cache after changing and neglected to ... I'll mess with that again, thanks.

<edit>
Yeah ... just checked, din't change anything on the surface anyway. (FYI, I left it as checked="" assuming that's right ... correct me if it's not). It makes sense though, it should be a simple checkbox status issue I'd think. I'll look further at the if statement ...
</edit>

 
  • bholland
  • Senior Member
  • Members
  • Join Date: 16-May 06
  • 129 posts

Posted 09 November 2007 - 06:49 AM #4

Hey arlen,

My general approach when dealing with CS front end design (that is always SO bloated) is to simply start tearing things out and see what happens. I would remove everything but the basic checkbox HTML markup and see what happens. Then add back in parts of that as necessary...

Not always the "smartest" way to work, but it gets the job done :)

B
CS Cart 1.3.5 SP1

 
  • arlen
  • Senior Member
  • Members
  • Join Date: 25-Sep 06
  • 284 posts

Posted 09 November 2007 - 12:40 PM #5

Thanks bholland, that's a good idea, isolate the problem. I know from experience that it's not all that hard to break things so being careful things still work as you strip stuff out would be important, but this is a good idea!

FYI ... finally decided I have enough issues that I haven't been able to figure out to make a Support Subscription worth doing so I signed up for a month yesterday. In all honesty, it paid for itself in one night (in terms of my lost time scratching my head) with the answers to my 1st round of 4 questions waiting in my communications area this morning. (Wait till they see my next 4 lol)

On this issue, here's what I learned:
"In order to do the "Shipping Address same as billing" checkbox unchecked showing all you need to replace the following part of code:

{include file="profiles_pages/profile_fields.tpl" user_data=$cart.user_data section="S" title=$lang.shipping_address place_to_box=false body_id="sa" shipping_flag=$profile_fields.B|@sizeof|default:false shipping_eq_billing=$cart.shipping_eq_billing|default:'Y'}
with this one:

{include file="profiles_pages/profile_fields.tpl" user_data=$cart.user_data section="S" title=$lang.shipping_address place_to_box=false body_id="sa" shipping_flag=$profile_fields.B|@sizeof|default:false shipping_eq_billing=$cart.shipping_eq_billing|default:'N'}
in the "/skins/[CUSTOMER_ACTIVE_SKIN]/customer/cart_pages/profiles.tpl" file."

i.e. change the default action at the end of the line from Y to N ... one of things I feel I should have noticed, but I'm still a rookie at this.

 

Posted 16 October 2008 - 02:14 PM #6

Just what I was looking for, should be default unchecked anyway.
Rigging.com V4.x.x - 100% API generated store | SEO & Google Fu Approved

 
  • CNutrition
  • Junior Member
  • Members
  • Join Date: 22-May 08
  • 21 posts

Posted 14 November 2008 - 08:21 PM #7

On this issue, here's what I learned:
"In order to do the "Shipping Address same as billing" checkbox unchecked showing all you need to replace the following part of code:

{include file="profiles_pages/profile_fields.tpl" user_data=$cart.user_data section="S" title=$lang.shipping_address place_to_box=false body_id="sa" shipping_flag=$profile_fields.B|@sizeof|default:false shipping_eq_billing=$cart.shipping_eq_billing|default:'Y'}
with this one:

{include file="profiles_pages/profile_fields.tpl" user_data=$cart.user_data section="S" title=$lang.shipping_address place_to_box=false body_id="sa" shipping_flag=$profile_fields.B|@sizeof|default:false shipping_eq_billing=$cart.shipping_eq_billing|default:'N'}
in the "/skins/[CUSTOMER_ACTIVE_SKIN]/customer/cart_pages/profiles.tpl" file."

i.e. change the default action at the end of the line from Y to N ... one of things I feel I should have noticed, but I'm still a rookie at this.


This is just the problem I'm looking to solve, but I can't find the part of the code you've referenced under profiles.tpl. Any thoughts?
Sincerely Steve Sliwa
President
Cognitive Nutrition, Inc
CS Cart Version 3

 
  • arlen
  • Senior Member
  • Members
  • Join Date: 25-Sep 06
  • 284 posts

Posted 15 November 2008 - 01:17 AM #8

It just so happens I just did this the other day on a fresh install of SP4. Apparently the code has changed since SP2. This is the line in the SP4 file.

{include file="profiles_pages/profile_fields.tpl" user_data=$udata section="S" title=$lang.shipping_address place_to_box=false body_id="sa" shipping_flag=$profile_fields.B|@sizeof|default:false shipping_eq_billing=$sh_eq_b|default:'Y'}


Just change the 'Y' at the end of the line to 'N'

If you have another version, it's the only line with
"profiles_pages/profile_fields.tpl" .... and .... "Section="S" " in it.
1.3.5 SP4, and stickin' with it till 2.x is finally stable

 
  • CNutrition
  • Junior Member
  • Members
  • Join Date: 22-May 08
  • 21 posts

Posted 18 November 2008 - 10:35 PM #9

It just so happens I just did this the other day on a fresh install of SP4. Apparently the code has changed since SP2. This is the line in the SP4 file.

{include file="profiles_pages/profile_fields.tpl" user_data=$udata section="S" title=$lang.shipping_address place_to_box=false body_id="sa" shipping_flag=$profile_fields.B|@sizeof|default:false shipping_eq_billing=$sh_eq_b|default:'Y'}


Just change the 'Y' at the end of the line to 'N'

If you have another version, it's the only line with
"profiles_pages/profile_fields.tpl" .... and .... "Section="S" " in it.


Thanks Arlen. I have located the line you're referring to, but the line seems to end before the "shipping_eq_billing=$sh_eq_b|default:'Y'}[/php]" part.

Here's how it looks;

{include file="profiles_pages/profile_fields.tpl" section="S" title=$lang.shipping_address body_id="sa" shipping_flag=$profile_fields.B|@sizeof|default:false}
{/capture}
Sincerely Steve Sliwa
President
Cognitive Nutrition, Inc
CS Cart Version 3

 
  • CNutrition
  • Junior Member
  • Members
  • Join Date: 22-May 08
  • 21 posts

Posted 12 January 2009 - 09:57 PM #10

Ok, making some progress, but still no results.

I found that I had been searching under

/skins/default_blue/customer/profiles_pages/profiles.tpl

rather than...

/skins/default_blue/customer/cart_pages/profiles.tpl

and I have predictably located the line in question and replaced the 'Y' with an 'N'.

Unfortunately, no result. Upon registering a new customer the option is still checked by default. Am I missing something perhaps?
Sincerely Steve Sliwa
President
Cognitive Nutrition, Inc
CS Cart Version 3

 
  • arlen
  • Senior Member
  • Members
  • Join Date: 25-Sep 06
  • 284 posts

Posted 13 January 2009 - 01:06 AM #11

Sorry I missed the eariler question, I don't really monitor the forum, just happened to be here tonight looking for something else.

To my knowledge, that's all I did and it's working for me.

Try clearing your template cache, I've found changes to checkout pages frequently require this to take effect. (it's an option in the administration section in your admin interface).
1.3.5 SP4, and stickin' with it till 2.x is finally stable

 
  • grabbags
  • Senior Member
  • Members
  • Join Date: 14-Aug 07
  • 360 posts

Posted 06 February 2009 - 12:56 AM #12

Thank you, I will check it out!

 
  • grabbags
  • Senior Member
  • Members
  • Join Date: 14-Aug 07
  • 360 posts

Posted 21 November 2009 - 12:19 AM #13

Hello! Does anyone know how to do "uncheck shipping address by default" in v2.0? Thank you!

 

Posted 26 April 2012 - 02:16 PM #14

i came across this post because I am trying to solve the issue about matching billing and shipping address...how do you guys work it out? One of my customers complains about fraudolent orders coming in and his payment gateway told him it is because of the cart.
I would not mind having customers only be able to ship products to the same address as their billing if that would stop the fraudolent orders from coming in, but how can I do that?
Is there any built in function with cs-cart or is it a custom mod that must be performed through the code?