Project:Ubercart Affiliate v2
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Hi, When build a new view, there are listing some product fields like price, title, cost... While no commission plan there. It would be very nice if an affiliate may get a nice view page to check the commissions list of the products.

Also when generate the affiliate link of products, display the commission plan is very useful for an affiliate.

just my 2cs, Thanks a lot.

Comments

#1

Views integration requires code of it's own, which is outside of my plans currently.

Who knows, maybe after I release the stable version of the Drupal 6 module... Don't want to promise anything in the meantime.

#2

Hi,

I have added some code to add the commission structure field to the views module. Sorry I can't create a patch as I have custom the affiliate2 module. While add the view2 support is very simple and just add a function at the end of uc_affiliate2.module and put all the attach files in the tar ball to the views (you may create one just under the uc_affiliate2 folder or uncompress the tar ball with path) folder.

Here the code.

/**
* Implementation of hook_views_api().
*/
function uc_affiliate2_views_api() {
  return array(
      'api' => '2.0',
      'path' => drupal_get_path('module', 'uc_affiliate2') .'/views',
      );
}

And I do not combo the default commission structure with this one, what I am rather to add the default commission structure and the commission structure of each role as others views filed.

AttachmentSize
uc_affiliate2_views.tar_.gz 709 bytes

#3

Thanks wgmenq, will take a look.

#4

Priority:critical» normal
Status:active» needs review

Did some work on getting some views integration working. I was more interested in exposing the actual commission records.

See the attached image for an example of the type of view you can create with this.

AttachmentSize
uc_affiliate2-406156-4.patch 4.43 KB

#5

Heres the image.

AttachmentSize
uc_affiliate2_views.png 16.76 KB

#6

@univate

nice job, I am not think about creating a report like this.

And it is +1 if we get another field to show the payment status of the commission.

like

order-id      order-status      order-total        order-commission        affiliate             commission status
1               complete          $100                  $15                        aff-1                   pending
2               complete          $100                  $15                        aff-1                   pending
3               complete          $100                  $15                        aff-1                   paid
4               complete          $100                  $15                        aff-1                   complete
5               complete          $100                  $15                        aff-1                   pending

pending means the commission not viewed by the admin
complete mean the commission has been viewed by the admin and ready to pay.
paid, the affiliate have got paid of the commission

And even more, may provide paid date, paid method(PayPal/Wire/Check ...)

It's more better now, thanks a lot.

#7

That sounds like a separate feature, since none of that information is currently tracked.

#8

I should also mention that the above view relies on uc_views being installed and also a bug in uc_views being fixed to display the prices correctly: #704278: $0.00 shown on Order Total

#9

neato. hanging on to this for use on affiliate user account pages... when I get the affiliate base features all settled.

#10

Status:needs review» fixed

Committed to 6.x-3.x

#11

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#12

Status:closed (fixed)» needs review

Here's an updated patch for those of you wanting views support in 6.x-2.x versions. Would be great if the maintainer committed this so we don't need to keep updating the patch. :) Setting to needs review so we can prove that it works.

AttachmentSize
uc_affiliate2-406156-12.patch 4.44 KB

#13

@sammys
Actually, 3.x will be 2.x + views ;)
I'm finally done with exams and other obligations, so I'm working to complete this in the following week (and forward on).

#14

Version:6.x-2.x-dev» 6.x-3.x-dev

moving this to 3.x

#15

Title:Could it be possible to expose the Product Commission Structure to Views 2 module?» Views integration
Version:6.x-3.x-dev» 6.x-2.x-dev

sorry, realised this was about 2.x

#16

Hi there,

Did this ever make it into the module?

Thanks...

nobody click here