In the Mage_Dataflow_Model_Convert_Mapper_Column class, which looks at the methods map, you only have 2 vars right now: map and _only_specified. What you need to do is override this class and this method and add something like this on line 125 after installing var:
if ($this->getVar('prepend') && is_array($this->getVar('prepend'))) { $prepend = $this->getVar('prepend'); } else { $prepend = array(); }
Now you have a new prepend variable that you can use for package data, for example: line 138 in the same class as you:
$newRow = array(); foreach ($attributesToSelect as $field => $mapField) { $newRow[$mapField] = isset($row[$field]) ? $row[$field] : null; }
Change this to:
$newRow = array(); foreach ($attributesToSelect as $field => $mapField) { $prepend = isset($prepend[$field]) ? $prepend[$field] : ''; $newRow[$mapField] = isset($row[$field]) ? $prepend . $row[$field] : null; }
Now in your xml, which you posted above, you can add the preend variable as follows:
<action type="dataflow/convert_mapper_column" method="map"> <var name="prepend"> <map name="image"><![CDATA[http://example.com/]]></map>
I did not test it, but as if I tried it in the first place. Also, no part has been added on how you can override this model class, since I think there are many examples.
source share