Predefined Gift Card Codes
CM Gift Card lets you use your own gift card codes, which helps you control which codes are available. For example, you can generate coupon codes in your e-commerce (shopping cart) application and import them into CM Gift Card. Once a gift card code is delivered to a customer, they can use it to buy your products in your e-commerce software right away.
You can open the Predefined Gift Card Codes section from Joomla!’s left menu.

To create a new code, click the New button on the toolbar.

Enter the code and set Status to Published if the code is ready to be given to a customer, or to Unpublished if you don’t want it to be used yet.
If you have a lot of gift card codes, you can use the import tool to create all of them automatically.
First, store your codes in a text file with the “txt” extension, for example my_codes.txt, with one code per line.
Make sure your codes all have the same length and use the same character types that you set in CM Gift Card’s configuration. For example:
- If you set the gift card code length to 5 in CM Gift Card’s configuration and a code in your file is
4KD01L(6 characters), it is converted to4KD01(5 characters). - If you set the gift card code type to
Latin alphabeticin CM Gift Card’s configuration and a code in your file is03P4FA(which has both letters and digits), it is converted to3PFA(letters only, digits removed). It is not imported if it ends up shorter than the configured gift card code length.
Any lowercase characters in your codes are converted to uppercase automatically.
Go to the Tools section in CM Gift Card, select your code file in the Import Gift Card Code section, and click the Upload & Import button.

After the file is uploaded, the codes are imported, and you see the result when the import process finishes. Any codes that were not imported may already exist on your site as predefined gift card codes or as purchased gift card codes.