Upload of many unique coupon codes

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
kimholberg
Posts: 29
Joined: 21 Aug 2017, 09:42

Upload of many unique coupon codes

Post by kimholberg » 11 Oct 2017, 11:07

We need to have 25.000 unique coupon codes in our shop, for a one year long campaign, and one code can only be redeemed one time. Is there a way to do this like an upload from a spreadsheet file?
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Upload of many unique coupon codes

Post by aimeos » 11 Oct 2017, 20:39

In the dev-master version, you can upload a CSV file with coupon codes and import them by running the aimeos:jobs command. If you wait till next week, the new 2017.10 release will be out including this feature.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kimholberg
Posts: 29
Joined: 21 Aug 2017, 09:42

Re: Upload of many unique coupon codes

Post by kimholberg » 11 Oct 2017, 20:44

Thanks, will wait then...
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1

kimholberg
Posts: 29
Joined: 21 Aug 2017, 09:42

Re: Upload of many unique coupon codes

Post by kimholberg » 12 Oct 2017, 11:04

One question more about bulk upload of coupon codes:

Is there any restrictions to the format of the code, like i want to use a code like this:

MINT08G67cH2 (25.000 unique codes like this)

Regards
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Upload of many unique coupon codes

Post by aimeos » 12 Oct 2017, 21:09

The only restrictions are 32 characters maximum and codes are case insensitive (mint08g67ch2 and MINT08G67CH2 is the same)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kimholberg
Posts: 29
Joined: 21 Aug 2017, 09:42

Re: Upload of many unique coupon codes

Post by kimholberg » 12 Oct 2017, 21:12

Thanks..
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1

kimholberg
Posts: 29
Joined: 21 Aug 2017, 09:42

Re: Upload of many unique coupon codes

Post by kimholberg » 28 Oct 2017, 16:29

I have updated to latest version as you recommended and tried to upload coupon codes, but it does not work. I tried via the admin interface (expert mode) under coupon.<br /><br />Could you please describe how i do this, as the maunal is not very clear about this. Shall i configure containers first for holding csv files? I add this image to how i have set the admin interface.
I have updated to latest version as you recommended and tried to upload coupon codes, but it does not work. I tried via the admin interface (expert mode) under coupon.

Could you please describe how i do this, as the maunal is not very clear about this. Shall i configure containers first for holding csv files? I add this image to how i have set the admin interface.
coupon_codes.png (59.26 KiB) Viewed 3042 times
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Upload of many unique coupon codes

Post by aimeos » 28 Oct 2017, 21:32

Please use the simple mode, go to "Vouchers", select the entry in the list, go to the "Codes" sub-panel and click on the "+" symbol on the upper right of the table that will show the codes. Select "Import", select the CSV file with the code (one line per code, no additional line at the end) an click on "Save" in the upper right corner. You should get a success message.

Now make sure you execute "./flow aimeos:jobs coupon/import/csv/code" command (best regularly per cronjob).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kimholberg
Posts: 29
Joined: 21 Aug 2017, 09:42

Re: Upload of many unique coupon codes

Post by kimholberg » 29 Oct 2017, 10:34

Tried it - no success:

1. In simple mode i used 'Voucher'
2. Entry created for a voucher and configured with PercentRebate provider
3. In 'Code' mode i used the small dropdown and selected 'Import'
4. Found my csv file on my local drive (10 unique codes) and selected this (nothing happends)
5. Executed ./flow aimeos:jobs coupon/import/csv/code in terminal, but got this error:

bitnami@ip-172-31-73-205:/opt/bitnami/apps/neos/htdocs$ ./flow aimeos:jobs coupon/import/csv/code
The URI must be a valid string.

Type: InvalidArgumentException
Code: 1176550571
File: Packages/Framework/Neos.Flow/Classes/Http/Uri.php
Line: 107

Format of the csv file:
rHaxcC93;1
Nrd97eVb;1
PxhoQpCR;1
B6E2VYUc;1
tBd4Ryte;1
6ZG5LPQ9;1
ecbmWzEF;1
HSvU8snb;1
3mPWZiZK;1
R9hoh4LG;1
Kd3hj8Ky;1
gcZpiSUa;1
raLeZzeb;1
9FCYMgwJ;1
qGn9pRqT;1
JNeFnGPg;1
bSfhTH4j;1
mTVRWWDo;1
nsKMiCYq;1
Bqyx5MKc;1

Tried both with number 1 for 'count' field and without the number.
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1

kimholberg
Posts: 29
Joined: 21 Aug 2017, 09:42

Re: Upload of many unique coupon codes

Post by kimholberg » 29 Oct 2017, 20:45

After getting the URI path right in Neos, i got the Jobs to execute, but got this Aimeos error after following same procedure above:

bitnami@ip-172-31-73-205:/opt/bitnami/apps/neos/htdocs$ ./flow aimeos:jobs coupon/import/csv/code
Executing jobs for site default
Process (PID "2296") failed with status "256"

Type: Aimeos\MW\Process\Exception
File: Packages/Libraries/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Pcntl.php
Line: 199
bitnami@ip-172-31-73-205:/opt/bitnami/apps/neos/htdocs$

Does that give any clue to why it does not work?
Neos 3.2.0 - Bitnami AWS C2 - Aimeos 2017-10.1

Post Reply