Gift Voucher Changelog

Gift Voucher 2.x is on version 2.5.9, released on Mar 29, 2021

  • theicons.co/svg/photo-09 Created with Sketch. 37 New features
  • theicons.co/svg/others-47 Created with Sketch. 17 Improvements
  • theicons.co/svg/home-36 Created with Sketch. 75 Bug fixes

2.5.9 - Latest Release

Released Mar 29, 2021

  • theicons.co/svg/photo-09 Created with Sketch.

    Add bulk voucher code generation page. (thanks @jerome2710).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add EVENT_MODIFY_RENDER_OPTIONS event for modifying the DomPDF options during render.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix incorrectly using fieldLayoutId for plugin settings, when fetching Codes’ field layouts. This could lead to some installs not generating voucher codes correctly upon checkout.

2.5.8

Released Feb 13, 2021

  • theicons.co/svg/photo-09 Created with Sketch.

    Add promotable and availableForPurchase options to vouchers.

2.5.7

Released Jan 22, 2021

  • theicons.co/svg/home-36 Created with Sketch.

    Fix gift vouchers attaching to emails, even when disabled.

  • theicons.co/svg/home-36 Created with Sketch.

    Change logging from error to info when an order doesn’t contain a gift voucher.

2.5.6

Released Dec 12, 2020

  • theicons.co/svg/photo-09 Created with Sketch.

    Add more logging around post-checkout functionality.

  • theicons.co/svg/others-47 Created with Sketch.

    Post-checkout functionality is now performed on EVENT_AFTER_COMPLETE_ORDER rather than EVENT_BEFORE_COMPLETE_ORDER.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix permission translation error.

2.5.5

Released Nov 26, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Ensure critical errors are logged during the order complete event.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix critical errors preventing orders from completing correctly.

2.5.4

Released Nov 07, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix potential error with isVoucher and line item purchasables.

2.5.3

Released Nov 06, 2020

  • theicons.co/svg/photo-09 Created with Sketch.

    Add support to apply gift voucher from the control panel, when editing an incomplete order.

  • theicons.co/svg/photo-09 Created with Sketch.

    Add ability to attach gift voucher PDFs to Commerce emails.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix an error when no code is found when applying voucher codes.

2.5.2

Released Oct 08, 2020

  • theicons.co/svg/others-47 Created with Sketch.

    Custom fields are no longer serialized in the snapshot of a voucher. Please use EVENT_AFTER_CAPTURE_VOUCHER_SNAPSHOT and EVENT_BEFORE_CAPTURE_VOUCHER_SNAPSHOT events to opt-in any custom fields you want serialized in the snapshot. This follows Commerce's behaviour.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix incorrectly serializing Super Table queries when taking a snapshot of Gift Vouchers when adding to the cart.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix EVENT_AFTER_CAPTURE_VOUCHER_SNAPSHOT event not actually doing much.

  • theicons.co/svg/home-36 Created with Sketch.

    Prevent code field layout ID from being creating multiple times when saving plugin settings.

2.5.1

Released Sep 18, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix a potential security vulnerability where the last-created voucher could be redeemed by any user.

  • theicons.co/svg/home-36 Created with Sketch.

    Replace hard coded currency with order currency. (thanks @yingban).

2.5.0

Released Aug 31, 2020

  • theicons.co/svg/photo-09 Created with Sketch.

    Add support for Craft 3.5 field designer for code elements.

  • theicons.co/svg/photo-09 Created with Sketch.

    Add support for Craft 3.5 field designer for voucher elements.

  • theicons.co/svg/others-47 Created with Sketch.

    Now requires Craft 3.5+.

  • theicons.co/svg/others-47 Created with Sketch.

    Now requires Craft Commerce 3.2+.

2.4.3

Released Aug 20, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix getEditableVoucherTypeIds not returning correctly.

2.4.2.1

Released Jul 30, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix ErrorException from undefined variable uid. (thanks @jmauzyk).

2.4.2

Released Jul 29, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix voucher site dropdown not working for multi-sites.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix share and preview button alignment for vouchers.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix live preview not working for vouchers.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix save-as-new-voucher not working correctly.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix voucher permissions to use UID instead of ID.

2.4.1

Released Jun 22, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Add migration for potentially missing code field layout.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix usage of deprecated saleAmount.

  • theicons.co/svg/home-36 Created with Sketch.

    Return cart errors for ajax-applying of voucher codes.

2.4.0

Released Jun 18, 2020

  • theicons.co/svg/others-47 Created with Sketch.

    Removed fieldsPath config setting. If you are using this setting for adding custom field content to your voucher codes, please update your templates. Use input type="text" name="options[fieldHandle]" instead of input type="text" name="options[<fieldsPath>][fieldHandle]".

2.3.1

Released Jun 15, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix potential error when trying to save a voucher code without an amount.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix incorrect handling for code field layout.

