Skip to content

Instantly share code, notes, and snippets.

@WENKz
Last active August 29, 2015 14:25
Show Gist options
  • Save WENKz/52b805a2f28d4e3038f4 to your computer and use it in GitHub Desktop.
Save WENKz/52b805a2f28d4e3038f4 to your computer and use it in GitHub Desktop.
Magento change all attributes value
public function getAttributes() {
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')
->getItems();
return $attributes;
}
$attributes = $this->getAttributes();
foreach ($attributes as $attribute) {
if($attribute->getIsSearchable() == 1){
$attribute->setIsSearchable(false);
$attribute->save();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment