Try the Demo

Magento Forum

   
Page 1 of 3
bug in Account (logged in) - billing /shipping addresses
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

This probably should go to the bug report however I wanted to attached screen shots to better explain it.

I think the Change Billing Address and Change Shipping Address all go to the same form, because whether I change either of the address, the result in the Address Book is the same.

There are ‘Default Billing Address’ and ‘Default Shipping Address’, from the code of ‘customer/address/edit.phtml’ file, it looks to me there should have checkbox option available

<li>
                
<?php if($this->isDefaultShipping()): ?>
                    
<strong><?php echo $this->__('Default Shipping Address'?></strong>
                
<?php elseif($this->canSetAsDefaultShipping()): ?>
                    
<input type="checkbox" id="primary_shipping" name="default_shipping" value="1" />&nbsp;
                    <
label for="primary_shipping"><?php echo $this->__('Use as my default shipping address'?></label>
                
<?php else: ?>
                    
<input type="hidden" name="default_shipping" value="1" />
                
<?php endif; ?>
            
</li>

First I thought it must be me messing up the code by changing class or id name and div tags, but a visit to your demo store I am seeing the same thing . Please see attached screen shoots:
1) I had the addres: 555 peace lane, alameda, ca 94501
2) I changed the shipping address to 888 freedom ave, san francisco, ca 94107.
3) when I go back to address book, both the shipping and address are showing the #2.

22 minutes later…
I did a checkout test from your demo store, added a new address (#1) for shipping, went back to my account, the billing/shipping address info are still showing #2

1 hour+ many minutes later…
Sorry, got some more finding, and now I am not sure if it’s a bug, but it’s absolutely confusing (if a customer doesn’t do multi-address shipping).

So I was testing my shop, did a ‘ceate a new address’ with multi-address shipping, I see it pulled the ‘edit.phtml’ from the customer/address; now I can see the checkboxes for “Use as my default billing address” (Default Billing Address) and “Use as my default shipping address” (Default Shipping Address). I entered a new address, checked the “Use as my default shipping address”, went back to My Account, and I can see the new address is reflected in the ‘default shipping address’, in addition, I can also see my old shipping address is placed in the ‘Additional Address Entries’; on top of that, a ‘Add new Address’ button has surfaced, I clicked it, now I can see the checkboxes option for “Use as my default billing address” and “Use as my default shipping address”

Now, it all make sense, still, somewhere, it’s missing a piece of something, because,
1) A customer who has not done a multi-address shipping and added a new address for billing or shipping will never ever figure this out because whether she clicks on ‘Manage Addresses’ or ‘Edit Address’ in ‘PRIMARY BILLING ADDRESS’ or ‘PRIMARY SHIPPING ADDRESS’ in the Account Dashboard or ‘Address Book’ (clicking on ‘Manage Addresses’ brings her to ‘Address Book’) , she will never see the ‘use as my default’ checkboxes option.

2) If this is how it’s supposed to work, shouldn’t there an indication in the Address Book somewhere?

3) Should it allows customer who has not done multi-address shipping to be able to have separate address for Shipping and Billing?

Image Attachments
default_shipping_address.jpgedit_address.pngsaved_address.jpg
 Signature 

Accessible, WCAG 2.0 HTML5 Magento/WordPress Development & Magento themes:
Latest release :  Green Path Premium Theme | : Touchscreen Optimized Mobile Theme

 
Magento Community Magento Community
Magento Community
Magento Community
 
dilbert4life
Jr. Member
 
Total Posts:  27
Joined:  2008-11-21
 

This issue is still present almost a year later. Does anyone have an answer?

 Signature 

---
dilbert4life

(dead account - I now post as IFBDesign)

 
Magento Community Magento Community
Magento Community
Magento Community
 
ScottSt
Member
 
Total Posts:  52
Joined:  2009-02-06
 

I have this EXACT issue. Thanks for the clear documentation, I’ll have to start thinking about a fix.

 
Magento Community Magento Community
Magento Community
Magento Community
 
The Tankgirl
Sr. Member
 
Total Posts:  87
Joined:  2008-11-27
 

I’m having this problem too!

demo.magentocommerce.com has a checkbox for “Use as my default billing address” under my account -> edit address!

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

I already forgotten this post of mine smile

Yes, just checked a site (v1.3.1) I was working, it’s still not fixed!!!!!! Maybe this is intentional? That if you don’t use multi-address shipping you don’t get to use separate address for billing and shipping?! Does make a bit of sense with the Credit Card Fraud issue.

 Signature 

Accessible, WCAG 2.0 HTML5 Magento/WordPress Development & Magento themes:
Latest release :  Green Path Premium Theme | : Touchscreen Optimized Mobile Theme

 
Magento Community Magento Community
Magento Community
Magento Community
 
