For Joomla site i use RSFrom!Pro component to create forms. RSForm also has a payment plugin when you can create a small shopping cart. You can add a couple products with values and Total is calculated. This Total is passed to payment gateway (like paypal or else).
Its just my vision of how to implement this, if you see a better or easier way of doing that, but with same functionality, we can discuss.
I need to create a Discounts plugin for RSForm. I need to be able to generate discount codes which can be used only once or lots of times (depending on config). The main tasks whats need to be done:
1. In RSForm configuration window create tab - Discounts. Here must be a grid of all codes. Columns of this grid: Code, Start date, End date, Value, Quota, Used. This grid should be paged with all paging functionalities. There also should be a search option, so i can search entries.
2. Before the Search field i need a button: "Generate codes". When i push this button a popup window should appear with these fields:
a) Codes quantity (field for entering value);
b) Code type (drop-down with two selections: Random, Sequential);
c) Characters (drop-down: Letters and numbers, Letters, Numbers);
d) Code Length (field for entering value);
e) Discount type ((drop-down: Flat amount, Percentage) and field for entering value);
f) Start date (if not set, then valid forever);
g) End date (if not set, then valid forever);
h) Quota (Default -1, if 0 then unlimited);
i) Discount field ((2 fields: Form ID, Field Name) Here i will be telling plugin which field in in which Form is used for entering a discount code);
b,c,d is just like in Support ticket field in RSForm.
According to entered and selected values the codes must be generated and these codes must be seen in Discounts tab explained in part 1. All grid columns are clear only in Value column i need to see a Discount type value of code no-matter which type was selected. For example: i generated codes with flat amount set to €20, so in Value field i need to see 20,00 €. If i generated codes with Percentage set to 30%, so in Value field i need to see 30,00%.
3. Near the "Generate codes" button i need a new button - "Add code". This is similar functionality as in part 2, only i don't need any generation fields, i need to enter code manually with e,f,g,h,i.
4. Near the "Add code" button i need a new button - "Export". When i push this button all selected entires is exported to *.csv. If none is selected, then All entries are exported.
5. I need an ability to edit each code and after making adjustments save it.
6. I need to be able to delete selected entries.
7. All these fields must do what they says. For example if i set Quota to 1 and if someone wants to use it a second time, the message from language file must come and say that this code is already used.
8. If the discount code is applied it should recalculate a Total before submitting a Form and send this new sum to whatever payment gateway i'm using. If discount code makes Total zero, then no passing to payment gateway is needed and Thank you message of Form is displayed.
So i need a plugin installed from Joomla's installation extension as a separate plugin.
I will use it on different sites with different languages, so i can't give any logins, you should build it on your own site.
I also will need an invoice for these services.
All texts that i can see in backend of frontend must be in language file. Not hard-coded.