Comments

Vishalghyv created an issue. See original summary.

vishalghyv’s picture

StatusFileSize
new2.93 KB

This checks for number of total order of given user form order uid and number of total orders from the given ip address.
In end if statement can be improved.
Probably there is a way to do it in just condition.
Descriptions can be improved
Will do the above changes (These changes I thought) if the rule is right.... Or something like this

vishalghyv’s picture

Status: Active » Needs review
vishalghyv’s picture

I don't how these coding standards have come theses do show in phpcs but never came here, I have not touched the lines mentioned.

vishalghyv’s picture

Status: Needs review » Needs work

Needs Work

vishalghyv’s picture

As mentioned in #2, Now check is fixed to just one query

vishalghyv’s picture

Status: Needs work » Needs review
vishalghyv’s picture

Status: Needs review » Needs work
  • Ip address variable is not being used but sent through the parameter
  • Function name can be improved
vishalghyv’s picture

Status: Needs work » Needs review
StatusFileSize
new2.38 KB
  • Removed ip address variable
  • Improved return condition
  • Changed comments
  • Changed description
derekcresswell’s picture

Status: Needs review » Needs work
  1. +++ b/commerce_fraud.rules_defaults.inc
    @@ -119,5 +119,21 @@ function commerce_fraud_default_rules_configuration() {
    +  $rule->label = t('Increase Fraud Count if User have placed orders from different Ip address');
    

    "Increase fraud score if user has placed ... IP addresses". Spelling and capitalisation. Terminology is "fraud score" not "count".

  2. +++ b/commerce_fraud.rules.inc
    @@ -116,6 +116,20 @@ function commerce_fraud_rules_condition_info() {
    +    'label' => t('If User have Order from different Ip address'),
    

    See the above note.

Just two quick spelling bits and it'll be good to go!

mrinalini9’s picture

Status: Needs work » Needs review
StatusFileSize
new2.39 KB
new976 bytes

Updated patch #9 as per the changes suggested in #10, please review.

derekcresswell’s picture

Status: Needs review » Reviewed & tested by the community
vishalghyv’s picture

I think test would be needed for this probably.

derekcresswell’s picture

Status: Reviewed & tested by the community » Active

@Vishalghyv would you want to add that here or in the other tests issue?

vishalghyv’s picture

Status: Active » Needs review
StatusFileSize
new3.68 KB
  • Added the test
derekcresswell’s picture

Status: Needs review » Reviewed & tested by the community

  • smccabe committed a5ebcef on 7.x-1.x authored by Vishalghyv
    Issue #3138283 by Vishalghyv, mrinalini9:  Customers who make multiple...
smccabe’s picture

Status: Reviewed & tested by the community » Fixed

Corrected a couple other Ip->IP capitalization issues on commit. Thnx everyone.

Status: Fixed » Closed (fixed)

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