Vouchers

Vouchers are always a fine way of attracting new customers and bringing back existing customers. Shopware offers several types of vouchers. You can create a universal voucher code that could be used, for example, in various Facebook promotions or print advertisements. Alternatively, you could create customized vouchers for your newsletters. You can also use customized vouchers which can be automatically sent as a "thank you" or birthday gift.

Creating a voucher


To create a new voucher, go into Marketing/Vouchers in the backend and click on the Add button.

Voucher configurations

Fill out the Description (1) field with the name of the voucher.

In the Voucher code mode (2) selection box, you must decide whether the voucher will be General or Individual. Selecting General will generate one voucher code which will be available for all customers to use. Selecting Individual generates separate codes for individual customers. These voucher codes are perfectly suitable for use in newsletters.

If you are creating a General voucher, Number of vouchers (3) will determine how many times the voucher can be redeemed. If you are creating an Individual voucher, Number of vouchers (3) will determine how many individual codes, and thus vouchers, will be generated.

The Minimum charge (4) field contains the minimum purchase value that the customer must reach in order to redeem the voucher. The minimum charge must be greater than or equal to the voucher value.

Next, in the Discount (5) field, select Absolute if the voucher should deduct a specific amount, and Percentage if it should deduct a specific percentage.

The Free of shipping costs (6) box designates whether the voucher subtracts any shipping costs from this order.

Next, create an Order number (7), which will be displayed in the shopping cart and order confirmation. This will also be transferred to external merchandise management systems (MMS) for accounting purposes.

Please do not assign order numbers which are longer than 29 characters, otherwise the vouchers will not be handled correctly.

If you've decided to use a General voucher code, you can define the Code (8) with letters and numbers. This code will be used as the voucher code. Customers can redeem this voucher by entering the code in their shopping cart. You may enter as many digits as you wish for the code.

The Value (9) field defines the total amount of the deduction (whether absolute or as a percentage).

The Number of redeemable vouchers per customer (10) can be used to limit multiple uses of the voucher code by the same customer.
With the field Tax configuration (11) you define the tax rate of the voucher.

Tax configuration

