I found a way that it can be done using a free scripting application, iMacros for Firefox. iMacros is also available free for Chrome and I believe IE. Do a google search for "imacros free download" to get links to the various free browser addons. You can install it in FireFox using the Addon's functionality.
I recorded a script that will create a single coupon and then modified it to add a number to both the coupon name and the coupon code (so each coupon is unique). I then ran the macro using the Loop option and created as many coupons as the value I set for the loop.
- Code: Select all
VERSION BUILD=8601111 RECORDER=FX
TAB T=1
URL GOTO=https://my.domain.com/cgi-bin/ss/start.cgi
TAG POS=1 TYPE=IMG ATTR=ID:nav_img_m4
TAG POS=1 TYPE=IMG ATTR=ID:button_coupons
TAG POS=1 TYPE=INPUT:IMAGE FORM=ACTION:coupon.cgi ATTR=ID:button_add_a_coupon
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:FormName ATTR=NAME:CouponName CONTENT=test<SP>{{!LOOP}}
TAG POS=1 TYPE=TD ATTR=TXT:Specific<SP>products:
TAG POS=1 TYPE=SELECT FORM=NAME:FormName ATTR=NAME:Year CONTENT=%2014
TAG POS=2 TYPE=INPUT:RADIO FORM=NAME:FormName ATTR=NAME:coupon_onetime
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:FormName ATTR=NAME:Percent CONTENT=10
TAG POS=1 TYPE=TD ATTR=TXT:Entire<SP>orderSpecific<SP>products:<SP>Allow<SP>only<SP>1*
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:FormName ATTR=NAME:MinimumCurrency CONTENT=25.00
TAG POS=1 TYPE=TD ATTR=TXT:Currency:<SP>$<SP>Units:
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:FormName ATTR=NAME:AlternateCode CONTENT=testcode{{!LOOP}}
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:FormName ATTR=ID:button_create_coupon_link
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:FormName ATTR=ID:button_save_changes
It takes about 2-3 seconds to create each coupon this way, I created 100 in about 3 minutes. One thing that you need to watch for is that coupons cannot have the same name or coupon code. Running the script as is would attempt to create duplicate coupons each time since the LOOP value would start at 1 each time you run the script. This could be overcome by using some other value for the coupon code and name such as the date and time. You could also change the coupon name and coupon code text each time you want to create a bunch of coupons.
I use imacros for many things that I have to do on a frequent basis such as updating my test stores, logging in to various sites etc. It is a remarkable tool for the fact that it is free to use. They have a commercial version of the product too but for what I do the free version is sufficient.