If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Help: custom voucher code module

Hi,

I am coding a voucher code module but im encountering some problems with CreateAccount() function.
1. The function of the module it to create a voucher code then saving those code to the remote database. The quantity of the voucher code depends on what the client enter in the configurable option named "Voucher Quantity".
2. However, the problem is that It is not saving at all to the database and no voucher code is generated. Also, I doubt the looping is correct also.

3. Some small help would be greatly appreciated.

Below is the custom function and createAccount() function:

PHP Code:

function voucher_ConfigOptions() {

# Should return an array of the module options for each product - maximum of 24