Hi, guys

I am working on a case that need to notify the client some information after the order has been updated.
So i want to sent the "Update log message" for one part of the email content.
I use rules, but I cant find a token for revision log, i also try to find log at "
Conditions", and i dont find any field or property about it.

Is there a method to get revision log at rules? If there is, can someone help me? Thanks.

If not, can the author or someone who is familiar with commerce order can write a small patch for me? I would appreciate your help very much!

CommentFileSizeAuthor
#3 revision-log.patch2.22 KBwaveer

Comments

waveer’s picture

Category: support » bug

I find a clerical error at commerce_order.tokens.inc at line 118
case 'revision_id':
shoule be:
case 'revision-id':

Because of this the token [revision-id] dont work at rules.

waveer’s picture

As i said at the issue "Support order revision for token and rules", I need the order revision log token to use at rules.

Several days past, nobody give me a patch for me, so I write it for myself, a little hard to me.

I add a revision load function at "commerce_order.module", because I dont find a function for revision load with revision id. I just use the db_select, maybe there is a better way. Hope someone can tell me.

I add the revision-log token at "commerce_order.tokens.inc".

You can see these at the patch.

I am not a professional developer, the code i write maybe not very well. But it works. If you also need the revision log token, you can use it temporarily.

I hope some core developer of commerce module can add revision log token and other revision token to core of commerce module.

waveer’s picture

Category: bug » support
StatusFileSize
new2.22 KB

Forget the patch...

rszrama’s picture

Category: support » feature
Status: Active » Needs review
chris matthews’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs reroll

The 6 year old patch in #3 does not apply to the latest commerce 7.x-1.x-dev and (if still relevant) needs to be rerolled.