uc_notify not using input format

Project:Ubercart Contributions
Component:Code
Category:
Priority:normal
Assigned:Unassigned
Status:active
Description
Project: 
Ubercart

I noticed that in the order update settings for uc_notify (admin/store/settings/notify/edit/update) you can set the input format to php code. But currently uc_notify doesn't actually use this format selection. It looks like uc_notify_order_update is missing a check_markup.

This line:

$body = variable_get('uc_notify_order_update_body', uc_get_message('order_update_email'));

should become something like

$body = check_markup(variable_get('uc_notify_order_update_body', uc_get_message('order_update_email')), variable_get('uc_notify_order_update_format', 3), FALSE);

By the way, the reason I'm doing this is so that I can send out a "you're order has been shipped" update to customers when their order is marked as completed. Setting this to PHP code and then calling different templates based on the order_status seemed to be the easiest way to do this, but let me know if I missed a better way.

Best,
Chad

Version: 
Ubercart 1.x-dev
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: uc_notify not using input format

Man, just looking at this code makes me dream dreams of a nicer notifications module. Evil I've applied and committed your fix. Feel free to test it from Bazaar and let me know how if it's screwed up.

chadcrew's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 12/28/2007
Juice: 195
Re: Re: uc_notify not using input format
Assigned to:Ryan» chadcrew

Thanks, I'll check it out.

Now that I think about it, using order updates for a shipping update is somewhat flawed, since only part of the order might have shipped...and different shipments could have different tracking numbers... but it'll get the job done for now, until your dreams of an uber-notification module are realized. Smiling