2.3.0

Released May 10, 2020

  • theicons.co/svg/photo-09 Created with Sketch.

    Add project config support for voucher types.

  • theicons.co/svg/home-36 Created with Sketch.

    Check to ensure Klaviyo Connect plugin is installed before doing any more checks. (thanks @brianjhanson)

2.2.4

Released Apr 16, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix logging error Call to undefined method setFileLogging().

2.2.3

Released Apr 15, 2020

  • theicons.co/svg/others-47 Created with Sketch.

    File logging now checks if the overall Craft app uses file logging.

  • theicons.co/svg/others-47 Created with Sketch.

    Log files now only include GET and POST additional variables.

  • theicons.co/svg/home-36 Created with Sketch.

    Only allow editing of voucher types if editable.

2.2.2

Released Mar 16, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix order and voucher columns showing incorrect values in the voucher codes element index.

  • theicons.co/svg/home-36 Created with Sketch.

    Add “Original Amount” to voucher codes element index.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix currency symbol in voucher codes element index in some cases.

2.2.1

Released Feb 13, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix missing order properties for PDFs generated in CP. (thanks @jmauzyk).

  • theicons.co/svg/home-36 Created with Sketch.

    Fix populateLineItem to work with Commerce 3.x.

2.2.0

Released Jan 29, 2020

  • theicons.co/svg/photo-09 Created with Sketch.

    Craft 3.4 compatibility.

  • theicons.co/svg/photo-09 Created with Sketch.

    Commerce 3.0 compatibility.

2.1.2

Released Jan 09, 2020

  • theicons.co/svg/home-36 Created with Sketch.

    Fix registerAdjuster = afterTax not working correctly.

2.1.1

Released Jan 09, 2020

  • theicons.co/svg/photo-09 Created with Sketch.

    Add registerAdjuster plugin setting to control when the adjuster should be applied. Valid options are beforeTax (default) and afterTax.

2.1.0

Released Jan 04, 2020

  • theicons.co/svg/photo-09 Created with Sketch.

    Add the ability to set field layouts for Voucher Codes. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add a field layout designer to the settings for Voucher Codes. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add an event PopulateCodeFromLineItemEvent to set additional fields/properties when a new Code is created based on a Voucher/LineItem. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add an event to validate LineItem options for custom fields in the Code. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add a migration to include an initial empty content record for all existing Voucher Codes. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add a new setting fieldsPath that represents the path of custom fields in the LineItems options. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add additional Tabs for custom fields in the Voucher Code if there are any. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add a component codeStorage for storing and receiving codes that are used. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add an interface for codeStorage and the possibility to use custom classes/components. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add a class Session for storing the used codes for an order in the session. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add a class Order for storing the used codes for an order in the field layout in a Codes field. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add a new Code relation field type. (thanks @Anubarak).

  • theicons.co/svg/photo-09 Created with Sketch.

    Add template hook cp.gift-voucher.voucher.edit.details (thanks @samuelbirch).

  • theicons.co/svg/others-47 Created with Sketch.

    All codeKeys are now grabbed via GiftVoucher::getInstance()->getCodeStorage()->getCodeKeys($order);. (thanks @Anubarak).

  • theicons.co/svg/others-47 Created with Sketch.

    All codeKeys are now set via GiftVoucher::getInstance()->getCodeStorage()->set($codeKeys, $order); or the add or remove function.

  • theicons.co/svg/others-47 Created with Sketch.

    This will make sure you can add a VoucherCode in the CP. (thanks @Anubarak).

  • theicons.co/svg/others-47 Created with Sketch.

    Use a custom controller to store the plugins settings ensuring the new Field Layout setting is stored properly. (thanks @Anubarak).

  • theicons.co/svg/home-36 Created with Sketch.

    Fixed minor session issue. (thanks @Anubarak).

  • theicons.co/svg/home-36 Created with Sketch.

    Display inactive Vouchers in the CP. (thanks @Anubarak).

  • theicons.co/svg/home-36 Created with Sketch.

    Fixed a Bug that could occur when re-saving an order via job, Craft already closes the session before running the job -> the adjuster has no valid session. (thanks @Anubarak).

  • theicons.co/svg/home-36 Created with Sketch.

    Fix missing date columns in code element index.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix voucher discount being applied after tax.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix incorrect multi-site URL redirection when switching sites for a voucher.

2.0.13

Released Aug 25, 2019

  • theicons.co/svg/home-36 Created with Sketch.

    Fix incorrect migration.

2.0.12.1

Released Aug 25, 2019

  • theicons.co/svg/home-36 Created with Sketch.

    Fix namespacing issue.

2.0.12

