Kowal_CheckoutComment dodaje pole komentarza klienta w checkout Magento 2, zapisuje wartość w quote i order, udostępnia ją w siatce zamówień w panelu administracyjnym oraz wstrzykuje do zmiennych szablonów e-mail jako order_comment.
afterMethods) przez plugin LayoutProcessor.Magento_Checkout/js/action/place-order, aby przekazać checkout_comment do payment extension attributes.Magento\Quote\Api\Data\PaymentInterfaceMagento\Quote\Api\Data\CartInterfaceMagento\Sales\Api\Data\OrderInterfacequote przez pluginy na:
Magento\Quote\Api\PaymentMethodManagementInterface::savePaymentInformationAndPlaceOrderMagento\Quote\Model\PaymentMethodManagement::setMagento\Quote\Model\QuoteRepository::savequote do order w observerze eventu sales_model_service_quote_submit_before.checkout_comment w DB (declarative schema) dla:
quotesales_ordersales_order_gridsales_order_grid.checkout_comment z sales_order.order_comment do maili zamówień przez pluginy na SenderBuilder, TransportBuilder i TransportBuilderByStore.checkout_comment/general/all_frontend_comments.* = in production please use the --keep-generated option
Add the composer repository to the configuration:
composer config repositories.checkout.comment vcs https://github.com/kowalco/magento-2-checkout-comment
Add an access token for the private GitLab repository:
composer config --global --auth github-oauth.github.com <YOUR_TOKEN>
Install the module using Composer:
composer require kowal/module-checkoutcomment
Enable the module:
php bin/magento module:enable Kowal_CheckoutComment
Apply database updates:
php bin/magento setup:upgrade
Flush the cache:
php bin/magento cache:flush
Stores > Configuration > kowal > Checkout Comment (section id: checkout_comment, group: general).checkout_comment/general/enable (Yes/No)checkout_comment/general/all_frontend_comments (Yes/No)system.xml: default, website, store view (wszystkie aktywne).ScopeInterface::SCOPE_STORE).etc/config.xml):
enable = 1all_frontend_comments = 0etc/adminhtml/menu.xml (w tym parent pod Kowal_Base::kowal_modules).Kowal_CheckoutComment::config, ::root, ::general), ale lokalnie nie dostarcza etc/acl.xml.php bin/magento setup:upgrade dla declarative schema i wykonania data patch.php bin/magento setup:di:compile w trybie produkcyjnym (pluginy, extension attributes, interceptory).view/frontend.config, layout, block_html, FPC zależnie od polityki).Checkout Comment.order_comment jest dostępna (snippet jest podany w sekcji Configuration w README).Kowal_CheckoutComment).setup:upgrade zakończony powodzeniem.quote, sales_order, sales_order_grid.AddCheckoutCommentToGrid został zastosowany.kowal/base obecna i aktywna.composer installphp bin/magento module:enable Kowal_CheckoutComment (jeśli nie jest pre-enabled)php bin/magento setup:upgradephp bin/magento setup:di:compile (produkcja)php bin/magento setup:static-content:deploy (produkcja)php bin/magento cache:flushsetup:upgrade, odświeżenie cache) zgodnie ze stanem docelowym.kowal/base.Magento_Checkout.order_comment po stronie template; moduł tylko wstrzykuje zmienną.Observer/Frontend/Checkout/SubmitAllAfter.php istnieje, ale nie jest podpięty w etc/events.xml.db_schema.xml), jak i logikę data patch dotyczącą gridu.type: magento2-module).Tak. README zawiera wyłącznie ścieżkę instalacji Composer.
system.xml udostępnia default/website/store view. Odczyty runtime są wykonywane w scope store.
Nie znaleziono etc/acl.xml w tym module.
Nie znaleziono definicji custom cron/queue/indexer.
Tak: