How does Ubercart integration work?

14 replies [Last post]
marlene.maheu
Offline
Joined: 11/19/2010
Status: 
Answered
Release Task: 

Hi,

Just wondering how the Ubercart integration works? Would the affiliate get commission if the user he/she referred to buys a product? I tried referring a user, had it signed up, and had it bought a product though it didn't seem to make a change on the affiliate user.

Thanks

Leighton Whiting
Offline
Joined: 06/02/2009
The integration is supposed

The integration is supposed to do just what you described.

Does the referral get marked as being referred by the affiliate?

Sincerely,
Leighton Whiting

marlene.maheu
Offline
Joined: 11/19/2010
Hi, Thanks for the quick

Hi,

Thanks for the quick reply!

Yeah, seems to be working now. I had to change if ($arg2 == 'payment_received') { ... } to have it include 'completed' though. I am also looking at hook_order and can't seem to figure out how referrals take effect. It seems that the way it works is if only the $_COOKIE['affiliate'] is set, that would be the time it would assign an affiliate id to the order. Not sure if I understood the workflow correctly though.

I also looked at hook_init to see how the cookie is being set and it looks like it's being set only upon the affiliate urls so not sure how it's set when the user logging in is an affiliate to another user.

Does the referral get marked as being referred by the affiliate?

Yeah, I can see the referral listed under Referrals tab of the affiliate user.

Thanks

Leighton Whiting
Offline
Joined: 06/02/2009
Interesting... It may be that

Interesting...

It may be that different Ubercart payment modules use different order status updates in hook_order, and that may be the problem. I'll make a note to provide an option in the affiliates module to let you choose the payment_received or completed status to act on.

Sincerely,
Leighton Whiting

marlene.maheu
Offline
Joined: 11/19/2010
That would be great. Though

That would be great. Though it looks like I've missed a setting for Ubercart so all is good. Thanks again! Will come back if I have other questions... :D

simonswiss
Offline
Joined: 07/01/2011
Integration procedure

Hi there,

just to clarify - to intergrate ubercart products, the only thing i need to do is go ito "/admin/moneyscripts/ms_affiliates" and under 3rd party integration enable the "turn on ubercart integration" ?

I am using drupal 7 and ubercart 3 latest dev.

Thanks,

Simon

Leighton Whiting
Offline
Joined: 06/02/2009
simon, Theoretically yes, but

simon,

Theoretically yes, but the Ubercart Integration is untested on Drupal 7, so it may or may not work. Not sure if there were any API changes that Ubercart made when going to Drupal 7. Post back if there are any problems.

Drupal Commerce is, of course, not supported in this way, since it has a very different API.

Sincerely,
Leighton Whiting

simonswiss
Offline
Joined: 07/01/2011
Not working

It doesn't seem to work, at least this way:

With a user (not #1 but with admin rights), i created a new user with user "simon" as an affiliate

- I created a new order in ubercart for this newly created user, and changed the payment to "received" and order competed.

On the user Simon, the commission history is still at zero. Clicks counts work tough, when entering the website with an affiliate link. It looks like the system doesn't realize when ubercart has made a payment - or is it because i made the order manually?

I really hope this system can work with ubercart 3, because it is the only reason i purchased this module..

The other possibility would be to change all my ubercart products into MS - but does it handle attributes like ubercart does?

You can see my site at http://www.swiss-hopper.com - do you think such a store would work on ms module?

Simon

Leighton Whiting
Offline
Joined: 06/02/2009
Ubercart is still best when

Ubercart is still best when it comes to a store that sells actual physical products, as opposed to services and intangibles like MS modules do.

I did some searching and it looks like Ubercart 3 changed all of it's hooks to properly be namespaced (a longstanding bug in Ubercart that contrib modules had to work around). I therefore went in and changed the hook_order implementation in Affiliates Suite for Drupal 7 to hook_uc_order. Hopefully this is enough to get it working. I will be releasing the new version today.

Sincerely,
Leighton Whiting

simonswiss
Offline
Joined: 07/01/2011
great, you rock!

That is great news! I am looking forward to try out the new version!

Cheers,

Simon

simonswiss
Offline
Joined: 07/01/2011
Not sure how to handle it

Ok, i have updated the modules (ms_core and affiliates) to the 11th july's version and did update.php

Things are still not working, but could it be because of the manual order procecure i have made?

Since i offer only paypal as a payment option, the only i can validate orders without actually paying for real is to make a manual order.

Could it be a reason why the sale does not get recorded in the affiliate system?

Simon

Leighton Whiting
Offline
Joined: 06/02/2009
Can you check the Recent Log

Can you check the Recent Log Entries (and make sure that the MS Core setting 'Log Debug Messages' is turned on)? There should be an entry or two for MS Affiliates that will help debug the issue. You can open a support ticket if you'd rather not share it publicly. Or send me an email at support@moneyscripts.net

Sincerely,
Leighton Whiting

simonswiss
Offline
Joined: 07/01/2011
thank you

i wrote you an email at support@ with the log entries.

Leighton Whiting
Offline
Joined: 06/02/2009
We were able to get the

We were able to get the Ubercart Integration working in Drupal 7. Will be in the next release of Affiliates Suite this weekend.

Sincerely,
Leighton Whiting

simonswiss
Offline
Joined: 07/01/2011
I confirm

I confirm the integration works nicely, thanks to Leighton's top notch support!

I am sorry Leighton, i meant to report to this forum to let other users know the issue was fixed, but i totally forgot.

Thanks again!

Twitter Feed