The Tankgirl
Sr. Member
 
Total Posts:  87
Joined:  2008-11-27
 

Well, at least I know it isn’t just me, so I can move on and finish my site wink
Thank you for answering chinesedream!

But why don’t they let the default billing/shipping address disappear completely, instead of this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
The Tankgirl
Sr. Member
 
Total Posts:  87
Joined:  2008-11-27
 

But: demo.magentocommerce.com does show a checkbox on the bottom of the page when you go to your account -> edit address? How come??

 
Magento Community Magento Community
Magento Community
Magento Community
 
Goetz
Jr. Member
 
Total Posts:  6
Joined:  2009-02-06
 

Hi Tankgirl,

I do not see a checkbox on the bottom of the page only:

Standard Rechnungsadresse
Standard Versandadresse

(German translation for standard billing address standard shipping address).

When this basic part has an error can I trust the rest of magento?

Is there a bugfix or workaround ?

I working with Safari but the same in FireFox

 
Magento Community Magento Community
Magento Community
Magento Community
 
The Tankgirl
Sr. Member
 
Total Posts:  87
Joined:  2008-11-27
 

That’s the problem:
I see :

Standaard-factuuradres
Standaard-verzendadres

Without a checkbox

( It’s Dutch for Shipping and Billing address wink )

demo.magentocommerce.com has a checkbox when you go to the same page.

Here:

http://www.magentocommerce.com/boards/viewthread/41579/

In this topic I made some screenshots to show everyone what I mean.

This is just a little annoying bug that needs to be fixed, it’s not a big problem wink

So if anyone has a fix for this… I ( and I think more people) would be very grateful grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
eight32
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2009-02-24
 

Designer’s answer :: this is by design, and is not a bug

The absence of check-boxes found in ‘Customer Login’ -> ‘Address Book’ -> ‘Add New Address’ (ie frontend):

Use as my default billing address
Use as my default shipping address

is a statement and not an option, implying that

the (first and) only address that you’ve provided will be used as your default billing address and default shipping address

This may be intuitively ambiguous for non-developers; functionality being present but not functional… in a wait-state if you may. If you add another address you’ll see that the check boxes are rendered functional in the ‘Add New Address’ block, giving you the option to choose which is *default billing* and which is *default shipping*.

This is yet another subtle example of Magento’s design genius. Functionality /degrades/ to a secure state, and doesn’t introduce any vulnerablities by allowing you to choose an option for which there isn’t actually an option (yet).

cool smile

Developer’s answer :: interpreting the logic

In {web_root}/app/design/frontend/default/default/template/customer/address/edit.phtml you’ll find:

...
            <
li>
                
<?php if($this->isDefaultBilling()): ?>
                    
