I am currently trying to import commerce products, which both essentially rely on the SKU column for both the SKU and Image fields.
This is being handled in Excel by cloning the column with ="import_images/"&A2&".png"
This means that the master list needs to be kept as an XLS and can't be kept as a CSV.
If tamper could handle the separation of similar source mappings, then obviously the image string could be constructed within Feeds Tamper, removing complexity from the import spreadsheet, and allowing the master list to permanently be a CSV.
If the client needs to juggle both XLS and CSV, I can see them damaging one of them, or not following the "rules" we would lay out for them, and I just think the less chance for client error the better :)
Comments
Comment #1
foopang CreditAttribution: foopang commented+1, I so desperately need it!
Comment #2
star-szrI think the help text at the top of the Feeds Tamper page is very misleading in this aspect.
Comment #3
JamesChen CreditAttribution: JamesChen commented+1, I also need it!
Comment #4
JamesChen CreditAttribution: JamesChen commentedI found one way to solve the issue. Add one 'Blank source' and map into a target in 'Mapping for Node processor'. Then, in the temper configuration, use 'Copy source value' to copy the source from the field you want to the target field. Finally, using any tamper plugin to tamper your target field. It will show one error message, but it works.
Comment #5
Summit CreditAttribution: Summit commentedHi, If this works is it than also possible to copy all information needed in the row to another SKU? With tamper. Say SKU new = SKU + 1 for a field which holds 2 colors. SKU 1 holds orange and the new build row with SKU 1 + 1 holds blue?
I will also file a specific issue for this, but may be this issue is somehow related? Separate issue http://drupal.org/node/1451632
Greetings, Martijn.
Comment #6
danon1981 CreditAttribution: danon1981 commented+1
I need to be able to rewrite fields with "yes" into a taxonomie term for filtering further down the line. The node should just contain "yes" So I need to map 1 text field and 1 taxonomie field from 1 source.
Comment #7
danon1981 CreditAttribution: danon1981 commentedMight I suggest to add a checkbox to indicate which field the tamper plug-in is meant for.
Comment #8
ErnestoJaboneta CreditAttribution: ErnestoJaboneta commentedSubscribing
I also need this! I'm using mailhandler to import 8 fields from one source, the email body.
Comment #9
Dubs CreditAttribution: Dubs commentedMe also - I use a unique SKU which happens to be a mapping for a text Field too. However the SKU needs to be made up of a concatenation from another field. Tampering the two separately would be great.
Comment #10
czigor CreditAttribution: czigor commentedMarked #1467840: One source field to multiple dest fields - how to? as duplicate.
Comment #11
OnkelTem CreditAttribution: OnkelTem commentedLooks like this will never be resolved, huh?
Whenever I try to use Feeds Tamper for more then just single-and-final editing of a source, I'm stuck for a hour or so, reviewing the issue queue, realizing it is probably impossible, and finally adding additional fields to a target Entity, and adding one more processing cycle but with Rules now.
Just a simple example, with which I failed again: I have "Title" source field, which keeps also "weight" of an item.
So I need exactly this mapping:
* Source.Title > Product.Title
* RegEx(Source.Title) > Product.Weight,
which, as far as I'm aware of it - is impossible to achieve.
With all the respect, @twistor, owhat forced you to implement tampering of just Source, not the Source->Target pair? :)
Comment #12
OnkelTem CreditAttribution: OnkelTem commentedComment #13
codesmith#4 worked for me - thanks!
Comment #14
twistor CreditAttribution: twistor commentedThis request would be nice, there have been others before, but it's not possible. The data does not exist in a pair, Feeds maps the source -> target. That's why the copy plugin exists, you can copy from one source field to another, then modify it independently.
Comment #15
acoronel CreditAttribution: acoronel commented#4 works for me. Map from Blank Source to your desired field, then add plugins as desired. You can map as many Blank Sources as you need.
Comment #16
markabur CreditAttribution: markabur commented#4 works for me if this patch applied: #2131971: copy from source plugin using old variables
Comment #17
dakota.benjamin CreditAttribution: dakota.benjamin commented@twistor but there is no way to do that if I don't have a spare/blank source to copy to, i.e. if I'm using the CSV parser.
Comment #18
twistor CreditAttribution: twistor commentedWith the CSV parser, you always have a spare/blank source. Just type in anything.
Comment #19
Bensbury CreditAttribution: Bensbury commentedI've been trying different ways of doing this and followed #4 in Copying a Source ('From') into a Blank Source. However nothing comes in to manipulate. It doesn't copy anything.
I've noticed Feed Content might copy, but in this case the Source is 'Feed node: Node ID', and while it is available in the direct source->target tamper plugin, it won't copy.
Also if I use the PHP Tamper plugin and print out the contents of the $item array/object, 'Feed node: Node ID', is not present as an array property. So in $item it doesn't exist, which might explain why I can't copy it into other tamper fields.
Does anyone have a similar problem? And an idea what to do about it?
It just seems like certain sources (ones not part of the original feed itself) are not available for tampering.
Comment #20
msielskiLooking for this fix. Text "Each mapping can be manipulated individually," is incorrect should be "Each source can be manipulated individually."
Comment #21
zmove CreditAttribution: zmove commented+1 to this.
Comment #22
mibfire CreditAttribution: mibfire commentedFor #4 it is important that the 'Blank source' has to come before the source field, cos if not the modified value will be used in the 'Blank source'!
Comment #23
RumpledElf CreditAttribution: RumpledElf commentedMappings:
The field you want to use twice -> Temporary target 1
Blank source 1 -> field 1
Blank source 2 -> field 2
(in that order in the mappings)
Tamper:
Then use the tamper copy plugin on field 1 and field 2 to copy from temporary target 1
Then tamper away!
Comment #24
mautumn CreditAttribution: mautumn commentedThanks RumpledElf - that worked for me :)
Comment #25
gaele CreditAttribution: gaele commentedI've created a documentation page based on #23.
https://www.drupal.org/node/2614786
Comment #26
firfin CreditAttribution: firfin commentedSee documentation page Map to multiple fields using 'Blank source' AKA using different Tampers on a single source also.