paynl / magento2-plugin

The Pay. plugin for Magento 2
https://www.pay.nl
28 stars 32 forks source link

Bugfix Email templates #206

Closed Hawksama closed 1 month ago

Hawksama commented 2 months ago

This PR corrects the @vars section in the email template by properly formatting it as a JSON structure. The issue has been present since commit c576f85, made 4 years ago.

Fix: Reformated @vars section to ensure proper serialization and deserialization in Magento. Testing: Verified that email templates load and send correctly without errors after the fix.

Stack trace: /var/www/html/vendor/magento/framework/Serialize/Serializer/Json.php:Unable to unserialize value. Error: Syntax error

Stack trace: /var/www/html/vendor/magento/module-email/Model/Template.php Args: {"store url=\"\"":"Store Url","skin url=\"images/logo_email.gif\" _area='frontend'":"Email Logo Image"},"var formattedBillingAddress|raw":"Billing Address","var email_customer_note|escape|nl2br":"Email Order Note","var order.increment_id":"Order Id","layout handle=\"sales_email_order_items\" order=$order area=\"frontend\"":"Order Items Grid","var payment_html|raw":"Payment Details","var formattedShippingAddress|raw":"Shipping Address","var order.shipping_description":"Shipping Description","var shipping_msg":"Shipping message","var created_at_formatted":"Order Created At (datetime)","var store.frontend_name":"Store Frontend Name","var store_phone":"Store Phone","var store_email":"Store Email","var store_hours":"Store Hours","var this.getUrl($store,'customer/account/',[_nosid:1])":"Customer Account URL","var is_not_virtual":"Order Type","var order":"Order","var customer_name":"Customer Name""var show_order_in_mail":"show Order",

woutse commented 2 months ago

Thanks for your PR. We'll look into it!

woutse commented 1 month ago

Thanks again for your pull request. We are going to make the changes you suggested, though via another channel. So this PR will be closed and the changes will be live in the next release. Thanks again.

Hawksama commented 1 month ago

I'm glad that I was able to help!