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

Update ps_emailalerts.php in $template_vars #141

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Anton1P
Copy link

@Anton1P Anton1P commented Apr 8, 2024

The problem
I wanted to remake the table in my twig file of the new_order, except that the only variables you created in $template_vars weren't enough, so I suggest you add some variables for more flexibility in customizing the mail template.

The solution
ADD somes variables like =
'{total_paid_tax_excl}' => $contextLocale->formatPrice($order->total_paid_tax_excl, $currency->iso_code), '{total_products_tax_excl}' => $contextLocale->formatPrice($order->getTotalProductsWithoutTaxes(), $currency->iso_code),

Questions Answers
Description? I wanted to remake the table in my twig file of the new_order, except that the only variables you created in $template_vars weren't enough, so I suggest you add some variables for more flexibility in customizing the mail template.
Type? improvement
BC breaks? no
Deprecations? no
How to test? To test the changes, modify the code in ps_emailalerts.php within the $template_vars section. For instance, change a variable in a Twig file, such as replacing {total_paid} with {total_paid_tax_excl} in new_order.twig. Afterwards, send yourself the respective email type to verify if the modification is correct.

The problem
I I wanted to remake the table in my twig file of the new_order, except that the only variables you created in $template_vars weren't enough, so I suggest you add some variables for more flexibility in customizing the mail template.

The solution
ADD somes variables like =
'{total_paid_tax_excl}' => $contextLocale->formatPrice($order->total_paid_tax_excl, $currency->iso_code),
'{total_products_tax_excl}' => $contextLocale->formatPrice($order->getTotalProductsWithoutTaxes(), $currency->iso_code),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for review
Development

Successfully merging this pull request may close these issues.

1 participant