User Tools

Site Tools


whmcs-gift_card_v2_installation

This document outline the basic installation, configuration and the basic usage of the WHMCS Gift Card Module v2.

The usage guide can be found here. http://wiki.codebox.ca/doku.php?id=whmcs-gift_card_v2_usage

Installation

File Uploads

Upload all the files in the modules folder to your WHMCS installation. modules/addons/giftcard & modules/servers/giftcard

Template Uploads

No template upload is needed

Language Uploads

The module includes English as the base language. If you wish to translate it to your own language. Make a copy of the english.php in /modules/addons/giftcard/lang/ to your associated language.

Configuration

Activation

Log into your WHMCS admin and enable the module by going to Setup → Addon Module → Gift Card Module Admin → Activate

Once activated, click on Configure and fill in the license key and make any settings adjustment.

Important!! If your WHMCS is less than version 7.2, then make sure you have selected the proper APIuser with API access.

WHMCS Product Setup

During the initial module activation, the wizard will create a new Product Group and Product (Product Placeholder) in your WHMCS install. Both of these are hidden by default and it does not need to be shown to your customers.

There are few things you would want to adjust before continuing.

  1. Update the Product groups (Gift Card Group) to only allow certain type of payment. This important as you don't want to allow fraud to happen with gift cards
  2. Updating the Product,

i) You may want to change the Product Name as this will be listed in the invoice item.

ii) Make sure the Welcome Email is matched with the Welcome email (Gift Card Available) the module had created during activation.

iii) Tax, on or off? Some countries require Gift cards to be taxed

iv) Pricing, leaving it as 0.00. They will be adjusted accordingly during checkout

v) Module Settings → Module Name → Gift Card Provision Module

If you have updated the name of product placeholder, make sure you go back to the Module Configuration in Setup → Addon Modules → Configure and update to the new Product name accordingly to the Generic Product ID dropdown

Note: The product and product is hidden because the module doesn't use the WHMCS system to checkout the order. However, it does use WHMCS's order system + API to manage the orders. Therefore, the Product Placeholder is needed for invoice iteming.

WHMCS Email Template Setup

The module will create the following two email templates into your WHMCS. Gift Card Available and Gift Card Sending Template

Template Description Useable Variable
Gift Card Available This template is used for the Welcome Email for the Product Placeholder
Gift Card Assigned This template is used when you Generate or Import Gift Card Codes in the Admin backend. This will send an notification email to your client that they had been assigned a new Card{$prefix}{$value}{$suffix}{$gc}
Gift Card Sending Template This template is used when your customer want to send out the gift card to their friends via email. {$prefix}{$value}{$suffix}{$gc}{$pm}

If you have updated the name of Gift Card Sending Template, make sure you go back to the Module Configuration in Setup → Addon Modules → Configure and update to the new name accordingly to the Send GC Template dropdown

Gift Card Listing

In order for the module to work in the front end, you must have at least one Gift Card available for purchase. To add a Card for sale, navigate to

Addons → Gift Card Module Admin → Card Management → Create New Listing

To understand what each option does, simply mouseover each option.

HTML codes: <p><br><b><strong><strike> can be used in the Card Description field

With our seamless template setup, there is no template modification needed. To enable the Gift Card menu in your navigation bar goto the Configuration of the Module and use the following options

Option Description
1) Display Gift Card in Service This adds a new link in the Services sub-menu in the default navigation bar
2) Display menu in navigation menu This will add a new Gift Card sub-menu into the navigation bar
3) Display My Gift Card This will display a My Gift Card link in the Gift Card sub-menu
4) Display Redemption LinkThis will display a Redemption link in the Gift Card sub-menu
5) Display Buy Gift Card This will display a Buy Gift Card in the Gift Card sub-menu
6) Search Sub Card This will display a Search Sub Card in the Gift Card sub-menu

If 2) is disabled, then 3-6 will not show up.

If you want to modify the links of these menu items, you can open and edit modules\addons\giftcard\hooks.php

Usage

Your WHMCS should now be ready to be used. Here are some basic usage

Generating and Importing Gift Card (Admin)

If you want to generate Cards for your customers to use. This is great for if you want to generate small amount of cards for promotion.

Navigate to

Addons → Gift Card Module Admin → Card Management → Generate Cards

You can specify if you want to generate or import to a specific client, client group or active/inactive client.

When importing, the quantity of your codes must match or greater than the total number of selected client group

When importing, only alphanumeric and - are allowed

Card Listing Management (Admin)

If you want to modify the your Listing line up, simply goto Card Management Tab

Hit Save when done.

Module Home (Admin)

Upon loading the Module home, you will be greeted with a basic overview of your card statuses.

Admin tools, Logs and Fraud Check (Admin)

The module includes comprehensive tools to let you manage your Cards efficiently.

Card Overview Tab

In this tab you have 4 tools available

1) Pending, 2) Approved, 3) Redeem, 4) Run Fraud Check

1-3 will list all the cards under those statuses.

The Fraud Check will allow you to check which customer have purchase gift cards in the last 7 days, 30 days, 6 months and year. (Sub cards are not counted)

Client Area

The frontend will require the client to be logged in to function. You may wish to enable your WHMCS to allow client registration in

Setup → General Settings → Other → Allow Client Registration

Frontend Workflow

The module work in this workflow

Flow URL
1) Client browse for gift card index.php?m=giftcard
2) Client add to cart index.php?m=giftcard
3) Client select quantity index.php?m=giftcard
4) Order added to WHMCS via API, client redirects to invoice pageindex.php?m=giftcard&action=checkout
5) Once order is paid, your WHMCS could automatically create/activate the cards (based on your Product Placeholder setting) or it will be in Pending Orders waiting on your action
6) Once the card is added to the system (Pending, Activated or Used), the client will be able to see it under their account index.php?m=giftcard&action=managegc or My Gift Cards under Services menu
7) Client will be able to manage the cards in either of the menus
8) Client will only be able to Redeem the cards when it's Activated, not used and not expired

Frontend Breakdown

The following is the associated page and the template mapping. The templates can be located in module/addons/giftcard/templates

Template function Template File Function
Checkout gcFoward,tpl, gcGeneral.tpl This is the checkout process
GC Listing and Cart gcIndex.tpl, gcIndexLogin.tpl. gcIndexOrder.tpl This is will show the gift card listing that is available for purchase
Manage GC gcManage.tpl This page serves as the gift card management
My Gift Cards gcMy.tpl This page will list all your purchased gift cards
My Sub Cards gcMysubcards.tpl This page will list all sub cards
Redemption Page gcRedeem.tpl This is the gift card redemption page
GC Split Form gcSplit.tpl This page is for splitting of the gift card
Sub Card Search gcSubsearch.tpl This page will allow your client to search for a sub card's origin. Will only work if the card is bought by the client

Error Codes

Error Code Solution
Warning Code: CP11 License error, please check your license
No matching Gift Card in the database, please create it manually This error relates to a missing Gift Card entry in the gift card table. You will need to create a new card, assign it to the user then update the Domain field under the Service tab.
whmcs-gift_card_v2_installation.txt · Last modified: 2018/03/21 00:58 by wiki