This module gives a way to provide a discount to a user for referring other users to your commerce site. The implementation is pretty simple.

  1. User A invites user B to our site using a unique invite URL (http://yoursite.com/invite/username).
  2. User B visits the site using this URL, and is taken to the registration form to create a new account.
  3. User B gets some discount amount (say $5) which he could use on his first purchase.
  4. After user B makes his first purchase, user A gets a discount amount (say $10), which could be used in the next purchase.
  5. Both discount amounts are configurable from the admin backend. To configure the discount amounts browse to /admin/config/referral-discount

Project page: https://www.drupal.org/sandbox/nikhilbanait/2752301
Git url: git clone --branch 7.x-1.x https://git.drupal.org/sandbox/nikhilbanait/2752301.git commerce_referral_discount

Manual review of other projects:

  1. https://www.drupal.org/node/2755567#comment-11359569
  2. https://www.drupal.org/node/2702713#comment-11361945
  3. https://www.drupal.org/node/2744019#comment-11366069
  4. https://www.drupal.org/node/2761605#comment-11374507
CommentFileSizeAuthor
#3 commerce-refferal-discount-1.png64.17 KBmanojapare
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nikhil Banait created an issue. See original summary.

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

manojapare’s picture

Status: Needs review » Needs work
FileSize
64.17 KB

Hi @Nikhil Banait,

Manual Review

Individual user account

Yes: Follows the guidelines for individual user accounts.

No duplication

Yes: Does not cause module duplication and/or fragmentation.

Master Branch

Yes: Follows the guidelines for master branch.

Licensing

Yes: Follows the licensing requirements.

3rd party assets/code

Yes: Follows the guidelines for 3rd party assets/code.

README.txt/README.md

Yes: Follows the guidelines for in-project documentation and/or the README Template.

Code long/complex enough for review

Yes: Follows the guidelines for project length and complexity.

Secure code

Yes: Meets the security requirements.

Coding style & Drupal API usage

  1. Getting PDOException when admin is not saving the discount amount in 'admin/config/referral-discount'. But one user is trying to get registered with invitation link. Solution would be, in commerce_referral_discount_user_insert() please change variable_get('commerce_referral_discount_signup') to include default value if variable not set.Commerce-refferral-discount-PDOException-1.png

Additionally one suggestion:

  1. I feel, it would be better to give some title for invite link block.
Nikhil Banait’s picture

Status: Needs work » Needs review

@manojapare thank you so much for reviewing and suggesting solution as well. I have fixed that PDOException issue.

Regarding title for invite link block, I feel admin can add title whatever he wants as per requirement.

yogeshmpawar’s picture

Hi Nikhil,

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
No: Causes module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
(*) Nothing
(+) 1. you should add validations for configurations of commerce referral discount.
2. It would be good, if you implement hook_help & hook_permission in your module.
Just a recommendation
Nothing

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

Nikhil Banait’s picture

Issue summary: View changes
Nikhil Banait’s picture

Issue summary: View changes

Added the validations for admin configuration form. Implemented hook_help & hook_permission as well.

yogeshmpawar’s picture

Status: Needs review » Reviewed & tested by the community

This module looks good and working for me. also there are no blocker points left.
So i am marking this module as RTBC.

Nikhil Banait’s picture

Nikhil Banait’s picture

Issue summary: View changes
Nikhil Banait’s picture

Priority: Normal » Critical
apaderno’s picture

I will update your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thank you, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks go the dedicated reviewer(s) as well.

Nikhil Banait’s picture

Thanks a lot @kiamlaluno for promoting this application.

Status: Fixed » Closed (fixed)

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