Tax configuration (11) allows you to define the tax rate of the voucher. The following options are possible in the drop-down list:

  • Standard (uses the standard tax rate from your shopping cart)
  • Automatic (uses the highest tax rate from your shopping cart)
  • 19% / 7% (static VAT)
  • tax-free (voucher is tax-free)
     

    Restrictions

    Shopware offers a number of options to limit the functions of a voucher.
     


    You can offer your voucher for a limited time period by filling in the date fields Valid from (1) and Valid until (2)Notice, that until Shopware 5.2.7 the "valid until" means, that the voucher is invalid at this day. Since Shopware 5.2.8 the voucher is valid the whole "valid until"-day.

    Special voucher items can be selected by using the Restrict to items (3) field. You can select the specific products in the dropdown, additionally you also have the possibility to search here for product ordernumbers and productnames.

    The checkbox Restrict discount (4) can be used to limit the voucher to designated items or manufacturers.

    If you want to create a voucher for a special customer group or subshop, you need to select the customer group from the drop-down menu Restrict to customer group (5) or Restrict to subshop (6) respectively.

    A restricted manufacturer can be selected via the corresponding pull-down menu in the Restrict to manufacturer (7) field.
    If you have created customer streams (8), you can also restrict the voucher to these at this point.
     

    •  

    Individual Vouchers

    With an individual voucher, the fields "Code" and "Redeemable vouchers per customer" are omitted. All other fields, with the exception of "Number of vouchers", must be maintained in the same way as for a general voucher. The process does not differ in the input.

    In this case the field "Number of vouchers" determines how many individual vouchers should be generated. If you want to use the voucher for a newsletter, you should check in advance how many recipients the newsletter will have.

    After saving you can click on the tab "Individual coupon codes" on the button "Generate new codes". Shopware will then create a table with the corresponding coupon codes. This table can be downloaded as an Excel file via the button "Download Codes" and then processed further. The table also shows you, for example, how many codes have already been used and by which user (customer number).
     


    View of vouchers in Frontend

    View in cart

     

    View in checkout

    In standard the field for voucher codes is not shown during the checkout process. To enable it, go to basic settingsFrontendCheckout. There is an option called "Display further options".
     

    After that your customer is able to enter his voucher code at the end of the checkout.
     

    Send a birthday email including a voucher

    Shopware is able to send an email with birthday wishes via cronjob automatically. Optionally you can offer the recipient an individual voucher code as a birthday present. Make sure, that, if you assigned a birthday voucher for the email template, you have enough free voucher codes, otherwise the cronjob won't send the emails! Also keep in mind, that it's your choice to use the voucher code in the email template or not.

    The email with the birthday wishes is only send combined with a voucher code. If there are no voucher codes available the email will not be send.

    Basic configuration of the birthday voucher

    General settings for the voucher
     

    The voucher codes are set up in the backend at "Marketing > Vouchers". There you click on "Add". Now enter a Description (1), for example Your personal birthday voucher. As Order number (2) you have to enter the value birthday (lower case!). The Voucher code mode (3) has to be Individual.

    Next you have to enter the Number of vouchers, in our example we created a pool of 100 birthday voucher codes. Then enter the Value (5), e.g. 5. The discount can be set absolute (fix value) or percentage (depending on the order value) (6). In our example we offer the recipient a discount of 5 Euro as a fix value.

    If you want to charge tax, choose the desired Tax configuration (7) for the voucher. The voucher value will be subtracted if the Minimum charge (8) is reached. Keep in mind, that the minimum charge must be at least the same value as the vouchers value.(in our example at least 5).

    In our example we choose to not restrict the voucher. Now save your settings and switch to the tab Individual voucher codes.

    Individual voucher codes

    For making sure, that your voucher has enough codes for the desired number of usages, you have to create the codes now. Just click on Create new codes (1). There will be exactly as many codes generated as you selected previously in the configuration of the voucher.

    The email template gets the next unused code out of this pool and adds it to the mail.

    Number of voucher codes

    Basically relevant is the number of your customers / newsletter receivers and the interval in which you want to create new codes. If you have 500 customers and want to generate new voucher codes every year then you should generate at least 500 voucher codes.

    Email template

    You need the template "sBIRTHDAY" which you can find at Configuration > Email templates > System emails. The sender email as well as the sender name will be used from the system configuration by the given variable, but you can overwrite those values if you want to.

    In the plain text you can enter your desired text as well as the voucher code for the customer. For use dynamic content, feel free to use the available variables as a placeholder.

    Variables

    You can use the following receiver data:

    
    {$sConfig.?} (Access to all global sConfig-Variables possible)
    {$sVoucher.vouchercodeID}
    {$sVoucher.code}
    {$sUser.userID}
    {$sUser.company}
    {$sUser.department}
    {$sUser.salutation}
    {$sUser.customernumber}
    {$sUser.firstname}
    {$sUser.lastname}
    {$sUser.street}
    {$sUser.streetnumber}
    {$sUser.zipcode}
    {$sUser.city}
    {$sUser.phone}
    {$sUser.fax}
    {$sUser.countryID}
    {$sUser.ustid}
    {$sUser.text1}
    {$sUser.text2}
    {$sUser.text3}
    {$sUser.text4}
    {$sUser.text5}
    {$sUser.text6}
    {$sUser.email}
    {$sUser.paymentID}
    {$sUser.firstlogin}
    {$sUser.lastlogin}
    {$sUser.newsletter}
    {$sUser.affiliate}
    {$sUser.customergroup}
    {$sUser.language}
    {$sUser.subshopID}
    {$sData}
    

    Examples for an email template

    Email template in plain text

    
    Dear {$sUser.salutation} {$sUser.lastname},
     
    we wish you all the best for your birthday. 
     
    For your personal anniversary we thought of something special and send you your own birthday code you can easily redeem in your next order.
     
    Your personal birthday code is: {$sVoucher.code}
     
    Friendly greetings to {$sUser.city},
     
    Your team of {$sShop}
    

    Email template in html-format

    
    <p>Dear {$sUser.salutation} {$sUser.lastname},</p>
     
    <p><strong>we wish you all the best for your birthday. </strong></p>. For your personal anniversary we thought of something special and send you your own birthday code you can easily redeem in your next order in our <a href="{$sShopURL}" title="{$sShop}">online hop</a>.</p>
    <p><strong>Your personal birthday code is: <span style="text-decoration:underline;">{$sVoucher.code}</span></strong></p>
     
    <p>Friendly greetings to {$sUser.city},
     
    Your team of <a href="{$sShopURL}" title="{$sShop}">{$sShop}</a></p>
    

    Cronjob

    Which plugins do you need?

    The needed plugins just come with Shopware and can be found at Configuration > Plugin Manager. Just open the overview of the installed plugins and search for "cron" in the top right corner, so all available cron plugins are displayed.

    To make sure the birthday email can be send you have to make sure that the plugins Cron (1) and CronBirthday (2) are installed and activated. Only this way you can open and configure the cron settings in the basic settings.

    Install and activate those two plugins. Only if the plugins are listed at "Active plugins" they can be run correctly.

    Configuring CronBirthday

    At Configuration > Basic settings > System > Cronjobs you find the cron Geburtstagsgruß (1). By clicking the Edit pencil (2)the Details window (3) appears. 

    The birthday mail is only send if the date and time of the Next execution (4) has been reached. This time means the webserver time, so make sure your webserver has the right time synchronized. The interval for this cronjob should not be smaller than 86400 seconds (1 day), otherwise the cronjob could be sent multiple times.

    Sending of the birthday email

    You can start the cronjob execution by opening the following url in your browser: "backend/cron" or via shell using bin/console sw:cron:run. Further information regarding cronjobs can be found here.

    Was this article helpful?