getFieldset($fieldset); foreach ($fields as $field => $dest) { if (!$dest->auctaneapi) continue; $name = $dest->auctaneapi == '*' ? $field : $dest->auctaneapi; $value = $source instanceof Varien_Object ? $source->getDataUsingMethod($field) : @$source[$field]; $xml->writeElement((string) $name, (string) $value); } } /** * @return array of string names * @see "auctane_exclude" nodes in config.xml */ public function getIncludedProductTypes() { static $types; if (!isset($types)) { $types = Mage::getModel('catalog/product_type')->getTypes(); $types = array_filter($types, create_function('$type', 'return !@$type["auctane_exclude"];')); } return array_keys($types); } /** * Indicate if a {$type} is specifically excluded by config * * @param string $type * @return bool */ public function isExcludedProductType($type) { static $types; if (!isset($types)) { $types = Mage::getModel('catalog/product_type')->getTypes(); $types = array_filter($types, create_function('$type', 'return (bool) @$type["auctane_exclude"];')); } return isset($types[$type]); } }