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

bojanz’s picture

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.

wqmeng’s picture

StatusFileSize
new709 bytes

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.

bojanz’s picture

Thanks wgmenq, will take a look.

univate’s picture

Priority: Critical » Normal
Status: Active » Needs review
StatusFileSize
new4.43 KB

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.

univate’s picture

StatusFileSize
new16.76 KB

Heres the image.

wqmeng’s picture

@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.

univate’s picture

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

univate’s picture

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

doublejosh’s picture

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

bojanz’s picture

Status: Needs review » Fixed

Committed to 6.x-3.x

Status: Fixed » Closed (fixed)

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

sammys’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new4.44 KB

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.

bojanz’s picture

@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).

univate’s picture

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

moving this to 3.x

univate’s picture

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

ratinakage’s picture

Hi there,

Did this ever make it into the module?

Thanks...