Released Aug 25, 2019

  • theicons.co/svg/photo-09 Created with Sketch.

    Add support for Klaviyo Connect plugin.

  • theicons.co/svg/photo-09 Created with Sketch.

    Add support for Commerce 3.

  • theicons.co/svg/others-47 Created with Sketch.

    Adjust template functions vouchers() and codes() to allow criteria as params.

  • theicons.co/svg/home-36 Created with Sketch.

    Incorrect permission for voucher types.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix anonymous requests to gift voucher previewing.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix missing Commerce requirement.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix missing expiryDate column.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix voucher search indexes.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix lack of registering Code as an element type.

  • theicons.co/svg/home-36 Created with Sketch.

    Add codeKey to searchable attributes.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix legacy codes (from Craft 2) not correctly being elements.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix lack of integrity constraint on codes.

2.0.11

Released Jun 01, 2019

  • theicons.co/svg/photo-09 Created with Sketch.

    Add override notice for settings fields.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix missing sku and price query params.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix error in element HUD.

2.0.10

Released Feb 27, 2019

  • theicons.co/svg/home-36 Created with Sketch.

    Fix multiple tabs for voucher types not showing.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix “New voucher” layout issue when switching voucher types

2.0.9

Released Feb 19, 2019

  • theicons.co/svg/photo-09 Created with Sketch.

    Added “Don’t allow voucher codes to be used if discounts are applied on the order”. By default, discount codes and voucher codes can be applied to an order together, which may not always be desired. This setting honours the "Don’t apply subsequent discounts if this discount is applied" for discounts.

2.0.8

Released Feb 17, 2019

  • theicons.co/svg/home-36 Created with Sketch.

    Fix migration issue from Craft 2 to Craft 3.

2.0.7

Released Dec 26, 2018

  • theicons.co/svg/home-36 Created with Sketch.

    Include translation of Adjuster description. Thanks (@Anubarak).

  • theicons.co/svg/home-36 Created with Sketch.

    Set the codeKey to the element after storing the record to use it directly after the Code is created. Thanks (@Anubarak).

  • theicons.co/svg/home-36 Created with Sketch.

    Add PDF config settings, rather than from Commerce.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix PDF paper orientation and size not changing from defaults.

  • theicons.co/svg/home-36 Created with Sketch.

    Bring back missing format and attach params for PDF.

2.0.6

Released Dec 14, 2018

  • theicons.co/svg/others-47 Created with Sketch.

    Use beforeCompleteOrder as the event to generate codes, ensuring they can be used in emails.

2.0.5

Released Dec 14, 2018

  • theicons.co/svg/photo-09 Created with Sketch.

    Add afterVoucherAdjustmentsCreated.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix querying codes by voucherId not working.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix codes not being generated correctly after checkout completion.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix redemptions not being generated correctly after checkout completion.

2.0.4

Released Dec 01, 2018

  • theicons.co/svg/photo-09 Created with Sketch.

    Add beforeCaptureVoucherSnapshot and afterCaptureVoucherSnapshot.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix permissions for vouchers and codes.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix error occuring when installing plugin via command line

2.0.3

Released Nov 10, 2018

  • theicons.co/svg/photo-09 Created with Sketch.

    Allow PDFs to be generated for single voucher codes.

  • theicons.co/svg/photo-09 Created with Sketch.

    Add type to snapshot data.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix Gift Voucher element field name.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix error when deleting a voucher.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix querying by voucherId on a code.

  • theicons.co/svg/home-36 Created with Sketch.

    Fix error when querying and saving vouchers.

2.0.2

Released Oct 26, 2018

  • theicons.co/svg/photo-09 Created with Sketch.

    Add product method for voucher for easy commerce compatibility

  • theicons.co/svg/photo-09 Created with Sketch.

    Add field data to line item snapshot

  • theicons.co/svg/others-47 Created with Sketch.

    Codes are now generated after the order is paid, instead of when complete

  • theicons.co/svg/others-47 Created with Sketch.

    Bring back getPdfUrl() and getOrderPdfUrl()

  • theicons.co/svg/home-36 Created with Sketch.

    Fix welcome redirect

  • theicons.co/svg/home-36 Created with Sketch.

    Fix empty strings being able to validate vouchers (oops)

2.0.1

Released Oct 18, 2018

  • theicons.co/svg/home-36 Created with Sketch.

    Fixed some deprecation notices

  • theicons.co/svg/home-36 Created with Sketch.

    Fix redemption error for new codes

1.0.1

Released Jan 17, 2017

  • theicons.co/svg/photo-09 Created with Sketch.

    Redeeming multiple vouchers.

  • theicons.co/svg/photo-09 Created with Sketch.

    Added possibility to return Ajax in frontend controller.

  • theicons.co/svg/others-47 Created with Sketch.

    Redeemed code managing.

  • theicons.co/svg/others-47 Created with Sketch.

    Change DiscountAdjuster order to apply after tax discount.

  • theicons.co/svg/home-36 Created with Sketch.

    Adjuster showing proper discount amount.

Get started with Gift Voucher

Available for Craft 3. Get it from the plugin store.