By default, each virtual gift card created on the site has the image provided by the plugin. This image can be changed both by administrator, during the creation of the “gift card” product, and by user, during the purchase. Let’s see how.
Site administrator can easily override the default image of the gift card in product edit page, by selecting the new image in “Choose image” field.
In the second instance, if no image has been selected, it will consider the product image that, if set, will replace the default one provided by the plugin.
To give users the possibility to set a customized image for the gift card they are purchasing, it is essential to enable “Custom image” in the general settings dashboard.
In this case, users could insert a customized image through the “Customize” button.
Users also have the possibility to select the image of the gift card in a gallery created and made available by the administrator. For further details read this post.
The logo inserted in the gift card can be changed and/or hidden by setting up the fields of the “Template” tab, in the plugin settings dashboard.
According to the style of the selected template, the position of the logo is different.
The plugin allows to insert and organize different gift card images in categories. The gallery could be available to users during the purchase of the gift card.
Let’s analyze all the essential steps to configure the gift card templates correctly.
First enable the “Enable photo gallery” option in the plugin settings panel. The option can be overridden from each product page.
Go to “Media > Gift Card Category” and insert all the categories of gift card templates you want to create.
Insert a new image in the “Media library” and edit it. Choose media “list” display mode to get a better overview of the “gift card categories”.
Select the category you want to associate with the image you have created.
Now users can select a template, using the “Choose design” button, they will see the templates you’ve made available.
A code will be associated to each gift card automatically, created based on the pattern previously set in YITH Plugins > Gift Cards > Code pattern.
Use ‘*’ as a placeholder that will be replaced by a random character. Leave blank for default pattern ‘****-****-****-****’.
The administrator can customize the pattern. For example, you can generate the codes with the pattern yith-****-**** where each “*” is replaced by an alphanumeric character. In this way, you will get the following codes:
If you are creating a new gift card from the backend, please make sure to insert a univocal code in conformity with the previously set pattern.
By default, the gift cards that have been created automatically will not have any expiration date.
If you want to change this behavior, go to plugin settings dashboard and set the validity of all gift card in the “Gift card expiration date” entry.
You must set the value by months. For example, if you want all the sold gift cards to expire in twelve months, you must set the value as 12.
The gift card expiration date is included in the email sent to the user.
This setting is not retroactive and will be applied only to the gift cards created after editing the expiration.
If you want to, once the gift card is created, the admin can however change the expiration date on the single gift card.
For all gift cards configured as a “virtual” product, coupon codes are sent to the user by email.
Email sending occurs as soon as the payment has been made, unless the user selected a specific date (during the purchase) for the delivery of the gift card.
Right inside the “Gift Cards” section, you can check the email status. The system will notify if the email has been sent correctly or if an error occurred.
In both cases the plugin allows you to resend the email.
You can also resend an email from the order details page, in this case the email will be resend for all the gift cards included in the order.
The email with coupon code will be sent to the recipient specified during the purchase.
By enabling the “BCC email” field(s) in the option dashboard, a copy of that email will also be sent to site administrator and/or buyers.
When a user places an order using the gift card, a notification email will be sent to the customer who previously bought that gift card.
You can enable the “Purchase notification” in the general settings page of the plugin.
The plugin adds two kinds of emails along with the WooCommerce default ones:
- Dispatch the coupon: send the digital gift card to the email address selected during the purchase
- Notification: an email sent to the customer when the purchased gift card has been used
Just like for any WooCommerce email, you can enable, disable or edit some of their settings from WooCommerce -> Settings -> Emails.
How to override email templates?
Dispatch the coupon
To override and edit this email template, copy
yith-woocommerce-gift-cards-premium/templates/emails/send-gift-card.php to your theme folder:
To override and edit this email template, copy
yith-woocommerce-gift-cards-premium/templates/emails/notify-customer.php to your theme folder:
By enabling the “Attach PDF” option, a pdf file will be attached to the gift card code email, so the users are able to download the gift card.
The user will find the PDF of the gift card template in the email as an attachment.
You can override from your theme all the templates that you can find in the plugin “templates” folder.
To override the template from your theme, copy the file you want to change and paste it in the theme woocommerce folder (create one if not already available.
If the file you want to override is in a sub-section of the plugin templates folder, make sure of recreating the same structure in the theme woocommerce folder.
Let’s make an example.
Suppose that we want to override the my-giftcards.php template.
The file is within the plugin in templates -> myaccount.
To override the file, you need to recreate the same structure within your theme and paste the file in the woocommerce -> myaccount path.