<strong><?php echo $this->__('Default Billing Address'?></strong>
                
<?php elseif($this->canSetAsDefaultBilling()): ?>
                    
<input type="checkbox" id="primary_billing" name="default_billing" value="1" />&nbsp;
                    ...
            </
li>
            <
li>
                
<?php if($this->isDefaultShipping()): ?>
                    
<strong><?php echo $this->__('Default Shipping Address'?></strong>
                
<?php elseif($this->canSetAsDefaultShipping()): ?>
                    
<input type="checkbox" id="primary_shipping" name="default_shipping" value="1" />&nbsp;
                    ...
            </
li>
        ...

which essentially determines whether the check box(es) should be rendered or not. And if so, how to do so.

The isDefaultBilling(), canSetAsDefaultBilling(), isDefaultShipping() and canSetAsDefaultShipping() methods are called from:

{web_root}/app/code/core/Mage/Customer/Block/Address/Edit.php

public function canSetAsDefaultBilling()
    
{
        
if (!$this->getAddress()->getId()) {
            
return $this->getCustomerAddressCount();
        
}
        
return !$this->isDefaultBilling();
    
}

    
public function canSetAsDefaultShipping()
    
{
        
if (!$this->getAddress()->getId()) {
            
return $this->getCustomerAddressCount();
        
}
        
return !$this->isDefaultShipping();;
    
}

    
public function isDefaultBilling()
    
{
        
return $this->getAddress()->getId() && $this->getAddress()->getId()==Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling();
    
}

    
public function isDefaultShipping()
    
{
        
return $this->getAddress()->getId() && $this->getAddress()->getId()==Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping();
    
}

which in turn calls the getCustomerAddressCount() method to count how many addresses already exist:

public function getCustomerAddressCount()
    
{
        
return count(Mage::getSingleton('customer/session')->getCustomer()->getAddresses());
    
}

Interestingly, the Customer (frontend) input type is ‘checkbox’, while the AdminHTML (backend) is a JS of type ‘radio’

{web_root}/app/design/adminhtml/default/default/template/customer/tab/addresses.phtml

setAddressAsDefault : function(){
                
...
                    if(
inputs[j].type=='radio' && inputs[j].checked && this.itemList.length 1){
                
...

HTH, and have a great day!

Stuart

 
Magento Community Magento Community
Magento Community
Magento Community
 
Eydamos
Jr. Member
 
Total Posts:  24
Joined:  2009-06-29
 

It’s nice to know where these files are and what they do. But I can’t figure out how to solve the problem.

I tried to edit the edit.phtml and comment out the if statements and the html text from the if and the second elseif. After reloading the page I had the checkboxes but whatever I clicked he changes both addresses.

I tried to edit the php code but I realy don’t know what to change to force him to accept the checkboxes.

Has anyone figured out what to change to get this featurebug work as from us expected?

 
Magento Community Magento Community
Magento Community
Magento Community
 
loeffel
Guru
 
Avatar
Total Posts:  412
Joined:  2009-02-03
 

More than 1 year has passed again and this problem still exists!
And I dont think this is ‘clever designing’ - it’s lazy designing to a point where it’s starting to become ridiculous.
No explanation or reason justifies employing a system that makes no sense at all and will confuse everybody and force them into a stupid trial and error procedure to find out, how to edit one address without changing the other.
If I were a customer and was to change my invoice address only to find out that my shipping address was just changed aswell, I wouldn’t even try a second time. I would leave immediately because I have better things to do than coping with stupid non-sense webpage anomalies!

Why do you even include two links which each denotes that using this link would actually change this particular address only, when it will always change both? What made magento decide to put in an option that simply doesn’t do, what it promises to do and not include any note of it at all as if it were better to let the user stumble through the dark than admitting, that the system the user is about to use, works differently than he will expect?

Yes, genius design indeed magento!

 Signature 

Erotikshop

 
Magento Community Magento Community
Magento Community
Magento Community
 
sillyzero
Jr. Member
 
Total Posts:  3
Joined:  2010-05-26
 

Hi all,

i´m not really fixed the \"bug\".
But i post a message to the customer. So when he try to change the billing or shipping address in the first time he´s registered he get the message:\"Add a new address to handle different billing and shipping address\”.

If you want do the same, copy the following code to your edit.phtml file (.../app/design/frontend/default/default/template/noregion/customer/address/) after the last closing list tag </li> and bevor the ul-tag closed.

<li class=\"addressCount\">
<?php $count=$this->getCustomerAddressCount() ?>
<?php $value = $this->canSetAsDefaultBilling() ?>
<?php if(($count==1)&&($value!=1)){
echo $this->__(\'Add new address to handle different billing and shipping address.\');
$count+=1;
}
?>
</li>

If you want, that the message disappear in a different language edit the Mage_Customer.csv file
and styles.css for another layout.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rhonda_Rondeau
Moderator
 
Total Posts:  924
Joined:  2010-08-03
Culver City
 
loeffel - 03 September 2010 05:37 AM

More than 1 year has passed again and this problem still exists!
And I dont think this is ‘clever designing’ - it’s lazy designing to a point where it’s starting to become ridiculous.
No explanation or reason justifies employing a system that makes no sense at all and will confuse everybody and force them into a stupid trial and error procedure to find out, how to edit one address without changing the other.
If I were a customer and was to change my invoice address only to find out that my shipping address was just changed aswell, I wouldn’t even try a second time. I would leave immediately because I have better things to do than coping with stupid non-sense webpage anomalies!

Why do you even include two links which each denotes that using this link would actually change this particular address only, when it will always change both? What made magento decide to put in an option that simply doesn’t do, what it promises to do and not include any note of it at all as if it were better to let the user stumble through the dark than admitting, that the system the user is about to use, works differently than he will expect?

Yes, genius design indeed magento!

Does this exists in all the versions or just a particular version?

Rhonda

 Signature 

Visit us on Facebook Follow us on Twitter!

Got Questions? Visit Magento Answers

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mosses Akizian
Magento Team
 
Avatar
Total Posts:  172
Joined:  2009-04-28
Los Angeles, CA
 

Thanks for bringing this back to our attention guys. I have escalated this issue with our core team.

 Signature 

follow me on twitter.com/monocat

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mosses Akizian
Magento Team
 
Avatar
Total Posts:  172
Joined:  2009-04-28
Los Angeles, CA
 

Quick update. Core team has acknowledged the issue but I don’t have an ETA yet on a patch. Will update their feedback once available.

Quick workaround to this issue is to add a new address and apply each default accordingly. I know it’s an extra step but will work just fine without needing to hack the code.

 Signature 

follow me on twitter.com/monocat

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 3