Magento Get Customer Shipping Address During Checkout
<p>I am trying to get my customer's shipping address during checkout. What we are trying to do is make it so that if they attempt to ship by UPS to a PO Box, it outputs an error page. In the checkout page, there is a checkbox where they can check the different addresses that are saved into their account. I've gotten it where it correctly detects whether or not they are using UPS, however I can't get it to properly get the customer's address. No matter what I do, it records the default shipping address, even if they select another one. My question is what can I do to make it where it selects address 2 instead of address one? Here is my code. The reason the error outputs $street is so I can see what is contained in the variable $street.</p>

<pre><code>        $quote = $this-&gt;getOnepage()-&gt;getQuote();
        $shippingAddress = $quote-&gt;getShippingAddress();
        $street = $shippingAddress-&gt;getStreet1();

        //Check to see if customer is trying to use UPS to ship to a PO Box.
        if (preg_match("/p\.* *o\.* *box/i", $street)){
            if ((($shippingMethod=="tablerate3_bestway") || ($shippingMethod=="tablerate_bestway") || ($shippingMethod=="tablerate2_bestway"))){
                $result = array (
                    'error' =&gt; -1,
                    'message' =&gt; $this-&gt;__($street)
                );
                $this-&gt;getResponse()-&gt;setBody(Zend_Json::encode($result));
            }
        }
</code></pre>