Jump to content

How to Uncheck "Use same address for billing and shipping"


Dirty Butter

Recommended Posts

The box to choose the same for billing and shipping address is checked by default, and I need to make the box unchecked by default. Two customers have had to write to tell me the confirmation email shows the wrong shipping address.

 

I had assumed I could change the value to zero in this line of addressbook.php, but that didn't work:

<div><label for="addr_default">{$LANG.address.default_delivery_address}</label><span><input name="default" type="checkbox" id="addr_default" value="1" {$DATA.default} /> </span></div>

I did clear cache for CC and browser.

 

ALSO

This latest customer had the billing listed for both when I looked at the info in Admin, BUT the alternate address IS marked as the "Default shipping address". All I did was look at Predefined Addresses and there it was. So maybe the issue is deeper than customer error in not unchecking that box?

Link to comment
Share on other sites

Ah I just found it I think.

 

It was not addressbook.php, but content.checkout.confirm.php:

 I took out {$DELIVERY_CHECKED} and the check mark is gone, but I don't want any unintended consequences, so was that the right thing to do?

{if $ALLOW_DELIVERY_ADDRESS}<div><label>&nbsp;</label><span><input type="checkbox" name="delivery_is_billing" id="delivery_is_billing" {$DELIVERY_CHECKED} /> {$LANG.address.delivery_is_billing}</span></div>{/if}
Link to comment
Share on other sites

I don't think thats the best way as on reload it will always be unchecked if the customer has checked it (if you see what I mean).

 

In classes/cubecart.class.php at line 975 you see:

if (!isset($this->_basket['delivery_address']['is_billing']) || $this->_basket['delivery_address']['is_billing']) {
$GLOBALS['smarty']->assign('DELIVERY_CHECKED', 'checked="checked"');
}

The login here needs to be changed to something like: (untested)

 

if ($this->_basket['delivery_address']['is_billing']) {
$GLOBALS['smarty']->assign('DELIVERY_CHECKED', 'checked="checked"');
}
Link to comment
Share on other sites

OK - that's why I asked. It DOES take off the check and make the Delivery form appear until they manually add the check, and it stayed the same way when I refreshed the page. That's what I want.

 

But this is concerning, too:

 

This latest customer had the billing listed for both when I looked at the info in Admin, BUT the alternate address IS marked as the "Default shipping address". All I did was look at Predefined Addresses and there it was. So maybe the issue is deeper than customer error in not unchecking that box?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...