diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ff8746..c157387 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [v3.1.0] - 2024-10-01 + +### Added +- New setting for configuring the filename of the invoice document in the order confirmation email + ## [v3.0.1] - 2024-09-28 ### Fixed @@ -88,6 +93,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - PDF file generated from order data with possibility to adjust some of the fields and regenerate the invoice file - Invoice generated in Shop's main language (if translation available) +[v3.1.0]: https://github.com/Fresh-Advance/Invoice/compare/v3.0.1...v3.1.0 [v3.0.1]: https://github.com/Fresh-Advance/Invoice/compare/v3.0.0...v3.0.1 [v3.0.0]: https://github.com/Fresh-Advance/Invoice/compare/v2.2.0...v3.0.0 [v2.2.0]: https://github.com/Fresh-Advance/Invoice/compare/v2.1.0...v2.2.0 diff --git a/README.md b/README.md index f3d0532..4613e72 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ * Invoice signer person * PDF Invoice file generated in shop Default language * Currently we have DE, EN and LT translations available. Feel free to add yours. +* PDF Invoice can be automatically generated and attached to order confirmation email + * Invoice filename configurable through settings * Total sum shown in words in the invoice. * Only Twig shop installations supported * Tested with: @@ -70,6 +72,16 @@ If so, create the file `var/configuration/shops/1/template_extension_chain.yaml` - oe_moduletemplate(please put your module id instead of the module template example) ``` +### More information you might need for the template + +The order variable in the template is the Order model object, so you can access all its fields and methods. + +Some examples you might need for achieving the desired result: + +* Customer number: {{ order.getOrderUser().getFieldData('oxcustnr') }} +* Payment method: {{ order.getPaymentType().oxpayments__oxdesc.value }} +* Order net sum: {{ order.getOrderNetSum() }} + ## License Please make sure you checked the License before using the module. License diff --git a/metadata.php b/metadata.php index 1fc9b29..b6b511a 100644 --- a/metadata.php +++ b/metadata.php @@ -22,7 +22,7 @@ 'en' => 'Invoice module for OXID eShop.', ], 'thumbnail' => 'logo.png', - 'version' => '3.0.1', + 'version' => '3.1.0', 'author' => 'Anton Fedurtsya', 'email' => 'anton@fedurtsya.com', 'url' => 'https://github.com/Fresh-Advance', @@ -114,6 +114,12 @@ 'type' => 'bool', 'value' => false ], + [ + 'group' => 'fa_invoice_emails', + 'name' => \FreshAdvance\Invoice\Settings\ModuleSettings::SETTING_INVOICE_ON_ORDER_EMAIL_FILENAME, + 'type' => 'str', + 'value' => 'invoice.pdf', + ], ], 'events' => [ 'onActivate' => '\FreshAdvance\Invoice\Transition\Core\Events::onActivate',