Closed (fixed)
Project:
Node Gift
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
8 Jan 2016 at 17:49 UTC
Updated:
11 Nov 2016 at 09:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
igorik commentedComment #3
drupalprojects commentedComment #5
drupalprojects commentedInitial support for rules module added.
You can find an additional action in Node Gift group - Send gift.
It has 4 params: Sender of the Gift, receiver of the gift, gift node and comment
For params Sender and Gift node you should switch to direct input and insert user id and node id as numbers. For now I can't find a way to load node and user params as regular Drupal autocomplete fields. It only allow to autocomplete from current action scope.
Also it may be a good idea to add an additional action BEFORE sending gift which adds few Userpoints to sender (Admin probably?) as each gift costs some userpoints.
Comment #6
igorik commentedWau, it was so fast, thank you!
I am very looking forward to test it.
Comment #7
igorik commentedI tested it, it works, thanks.
Chosen user recieved the gift (when he created his first blog).
One bug I found there - the userpoints was taken from gifted users, not from the donor - gifted user saw the message that she spend 100 user points.
Please check it.
Thanks
Igor
Comment #8
drupalprojects commentedFixed.
Comment #9
igorik commentedHello,
would be great to have in rules an action (React on event)
"Gift was send".
Based on this I can e.g. to add Google analytics event to track user activity
Thank you very much ahead.
Igor
Comment #10
drupalprojects commentedI will try to implement it in few days.
Comment #12
drupalprojects commentedDone. Enjoy!
Comment #13
igorik commentedthank you, this is partially working.
I can really use action "Gift sent"
but I am missing some data value for the gift "who sent it, who recieved it, name/type of the gift",
without it it is not very usable to use this action.
e.g. I can't send the notification to user who recieved the gift, because I don't know who it is, etc.
Thank you
Igor
Comment #15
drupalprojects commentedFixed issue with variables in Gift sent event
Comment #16
igorik commentedThanks, it works like a charm.
Maybe you could add there too the message from the recipient.
Thank you!
Comment #18
drupalprojects commentedAdded sender's comment to gift sent event
Comment #19
igorik commentedIs the type=>'text' really correct?
'comment' => array('type' => 'text', 'label' => t('Gift comment'));couldn't be it more like:
'comment' => array('type' => 'comment', 'label' => t('Gift comment')),because I don't know how to target type 'text' using entity reference, picture attached.
Comment #20
drupalprojects commentedNot sure what are you trying to do. Comment is not a node's comment - its just a piece of text which is stored in nodegift table.
Comment #21
igorik commentedThe last issue was fixed by this patch:
https://www.drupal.org/node/2826445#comment-11773686
Comment #22
drupalprojects commented