Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalized currency formatting method formatPriceTxt() for use in or… #2924

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

kiatng
Copy link
Contributor

@kiatng kiatng commented Jan 12, 2023

…der email templates.

Description (*)

It is now possible to print currency formatting number in email templates.

Related Pull Requests

See PR #1946.

Fixed Issues (if relevant)

  1. Fixes adding total variable to available variables for order email templates #1946

Manual testing scenarios (*)

$text = Mage::getSingleton('core/email_template_filter')
    ->setVariables(['order' => Mage::getModel('sales/order')->setGrandTotal(153)])
    ->filter("Formatted grand_total: {{var order.formatPriceTxt('grand_total')}} Formatted numeric value: {{var order.formatPriceTxt(1.23)}}");

$text is

"Formatted grand_total: MYR153.00 Formatted numeric value: MYR1.23"

@github-actions github-actions bot added the Component: Sales Relates to Mage_Sales label Jan 12, 2023
@fballiano fballiano self-requested a review January 12, 2023 08:21
@fballiano
Copy link
Contributor

love this one

@fballiano fballiano merged commit 85c99dc into OpenMage:1.9.4.x Jan 13, 2023
fballiano pushed a commit that referenced this pull request Jan 13, 2023
@fballiano
Copy link
Contributor

merged and cherry-picked to v20

@elidrissidev
Copy link
Member

Can someone rebuild the phpstan baseline for 1.9.4.x to stop it from failing. I can't get it to work on this slow laptop:

Screen Shot 2023-01-13 at 12 19 41 PM

@fballiano
Copy link
Contributor

It think my phpstand doesn't really work on my mac/macbrew :-(

@sreichel
Copy link
Contributor

I can do it later.

@elidrissidev
Copy link
Member

I can do it later.

No worries. I did it here #2929

@kiatng kiatng deleted the order.formatPriceTxt branch February 27, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Sales Relates to Mage_Sales
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants