Skip to main content
edited body
Source Link
Amit Bera
  • 77.7k
  • 20
  • 124
  • 239

I did it by myself. Here's is the code.

$p= Mage::getModel('catalog/product')->load($prd['product_id']);
                      
$attributeSetModel = Mage::getModel("eav/entity_attribute_set");
$attributeSetModel->load($p->getAttributeSetId());
$attributeSetName  = $attributeSetModel->getAttributeSetName();
 
                       
if($attributeSetName=='Default' && $p->getTypeID>getTypeId()=='simple') {

      echo "This is a pure simple products";
}

Or if you want the find all pure simple products and the configurable product but not the child product of a configurable product then use this code :

if($p->isConfigurable() || ($attributeSetName=='Default' && $p->getTypeID()=='simple')) {

  echo "It consists of both pure simple products and the configurable product but not the child product of a configurable product";

}

I did it by myself. Here's is the code.

$p= Mage::getModel('catalog/product')->load($prd['product_id']);
                      
$attributeSetModel = Mage::getModel("eav/entity_attribute_set");
$attributeSetModel->load($p->getAttributeSetId());
$attributeSetName  = $attributeSetModel->getAttributeSetName();
 
                       
if($attributeSetName=='Default' && $p->getTypeID()=='simple') {

      echo "This is a pure simple products";
}

Or if you want the find all pure simple products and the configurable product but not the child product of a configurable product then use this code :

if($p->isConfigurable() || ($attributeSetName=='Default' && $p->getTypeID()=='simple')) {

  echo "It consists of both pure simple products and the configurable product but not the child product of a configurable product";

}

I did it by myself. Here's is the code.

$p= Mage::getModel('catalog/product')->load($prd['product_id']);
                      
$attributeSetModel = Mage::getModel("eav/entity_attribute_set");
$attributeSetModel->load($p->getAttributeSetId());
$attributeSetName  = $attributeSetModel->getAttributeSetName();
 
                       
if($attributeSetName=='Default' && $p->getTypeId()=='simple') {

      echo "This is a pure simple products";
}

Or if you want the find all pure simple products and the configurable product but not the child product of a configurable product then use this code :

if($p->isConfigurable() || ($attributeSetName=='Default' && $p->getTypeID()=='simple')) {

  echo "It consists of both pure simple products and the configurable product but not the child product of a configurable product";

}
Source Link
Poles
  • 263
  • 1
  • 5
  • 17

I did it by myself. Here's is the code.

$p= Mage::getModel('catalog/product')->load($prd['product_id']);
                      
$attributeSetModel = Mage::getModel("eav/entity_attribute_set");
$attributeSetModel->load($p->getAttributeSetId());
$attributeSetName  = $attributeSetModel->getAttributeSetName();
 
                       
if($attributeSetName=='Default' && $p->getTypeID()=='simple') {

      echo "This is a pure simple products";
}

Or if you want the find all pure simple products and the configurable product but not the child product of a configurable product then use this code :

if($p->isConfigurable() || ($attributeSetName=='Default' && $p->getTypeID()=='simple')) {

  echo "It consists of both pure simple products and the configurable product but not the child product of a configurable product";

}