Magento SQL Query to show product manufacturer -


i trying query product manufacturer in magento 1.7.0.2 . browse again , again table can manufacturer table , connect product sku.

i try query hope can manufacturers of product:

select  eav_attribute_option_value.value  eav_attribute, eav_attribute_option, eav_attribute_option_value   eav_attribute.attribute_code = 'manufacturer' , eav_attribute_option.attribute_id = eav_attribute.attribute_id , eav_attribute_option_value.option_id = eav_attribute_option.option_id 

but not equal product manufacturer when compare result magento admin product manufacturer.

my question should query can list of manufacturers of product can sql join in catalog_product_enity's sku.

does has idea case? new magento please gentle me. appreciated, in advance

i hope understood correctly.
if want manufacturer product, don't need query.
should work. let's assume have product in var $_product;

$_product->getattributetext('manufacturer');//this gets label $_product->getmanufacturer(); //gets manufacturer id 

[edit]
products this:

$collection = mage::getmodel('catalog/product')->getcollection()     ->addattributetoselect('manufacturer'); $collection->addattributetofilter('status', 1);//optional enabled products $collection->addattributetofilter('visibility', 4);//optional products visible in catalog , search foreach ($collection $product) {    $sku = $product->getsku();    $manufacturerid = $product->getmanufacturer();    $manufacturerlabel = $product->getattributetext('manufacturer');    //do values above - write them in csv or excel } 

Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -