$customerObj = new Varien_Object(array('customer_id' => '12345')); $customerId = $customerObj->getCustomerId(); //Returns 12345
$orderObj = Mage::getModel('sales/order')->load($orderId); $customerId = $orderObj->getCustomerId(); //Returns the customer ID associated with the orderThis example retrieves the customer ID associated with an order object by loading the order using the Magento sales/order model and then using the getCustomerId method. Regarding the package library, Varien_Object is a part of the Magento core library and can be found in the app/code/core/Mage/Varien/Object.php file. It is not a separate package or library.