Gift cards are a useful addition to every e-commerce website. They are frequently used on e-commerce websites with any assortment: online grocery stores, fashion outlets, sporting equipment websites, etc. Most e-commerce platforms let you use gift cards, and Magento is no exception. In the following article, we explore Magento 2 gift cards. You will learn the platform’s gift card workflow. We focus on the available Magento gift card types, shed light on the Magento 2 gift card product, and explore the import and export nuances associated with this entity. You will learn how to import gift cards to Magento 2 using the platform’s default instruments. After that, we provide a more user-friendly and flexible solution to the Magento 2 gift card import and export. Of course, all the Magento gift card attributes are explained below. And if you think that the default gift card functionality is not enough, please, check our list of top Magento 2 gift card extensions.
There are three types of gift cards in Magento 2: virtual, physical, and combined. Let’s say a few words about each one.
Magento 2 Virtual Gift Card
A standard virtual gift card is emailed to a recipient. As its buyer, you can add an optional message addressed to your special someone. Next, the card can be redeemed on the website where it was purchased.
Magento 2 Physical Gift Card
In the case of a physical gift card, it is packaged in a custom art mailer and sent at no charge to a specified recipient – a buyer’s special someone. There are several options for how a physical gift card can be redeemed:
in-store;
by phone;
on website.
And like virtual gift cards, physical ones can have an expiration date customized.
Magento 2 Combined Gift Card
In Magento 2, a combined gift card is a product that exists as virtual and physical gift cards at the same time, sharing their features and functionalities.
Magento 2 Gift Card Workflow
Below, we explore the Magento 2 gift card workflow from the perspective of both a customer and an administrator.
The Customer Side
Let’s explore a workflow associated with gift cards in Magento 2 that your store visitors experience.
The functionality of gift cards often resembles coupons. And while a coupon is applied to an order as a discount, a gift card is redeemed reducing a cart’s order total. As a buyer, you get the corresponding option in a cart and during the checkout, where Magento 2 lets you enter a gift card code to apply an amount from the card to the purchase. Magento 2 lets you use both single and multiple gift cards to pay for the whole purchase or its parts.
It is also possible to use multiple gift cards to pay for a purchase in Magento 2. Then, the amounts are applied in ascending order: a card with the smallest remaining balance is used first. The cards are utilized until a customer runs out of them or the grand total is zero. In the latter case, the last gift card account applied to the cart receives a partial deduction.
When a purchase involving a Magento gift card is made, a customer can proceed to their account to see the status and remaining balance of the gift cards. Magento gift card stats are also displayed there.
You can view the relation of gift cards and orders, including the date of the purchase, the amount redeemed from the fifth card, and the order’s number.
Gift Card Values
As a customer, you can determine the value of a gift card on a product page or choose an amount from a list of price options if it is available. The appearance of a gift card product page and the values displayed there depend on backend settings. Also, note that all amounts appear in a currency that you use on your e-commerce website.
Gift Card Information
Next, it is necessary to complete the gift card information. Enter both the Sender’s and the Recipient’s names and emails. If you are a registered logged-in customer, the Sender Name and Sender Email fields are completed automatically. Depending on the configuration, it is also possible to enter a message to your recipient.
Gift Card as Product
When you purchase a gift card, it appears as a line item in the cart with various details. For instance, you can see the name of the sender and recipient as well as the aforementioned message if applicable. Also, note that Magento 2 converts the amount associated with the gift card to the base currency of the store.
From a recipient side, virtual or combined gift cards are sent via email with the gift card code, name of the sender, and message, if there is one. If a buyer purchases more than one gift card, all of them are attached to a single email.
In the case of physical gift cards, there are two options: a card can be shipped either directly to the recipient or the customer who made the purchase. As a customer, you can write a message on it and then personally deliver the gift card to the recipient.
The Admin Side
As a Magento 2 administrator, you can view all gift card codes applied by customers. In the Admin section, open the order to see the necessary information. Besides, you can find some additional control options there. For instance, it is possible to retrieve the code to place it on a physical gift card.
In case a gift card order is canceled or refunded, it is necessary to cancel the associated gift card account manually. Magento 2 provides the following two options: deletion or deactivation.
That’s how everything works for Magento 2 Commerce gift cards. Now, we can tell a few more words about their import and export.
8 Steps to Create a Gift Card Product in Magento 2
Now, let’s see how to create a Magento 2 gift card product in your admin. Although we focus on the basics, you can complete the other product settings if necessary.
So, follow these steps to create a Magento 2 gift card:
Go to Admin -> Catalog -> Products, click Add Product, and chooseGift Card.
Choose the attribute set. By default, there is the Gift Card attribute set available in the dropdown of the Attribute Set field.
Complete other required settings, such as a Product Name, SKU, and Card Type.
Now, you need to specify a gift card amount. Magento 2 offers a couple of options:
– Click Add Amount and enter a fixed value to offer a fixed amount.
– Repeat the previous step to provide the selection of fixed amounts.
– Set Open Amount to Yes and define the range of minimum and maximum acceptable values to give customers the ability to set the value of the gift card.
Complete the basic settings, such as theQuantityin stock for physical or combined Magento gift cards. Choose Gift Card in the Categories field.
Scroll down to the Gift Card Information section, and configure the following parameters:
– Treat Balance as Store Credit – decide whether the gift card holder can redeem its balance as a store credit;
– Lifetime – choose the number of days after purchase until the gift card expires. Leave this field blank to set no expiration;
– Allow Message – let the gift card buyer enter a message for the recipient;
– Email Template – specify an email template used in the notification sent to the gift card recipient.
Complete the product information in other sections, such as Content or Related Products.
If you are ready to publish your brand new Magento 2 gift card product, set the Enable Product switch to Yes and clickSave in the upper-right corner.
How to Import Magento 2 Gift Cards: Default & Improved Ways
Magento 2 gift cards are considered an additional product type. It means that gift cards are products, and you can import and export them as the Products entity. If you have ever exported or imported products to Magento 2 it will be very easy for you to master the gift card import. Gift cards share the same attributes with other products except for the additional_attributes column. It stores ALL the gift card properties.
The additional_attributes Column
Thatadditional_attributes column contains a combined value that consists of all gift card attributes, separated by a comma without spaces:
We explain each attribute in a corresponding chapter below. Now, let’s suppose that you’ve composed your Magento 2 Gift Card CSV and are ready to import it. Here is the general product import workflow to follow:
In Magento 2 admin, go to “System -> Import.”
Select “Products” from “Entity Type”.
Select an import behavior option: Add/Update, Replace, or Delete:
Choose your CSV file with Magento 2 gift cards. Use the “Select File to Import” option and then click “Check Data”. If the data is correct, start importing gift cards to Magento 2!
Improved Magento 2 Gift Card Import
As for the Improved Import and Export extension, it introduces a better way to import gift cards. We have split the additional_attributes columns and extracted all gift card attributes into separate columns. This makes the gift card import much easier because instead of composing a complex value for the additional_attributes column, you can take advantage of the separate columns with simple values. We focus on the enhanced Magento 2 Gift Card CSV below. Now, let’s look at the improved import procedure.
Follow these steps to import Magento 2 gift cards:
Go to System -> Improved Import / Export -> Import Jobs and click the Add New Job button.
Configure General Settings, where you can automate the Magento 2 import of gift cards.
Proceed to the Import Settings section and select Products among the options of the Entity drop-down.
Now, you need to select your import behavior. ChooseAdd/Updateto add new gift cards and update the existing ones. Also, you can configure separators in this section.
Now, select a file type and data source. You can also configure a bunch of other parameters.
Save the job, and run the Magento 2 import of gift cards.
Allow Message setting of the gift card. Defines if customers can send a custom message text with the gift card.
Available values:
1– enabled
0– disabled
1
email_template
Email Template setting of the Gift Card Information. Defines the email template that will be used with the gift card.
Must contain the Template Name of the email template you want to use.
giftcard_email_template
giftcard_type
Defines the type of the gift card.
Available values:
Virtual
Physical
Combined
Virtual
is_redeemable
Treat Balance as Store Credit setting of the Gift Card Information. Defines if the gift card balance can be redeemed as a store credit.
Available values:
1– yes
0– no
1
lifetime
Lifetime (days) setting of the Gift Card Information. Defines for how many days the gift card should be valid at the store.
Can only contain numerals
123
open_amount_max
Open Amount To. Defines the maximal value of the gift card’s open amount.
Can only contain numerals
123
open_amount_min
Open Amount From. Defines the minimal value of the gift card’s open amount.
Can only contain numerals
12
use_config_allow_message
Defines if the Allow Message setting of the gift card should use the default store value
Available values:
0– no
1– use default
0
use_config_email_template
Defines if the Email Template setting of the gift card should use the default store value
Available values:
0– no
1– use default
0
use_config_is_redeemable
Defines if Treat Balance as Store Credit setting of the gift card should use default store value
Available values:
0– no
1– use default
1
use_config_lifetime
Defines if the Lifetime (days) setting of the gift card, should use the default store value
Available values:
0– no
1– use default
0
giftcard_amount
Amount of the gift card. Can store multiple values separated by a comma.
Can only contain numerals separated by a comma, without spaces.
10.0000,20.0000,30.0000
giftcard_allow_open_amount
The Open Amount setting of the gift card. Defines if customers can manually define the amount of the gift card they want to purchase.
Available values are:
1– open amount
0– only store administrator-specified amounts
1
As you can see, if gift card attributes are separated between different columns, it’s much easier to understand, edit, and compose them. Then Magento 2 import of gift cards becomes more straightforward.
How to Export Magento 2 Gift Cards
Now, let’s explore the two ways of exporting gift card products from Magento 2: the default approach and the enhanced workflow.
Default Export
Follow these intuitive steps to export Magento 2 gift cards:
First of all, you should go to “System -> Export”
Then, it is necessary to select “Products” on the “Entity” dropdown.
Now, you can set up filters to export only gift cards. If your gift cards are associated with a particular category, use it as a filter. Otherwise, you will export gift cards along with all other products.
Click “Continue”
Get your formatted csv files with Magento 2 gift card products and the additional_attributes column.
Enhanced Export
Follow these steps to export product reviews from Magento 2 and get all gift card attributes split between columns:
Proceed to System > Improved Import/Export > Export jobs and click the ‘Add New Job’ button.
In theGeneral Settings, specify the job name and set the job schedule to export gift cards from Magento 2 automatically.
Below the General Settings, you will find the Export Settings section. It’s where you should choose Products as your export entity.
In the Export Behavior, you decide on the file format and separators. Our extension lets you export gift cards from Magento 2 not only as CSV files but also in numerous other file formats.
In the Export Source configuration section, you select the export source for your gift cards, such as File, Google Sheets, Dropbox, FTP, URL, etc. The most common way is to specify the path to the file where the data should be exported. Your Magento 2 gift card CSV is created automatically and can be downloaded right from the export job screen after the export is complete.
Also, you need to apply filters to modify Magento’s product export output so that only gift cards are exported:
– Proceed to the Filters section;
– Select Products as your Entity;
– Choose Product Type in Field;
– Select Gift Cards in Filters.
Finish the configuration and run the export process.
Magento 2 gift cards are an integral part of many e-commerce websites. They not only improve the customer experience but also help increase sales. As a buyer, you can easily get what you want due to the intuitive interface of a gift card product page. As a receiver, you can easily spend your gift card on new purchases. And as a store admin, you can easily configure gift cards or import them with the help of the platform’s default instruments. However, if you don’t want to deal with the complexity of the additional_attributes column, pay attention to the Improved Import & Export extension. It can help you split gift card attributes between different columns making the import process more user-friendly. Also, you can import and export Magento 2 gift cards via different file formats and between a variety of file sources. Adobe Commerce import and export of gift cards are possible, too. For further information about the enhanced Magento 2 gift card import-export opportunities, follow the link below and contact our support: