From dcb8ac8f7c85e0509ea36efa22215255eeb861c2 Mon Sep 17 00:00:00 2001 From: Matthias Zeis Date: Tue, 10 Oct 2017 21:41:21 +0200 Subject: [PATCH] Show missing increment ID field in preview tool (#19) --- .../Block/Adminhtml/Email/Preview.php | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/app/code/community/Hackathon/EmailPreview/Block/Adminhtml/Email/Preview.php b/app/code/community/Hackathon/EmailPreview/Block/Adminhtml/Email/Preview.php index 90b39e2..6d5a6e6 100644 --- a/app/code/community/Hackathon/EmailPreview/Block/Adminhtml/Email/Preview.php +++ b/app/code/community/Hackathon/EmailPreview/Block/Adminhtml/Email/Preview.php @@ -150,22 +150,46 @@ protected function _prepareForm() ->addFieldDependence( $incrementFields['invoice']->getName(), $templateTypeField->getName(), - 'test_sales_order_invoice_email_template' + array( + 'sales_email_invoice', + 'sales_email_invoice_comment', + 'sales_email_invoice_comment_guest', + 'sales_email_invoice_guest', + 'test_sales_order_invoice_email_template', + ) ) ->addFieldDependence( $incrementFields['creditmemo']->getName(), $templateTypeField->getName(), - 'test_sales_order_creditmemo_email_template' + array( + 'sales_email_creditmemo', + 'sales_email_creditmemo_comment', + 'sales_email_creditmemo_comment_guest', + 'sales_email_creditmemo_guest', + 'test_sales_order_creditmemo_email_template', + ) ) ->addFieldDependence( $incrementFields['order']->getName(), $templateTypeField->getName(), - 'test_sales_order_email_template' + array( + 'sales_email_order', + 'sales_email_order_comment', + 'sales_email_order_comment_guest', + 'sales_email_order_guest', + 'test_sales_order_email_template', + ) ) ->addFieldDependence( $incrementFields['shipment']->getName(), $templateTypeField->getName(), - 'test_sales_order_shipment_email_template' + array( + 'sales_email_order_shipment', + 'sales_email_order_shipment_comment', + 'sales_email_order_shipment_comment_guest', + 'sales_email_order_shipment_guest', + 'test_sales_order_shipment_email_template' + ) ); if (Mage::getEdition() === Mage::EDITION_ENTERPRISE) {