$shippingAddress = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress(); $countryId = $shippingAddress->getCountryId();
$customer = Mage::getModel('customer/customer')->load($customerId); $customer->setCountryId('US'); $customer->save();In this example, we are loading a customer object by its ID and then setting the country ID to "US". We then save the customer object with the updated country ID. The Varien_Object class is part of the Magento Core package library. It contains a wide range of methods that developers can use to perform various operations on objects. The getCountryId method is just one of many methods available in this library.