How to Create and Manage Gift Vouchers in OpenCart 2.0.x

Online gift vouchers are a great opportunity for online store owners to improve the benefits of their business. Recently conducted a survey about the “Rising popularity of digital gift cards”, where they have found out that nearly 70% of the interviewed customers are more interested in buying a digital gift voucher. This data shows that in the light of the omnichannel experience customers are looking for, providing digital gift vouchers is a perfect opportunity for improving the performance of their business.

Benefits for the retailer

The most obvious benefit is the increase of your income. The key aspect here is that unlike the plastic and paper gift vouchers, the digital one doesn't have any production costs. Combining this with the possibility of bringing new customers to your store is an opportunity worth exploring.

Adding up to the financial benefits is the fact that people who receive a gift card from your store are more likely to shop there even if it is their first time. Something more, in most cases they will spend with up to 40% more than the value of the gift card.

Let’s see how we can put this information in practice.

If you are an OpenCart store owner the gift voucher system is already available for you. It consists of two parts.

  1. Your customers should purchase a gift voucher
  2. The store admin should approve it and send it to the recipient.

Purchasing a gift voucher

When at the home page of the store head to the footer. Under Extras find the Gift Vouchers section and click on the link.


This will lead you to the page where you configure your voucher.

Purchase a Gift Certificate.png

The process is straight-forward and all you have to do is fill in the necessary information. If you are a registered customer the fields for “Your name” and “Your email” will be automatically filled with the information from your account. Here you can specify the theme of the voucher. There are three predefined themes “Birthday”, “Christmas” and “General”, but additionally, each store owner is able to add custom themes from the store administration (check 'Adding voucher theme' section below for more information).  Enter your personal message, specify the amount of the voucher and click “Continue”. 

After you have completed the previous step you will be taken to your shopping cart where you can complete your order.

Shopping Cart.png


Approving and sending the voucher from the admin panel.

After a gift voucher is purchased the store admin will receive a regular order for the amount of the voucher. In order to approve the voucher and generate the gift voucher itself, the admin should approve the order following the usual steps, but with one exception. At the final step, you have to set the order status as “Complete”.



After you click “Save” a gift voucher will be automatically generated. To send the voucher to the person, it is meant for, you need to go to the “Gift Voucher” section of your store.

From your “Dashboard” navigate to Sales -> Gift Vouchers  -> Gift Vouchers 


This will open a panel where you can manage your Gift Vouchers.

Gift Vouchers.png

This is the place where you can edit and send the vouchers that your customers have ordered. Alternatively OpenCart gives the store administrator the option to create a gift voucher manually. All you have to do is click the plus sign at the upper right corner. Choosing either of the options will open the voucher configuration page.

Gift Vouchers_edit.png

At this point, you can edit the voucher content, the sender and recipient emails, the message and theme, and the amount. Do not forget to “Enable” the voucher and click “Save”.

Now back to the main “Gift Vouchers” panel select the voucher you need to send and click the mail icon on the top right corner.

Gift Vouchers_send.png

That is it! The recipient has already received an email similar to this:



Adding a voucher theme

The OpenCart platform gives you the opportunity to add a custom voucher theme or edit the current ones. To do so, navigate to Sales -> Gift Vouchers  -> Voucher Themes

Voucher Themes.png


You will be presented with the list of the themes that currently exist. You can edit them or add a new one.

To edit a theme click on the “Edit” icon next to the theme you want to change. 



Choose the theme name and image and click “Save” at the upper right corner of the screen.

The process of adding a new theme is almost the same as editing one. Click on the plus sign at the upper right corner of the screen. You will be redirected to a new page.


Enter the name of your theme in the corresponding field, choose the desired image and click “Save”. Simple as that! 


If by some reason you are not able to send emails this could mean that the mail function responsible for that is not working correctly. If you are sure that this is your case here is a simple solution for this problem.

This will require a FTP connection to the directory where your OpenCart installation is. Once you have connected navigate to admin -> model -> sale -> voucher.php. Open the document and find the code between line 119 and 126.

$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
$mail->smtp_username = $this->config->get('config_mail_smtp_username');
$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
$mail->smtp_port = $this->config->get('config_mail_smtp_port');
$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');

replace the code on line 119 so it looks like this:

$mail = new Mail($this->config->get('config_mail'));

then comment the lines form line 120 to 126 so they look like the ones shown bellow:

/*$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
$mail->smtp_username = $this->config->get('config_mail_smtp_username');
$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
$mail->smtp_port = $this->config->get('config_mail_smtp_port');
$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');*/

Repeat this process for the code between lines 165 and 172 of the same document.

N.B. Note the /* sign at the beggining of line 120 and */ sign at the end of line 126.

This would solve the the problem related to the email sending.


Gift vouchers are a great way to improve your customer's satisfaction while boosting your income. With the holiday season just 2 months away this is a perfect opportunity to put what we have described above to proper use.

Join 11,000+ subscribers receiving actionable E-commerce advice

* Unsubscribe any time
comments powered by Disqus