Any plans to port to Drupal 7?

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nohup’s picture

+1

svogel’s picture

I'd like to have this on 7 as well (this module currently stops me from upgrading).

jeffl8n’s picture

subscribing

bojanz’s picture

I have no plans or time for a port at this time. :/
I have a few planned changes for the D6 branch, but time doesn't permit me to go further than that.
I'll try and make those changes this week, so that the terrain is ready for a D7 port.

I'd gladly give maintainership or co-maintainership to someone who could port the module and take care of it.
(So if some one wants to sponsor it, or code it this is the place to say so and get organized)

univate’s picture

Title: port to Drupal 7 » uc_affiliate2 port to Drupal 7

I may have a go at doing a port if and when I get a chance.

svogel’s picture

I think I might not be able to do the port to drupal 7.
But I will happily do some alpha (or pre-alpha)-testing.

shadowmihai’s picture

subscribe

BrandonJSchwartz’s picture

subscribe

hendrakieran’s picture

+1

thememex’s picture

subscribe

evyawebsites’s picture

+1
can't upgrade to d7 without it

cmcintosh’s picture

I looking to write a solution for a d7 site that will need both uc_affiliate and uc_discount to work. I will be posting as i get it migrated.

cmcintosh’s picture

Looks like we need uc_views, which also will need porting. Spider webs!

cmcintosh’s picture

First patch to get the module working in drupal 7, it needs review and should be considered early development version.

cmcintosh’s picture

Status: Active » Needs review
nohup’s picture

FileSize
123.18 KB

cmcintosh,

It just so happened that I was working on porting this today and did not see your post.

I downloaded your patch and applied it to the 6.x-3.x-dev release, but it did not work. It took me some time to figure out that the patch was generated against master.

So I cloned the git repository and applied your patch. Enabled the module but got the following error, the module got installed anyway.
DatabaseSchemaObjectExistsException: Table <em class="placeholder">uc_affiliate2_users</em> already exists. in DatabaseSchema->createTable()

Giving a user the permission to "act as affiliate" had no effect. The user was not listed in affiliate manage page.

Earlier today using the coder module I had upgrade the 6.x-3.x-dev to Drupal 7 APIs and fixed any issues I could find with the base functionality. I did not investigate upgrading views and conditional actions. The attached patch can be applied to 6.x-3.x-dev to upgrade it use D7 APIs.

The best way to apply the patch would be download the 6.x-3.x-dev release build, unzip/untar it, download the patch and apply form within the directory.

cmcintosh’s picture

Yea i have been doing a bit of work on this. There is a lot more to do to the module than i initially thought. Some of the things i am doing follows:

Firstly, we are migrating into entity api, this is mostly due to the fact that this is how rules does it thing now in d7. Additionally, it seems that the permissions along with some other things changed a lot more than i had thought in d7. Using the devel module i did not get the full picture into how much this is going to be to accomplish.

Anyway, I am taking and turning the Affiliate, Commission and Clicks all into entities. This does a couple things mostly letting me to reduce some code in some places and add some functionality that i need and others will probably make use of. I have not decided how I am going to go about a migration script from drupal 6 to drupal 7 as there is a lot of fundamental changes from the way d6 operates and how i am writing the d7 version of the module to work.

bojanz’s picture

Once you start doing that you are duplicating Affiliate NG (which provides Campaigns and Clicks, url handling...) as well as Commerce Affiliate (which provides Commissions).
The reason Commerce Affiliate is not yet posted is because there's a lot of hidden complexity needed to have commissions work properly both per order and per product. You will surely run into that. In essense, campaigns need to work like commerce line items (entity + reference field + views form UI). This applies to the Ubercart version completely, eventhough I'm mentioning Commerce a lot.
Commerce Affiliate especially can be generic enough to support Ubercart as well. The reason it is even called "Commerce" affiliate is because it needs the commerce price field (you can't do ecommerce amounts any other way.)

My idea was always for uc_affiliate2 to be a straightforward port to D7 so that people can use it until Affiliate NG and Commerce Affiliate become alive.
Also, once you start doing all that converting to entities, you need to provide an upgrade path for users, which is also complicated.

So even if you need a custom solution with entities, that can't go into uc_affiliate2, and depending on Affiliate NG for the basic parts is recommended (patches to it are welcome).
You can then write your own custom Commission logic in a separate module and call it a day.

nohup’s picture

bojanz,

Whenever you get a chance please release a 7.x-1.x-dev branch from either of the patches. If you can give me access I can do it and maintain it.

nohup’s picture

bump

bojanz’s picture

@nohup
Gave you full access. Go wild.
(and make sure you're following the coding standard, saw a few misses in the patch).

Feel free to contact me if you need thoughts about future direction (I'd prefer if you discussed huge architectural changes with me first).

Okay, that doesn't sound that wild. Still, welcome to the team.

nohup’s picture

bojanz,
Thanks, I will fix the coding standard issues in the patch and will try to get a dev release out over the weekend.

simonswiss’s picture

subscribing

Poieo’s picture

Subscribing.

nohup’s picture

Status: Needs review » Closed (fixed)

7.x.1.0 release done. Though the module works, it is not yet recommended for production use. Needs more testing.

univate’s picture

Status: Closed (fixed) » Needs work

You really should have probably tagged it as an alpha or beta if its not stable and tested. People are going to see 1.0 and think its ready to use.

Also you should remove the LICENSE.txt as that is included by drupal package system automatically

When you finish an issue you should change the state to fixed - d.o will automatically close them after two weeks (that gives everyone a chance to see the issue and confirm its actually fixed)

nohup’s picture

You have a valid point. I have taken down the release and am putting up the development version instead. Though all the base functionality works except views and conditional actions (which has been depreciated for rules). The dev release could definitely benefit from more testing before release.

nohup’s picture

Status: Needs work » Fixed

The module was tested in the thread #1305802: Bounty for completing 7.x-1.x

7.x.1.1 released.

Status: Fixed » Closed (fixed)

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