0

I have an e-commerce site that sells albums. This product variation type of album has a field of type commerce file. It’s configured to have multiple files (mp3’s) attached, or bundled to it. I’m using the Feeds & Commerce Feeds module. Feeds uses csv files to create these products.

The Feeds importer works but the file names are being changed. It’s appending a ‘_0’ to the file name.

for example: songname.mp3 -> songname_0.mp3 (see attached)

enter image description here

I’ve tried numerous different settings within the file sources option of the product variation type. I’ve checked and unchecked ‘File attach from server directory’ option

note - I have File Field Path module installed because the dirs. need to be different (dynamic) for each product. For example:

private://artists/artist_name/album_name/song_name.mp3

Utlimately what I want to do is create the dirs. and add the files to server myself and then have the Feeds importer simply reference files that are already there. I don’t want to copy or upload.

Any insight or help would be hugely appreciated!

0
  1. Go to structure/feeds importer
  2. Select yourproductimporter - go to mapping/.
  3. Go to Files:URI (commerce_file:uri)
  4. Click on the button below text "Rename if file exists."
  5. Change to "Replace" and save the importer. That worked for me.

That will eliminate the _0 or _1.mp3 and keep the same file name as your database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.