Hey Nikhil,

Thanks for this module! I would be interested in helping expand the features for this package and make it a full drupal module. I thought I'd touch base with you first and see what your plans are for it in the future. I have some experience with Drupal development, although I've never written custom modules and haven't used the drupal.org site for any development.

Some future features that I would like to try to implement (eventually, some are large/ tricky) for use in my own sites:

  • Discounts as percentages of purchase price, instead of a fixed dollar amount
  • Tiered discounts, for referring a larger number of people. (ex 10% off after 3 referrals, 15% off after 6, 20% off after 10, with each coupon as non-stackable, one-time use).
  • Refer N number of people, who each make a purchase, before receiving a referral discount. (To offer larger discount amounts)
  • More clear custom referral link page, with a generated message explaining the referrer what the terms of the discount are. At this point it's unclear to the refer-ee if the referral was successful, as they are immediately bounced to the register page (with a SESSION variable set, that they don't see evidence of).
  • Referral status page, where invitations and registered users can be tracked by the referrer (have they made their purchase yet?), and progress bar toward the referral discount

I also believe there is currently the possibility for abuse. We don't check that the referral uid is not the same as the refer-ee uid. Someone could conceivably log-out, go to their own referral link, log in, then make a purchase to get the refer-ee discount. They would then be eligible for the referral discount. (I could be misunderstanding the code, so maybe this scenario couldn't happen).

Anyway, I know this is experimental code right now, but hoping to get your thoughts on further development, and if you'd like my help working on it.

Thanks!
Luke

Comments

luketaverne created an issue. See original summary.

nikhil banait’s picture

Thank you so much @luketaverne for showing interest in expanding this module. All your suggestions are valid and interesting.

Here is my point of view related to your future features suggestion:

  • Discounts in percentage: Yes, we should implement discounts as a percentage, but at the same time we can't ignore the fixed dollar amount (Because requirement varies person to person). So we should modify the admin config form with check box something like: Do you want to provide referral discount in percentage? (Default with dollar amount and if checkbox is checked then discount in percentage)
  • Tiered discounts: Very nice suggestion but tough to implement.
  • Refer N number of people: This has been already implemented.
  • More clear custom referral link page: Need to modify 'commerce_referral_discount_block_view()' function. To let refer-ee know about referral successful registration, we could send the email notification.
  • Referral status page: Possible by providing view integration with this module.
  • Own referral link: Not possible, because anyone who is trying to use own link, then he/she has to create new account as this module providing referral discount on hook_user_insert().

One more feature I wanted to implement i.e. wallet system (so that user would come to know the discount amount present into wallet).

Well, if you want to contribute any of the above feature, please clone code repository using following link.
Git url: git clone --branch 7.x-1.x https://git.drupal.org/sandbox/nikhilbanait/2752301.git commerce_referral_discount

Create new issue for each feature here and start creating the patch.

Thank you once again Luke.

nikhil banait’s picture

Status: Active » Closed (fixed)
blueblot’s picture

Version: » 7.x-1.1

Hi

Discounts in percentage: Yes, we should implement discounts as a percentage

I would love to use this feature. My client doesn't want a fixed amount.

@nikhil, is this something that you would consider adding in the near future? So I can give my client an update on this.

Thx

Kris

nikhil banait’s picture

Hi,

Sorry, no plans yet for the Percentage Discount. I would request you to implement this feature and create the patch for the same.

It would be very helpful. Thanks in advance.

Nikhil