0

I'm using the RegCode Module and I need to have 64 different registration codes and I want each of them to be used an infinite number of times. So the only solution is to import them.

I created an Excel spreadsheet with two columns:

  • "code", which contains the 64 codes.
  • "maxuses", which contains "999999".

I exported it as a CSV file but when I try to import it, I get this message:

File successfully saved

Successfully inserted 0 rows out of 64

Warning: array_combine(): Both parameters should have an equal number of elements in regcode_ie_admin_import_submit() (line 167 of /sites/all/modules/regcode/regcode_ie/regcode_ie.module).

Am I doing something wrong ?

1 Answer 1

0

Preparing your cvs file

First remove all the column names from the first row, otherwise they will be added and will throw an error, as they won’t be in the correct format.

Drupal Regcode import tab

You can map to the following six fields:

  • begins: When code should be active from in date format
  • expires: When code should expire in date format
  • code: The registration code text format (for numbers and letters) and should be unique
  • is_active: Whether the code is active text format ‘Yes’ or ‘No’ Default is Yes
  • maxuses: Maximum times the code can be used number format default is 1
  • uses: Number of times the code has been used number format default is 0

If your cvs file codes are in the first i.e column one (A) then you would map it as code and if the next column is maximum times the code can be used then you would map as code, maxuses separated by a comma. Note: no colons.

drupal form CVS file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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