- Posts: 628
- Thank you received: 18
Same address for shipping unchecked by default
5 years 10 months ago #326442
by patoushka
Same address for shipping unchecked by default was created by patoushka
Hi is it possible to let the checkbox empty for the option "Same address for shipping" in the checkout?
If it's possible, ho do we achieve that?
Thanks !
If it's possible, ho do we achieve that?
Thanks !
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326458
by nicolas
Replied by nicolas on topic Same address for shipping unchecked by default
Hi,
Edit the file show_block_address.php via the menu Display>Views and change the line:
to:
Edit the file show_block_address.php via the menu Display>Views and change the line:
Code:
<label><input type="checkbox" checked="checked" name="data[address_bothtypes_<?php echo $this->step . '_' . $this->module_position; ?>]" value="1"> <?php
Code:
<label><input type="checkbox" name="data[address_bothtypes_<?php echo $this->step . '_' . $this->module_position; ?>]" value="1"> <?php
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326596
by patoushka
Replied by patoushka on topic Same address for shipping unchecked by default
I tried this but it changed nothing. Still checked by default.
The only difference I see is that we remove the"checked="checked"" code.
I'm really not very good with PHP. Is there an unchecked code?
Do you have another another idea?
The only difference I see is that we remove the"checked="checked"" code.
I'm really not very good with PHP. Is there an unchecked code?
Do you have another another idea?
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326601
by nicolas
Replied by nicolas on topic Same address for shipping unchecked by default
Hi,
I have no other idea.
I actually tested the modification in my end and it works just fine.
I actually don't know of any other way to have a checkbox unchecked by default in HTML. That's how it is supposed to be done and the solution which works.
So if you don't see any difference, it means that you must have edited the view file for another template than the template you're using on your frontend. Or you've modified the file from your test website while you're looking at the checkout on your live website or vice-versa. Or we're not talking about the same checkout.
This modification I proposed is for when you create/edit an address in the checkout's "address" view. There is a similar checkbox on the registration/guest form of the "login" view but the login view already has a setting to uncheck the checkbox by default so no modification is necessary. Looking at your screenshot, I can't say which one you're talking about but since there is already a setting for the "login" one, I assumed you were talking about the "address" one, but maybe you don't know about the setting and are talking about the "login" one.
I have no other idea.
I actually tested the modification in my end and it works just fine.
I actually don't know of any other way to have a checkbox unchecked by default in HTML. That's how it is supposed to be done and the solution which works.
So if you don't see any difference, it means that you must have edited the view file for another template than the template you're using on your frontend. Or you've modified the file from your test website while you're looking at the checkout on your live website or vice-versa. Or we're not talking about the same checkout.
This modification I proposed is for when you create/edit an address in the checkout's "address" view. There is a similar checkbox on the registration/guest form of the "login" view but the login view already has a setting to uncheck the checkbox by default so no modification is necessary. Looking at your screenshot, I can't say which one you're talking about but since there is already a setting for the "login" one, I assumed you were talking about the "address" one, but maybe you don't know about the setting and are talking about the "login" one.
Please Log in or Create an account to join the conversation.
Time to create page: 0.198 seconds