Closed (fixed)
Project:
Ubercart Affiliate v2
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2009 at 11:55 UTC
Updated:
16 Apr 2010 at 23:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
univate commentedAll we need is tokens exposing the affiliate information for an order and this could be done via conditional action.
Comment #2
bojanz commentedI agree with the possible solution presented by "univate"
Comment #3
wqmeng commentedHi, Could you explain more about the token exposing? Do you mean fire the notification from the token action module ?
Comment #4
univate commentedConditional actions can already be setup to send an email on certain events (like order status changed)
You can insert various order tokens (replacement text) into these emails, if uc_affiliate2 exposed tokens for things like the commission value I was thinking it may be possible to create emails using this information.
Comment #5
univate commentedAttached is a patch that adds some basic token support to uc_affiliate2.
I am only using 1 affiliate level, so this may need some work to support multiple levels.
Comment #6
wqmeng commentedunivate
thank you for post your patch to the subject. After you talk of exposing affiliate2 to tokens, I have thought for a while and yes I agree that token may be more useful as Conditional actions may do more task than just send out email. Then I also found it is hard to expose multiple levels commission record to token system as token is a string-replace system in my mind and I can't find a way to send out emails to every affiliate in the multiple levels commission record.
I also find another way to send out email by job-queue module.
http://drupal.org/project/job_queue
And it is easy to work with, but it can only add one type job from the hard code. Which is limitation as some case we also need other actions than send out email. So I still want to find the way to get the affiliate2 token to work with the multiple levels commissions.
Thank you very much.
Comment #7
bojanz commentedComment #8
AlexisWilke commentedBojanz, Univate,
This patch adds a dependency on the tokens module (.info file):
Thank you.
Alexis
Comment #9
bojanz commentedShouldn't the dependency be "token" and not "tokens"?
Nevertheless, the module works fine with token disabled (the integration is optional), so I don't think the dependency is required.
Comment #10
AlexisWilke commentedbojanz,
You are correct! It is token. 8-)
I guess that if the module does not offer the use of tokens when the token module is disabled, then we should be fine. In that case, you may want to mark it as recommends:
Thank you.
Alexis
Comment #11
bojanz commentedNoted.