Skip to content

CET-579/feat: Multiple invoice email support#62

Merged
SalmanTwo merged 4 commits intomainfrom
shabib/cet-579-adding-support-for-multiple-invoice-emails-in-magento
Jan 29, 2025
Merged

CET-579/feat: Multiple invoice email support#62
SalmanTwo merged 4 commits intomainfrom
shabib/cet-579-adding-support-for-multiple-invoice-emails-in-magento

Conversation

@SalmanTwo
Copy link
Copy Markdown
Contributor

Feature branch for additional invoice emails input on order checkout

@SalmanTwo SalmanTwo requested review from a team and brtkwr January 27, 2025 16:21
Comment thread Model/Config/Repository.php Outdated
/**
* @inheritDoc
*/
public function isMultipleInvoiceEmailsEnabled(?int $storeId = null): bool
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: can we please drop the "Multiple" part? Gives that part too much emphasis IMO :D this is just about whether to enable invoice email or not.

Comment thread Model/Config/Repository.php Outdated
*/
public function isMultipleInvoiceEmailsEnabled(?int $storeId = null): bool
{
return $this->isSetFlag(self::XML_PATH_ENABLE_MULTIPLE_INVOICE_EMAILS, $storeId);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also drop MULTIPLE here

Comment thread Model/Ui/ConfigProvider.php Outdated
'checkoutPageUrl' => $this->configRepository->getCheckoutPageUrl(),
'redirectUrlCookieCode' => UrlCookie::COOKIE_NAME,
'isOrderIntentEnabled' => $this->configRepository->isOrderIntentEnabled(),
'isMultipleInvoiceEmailsEnabled' => $this->configRepository->isMultipleInvoiceEmailsEnabled(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

Comment thread Observer/DataAssignObserver.php Outdated
'department',
'orderNote',
'poNumber',
'multipleInvoiceEmails'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

<input
type="text"
id="multiple_invoice_emails"
data-bind="value: multipleInvoiceEmails, event: { change: validateMultipleEmails }"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

</div>
</div>
<div class="field field-text" data-bind="visible: isMultipleInvoiceEmailsEnabled">
<label for="multiple_invoice_emails" class="label">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

orderNote: this.orderNote(),
poNumber: this.poNumber()
poNumber: this.poNumber(),
multipleInvoiceEmails: this.multipleInvoiceEmails()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

}, duration);
}
},
validateMultipleEmails: function () {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validateInvoiceEmails

autofillToken: '',
companyName: ko.observable(''),
companyId: ko.observable(''),
multipleInvoiceEmails: ko.observable(''),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invoiceEmails

Comment thread etc/config.xml Outdated
<days_on_invoice>14</days_on_invoice>
<finalize_purchase>1</finalize_purchase>
<enable_order_intent>1</enable_order_intent>
<enable_multiple_invoice_emails>0</enable_multiple_invoice_emails>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enable_invoice_emails

Comment thread etc/adminhtml/system.xml Outdated
</field>
<field id="enable_multiple_invoice_emails" translate="label" type="select" sortOrder="75" showInDefault="1"
showInWebsite="1" showInStore="1">
<label>Enable multiple invoice emails</label>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable invoice emails

Comment thread Api/Config/RepositoryInterface.php Outdated
*
* @return bool
*/
public function isMultipleInvoiceEmailsEnabled(?int $storeId = null): bool;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isInvoiceEmailsEnabled

Comment thread Api/Config/RepositoryInterface.php Outdated
public function isOrderIntentEnabled(?int $storeId = null): bool;

/**
* Check if order intent is enabled
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this text needs updating

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with all other comments on the naming adjustment

@SalmanTwo SalmanTwo requested a review from brtkwr January 28, 2025 16:33
Comment thread i18n/en_US.csv Outdated
"Your request to %1 failed. Reason: %2","Your request to %1 failed. Reason: %2"
"Your sole trader account could not be verified.","Your sole trader account could not be verified."
"Zip/Postal Code is not valid.","Zip/Postal Code is not valid."
"Forward invoice to email list (optional)","Forward invoice to email list (optional)"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed this earlier, can we drop the (optional) and keep the wording similar to Woocom here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to match Woocom

@SalmanTwo SalmanTwo requested a review from brtkwr January 28, 2025 18:38
Comment thread i18n/sv_SE.csv Outdated
"Your sole trader account could not be verified.","Ditt enskild näringsidkarekonto kunde inte verifieras."
"Zip/Postal Code is not valid.","Postnummer är inte giltigt."
"Invoice email address","E-postadress för faktura"
"Please ensure your forward to email list only contains valid emails seperated by commas.","Se till att din vidarebefordran till e-postlista endast innehåller giltiga e-postmeddelanden separerade med kommatecken."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please reword "Please ensure your forward to email list only contains valid emails seperated by commas" to "Please ensure that your invoice email address list only contains valid email addresses separated by commas"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@SalmanTwo SalmanTwo merged commit 128cf4c into main Jan 29, 2025
@SalmanTwo SalmanTwo deleted the shabib/cet-579-adding-support-for-multiple-invoice-emails-in-magento branch January 29, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants