1

public function loadAttributeOptions() {

    $customerAttributes = Mage::getResourceSingleton('customer/customer')->loadAllAttributes()->getAttributesByCode();
    $attributes = array();


    foreach ($customerAttributes as $attribute) {
        $attribute[] = $customerAttributes;
        if (!($attribute->getFrontendLabel()) || !($attribute->getAttributeCode())) {
            continue;
        }
        $attrCode = $attribute->getAttributeCode();
        $attrLabel = $attribute->getFrontendLabel();
        if($attrCode == 'default_shipping' || $attrCode == 'default_billing') {
            continue;
        }
        $attributes[$attrCode] = $attrLabel;
    }
    asort($attributes);
    $this->setAttributeOption($attributes);
    return $this;
}

this is my code, but I need to some validations, 1- If attributes is empty, i would like to get customer_taxvat in sales_flat_quote

You got it?

0

Using Order Collection You Can Easily Get customer_taxvat value

$order_collection = Mage::getModel('sales/order')->getCollection();

foreach ($order_collection as $data)
{
    $customer_taxvat = $data->getData('customer_taxvat');
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.