Jump to content

JJMillwall

Members
  • Posts

    7
  • Joined

  • Last visited

2 Followers

Recent Profile Visitors

638 profile views

JJMillwall's Achievements

  1. Made a small amendment for now which will produce what I require for the timebeing - its not perfect and its simply checking against one product for now /applications/trophies/extensions/trophies/TrophyCriteria/Nexus.php Line 58 - 81 if ( isset( $trophy->crdata['bought_nexus'] ) ) { try { $where = []; $where[] = [ 'ps_member=?', $member->member_id]; $where[] = \IPS\Db::i()->in( 'nexus_purchases.ps_item_id', explode( ',', $trophy->crdata['bought_nexus'] )); $count = \IPS\Db::i()->select( 'count(*)', 'nexus_purchases', $where)->first(); if ($count >= 1 ) { return TRUE; } else { $failedStep = 'commerce purchases - min : ' . $trophy->crdata['bought_nexus'] . " and member has : 0 "; return FALSE; } } catch ( \UnderflowException $e ) { $failedStep = 'commerce purchases - min : ' . $trophy->crdata['bought_nexus'] . " and member has 0"; return FALSE; } }
  2. Hi @Fosters I too am trying to use the Nexus criteria in the rule and select one of my Nexus Products in the criteria. What appears to happen, however, is that the field then users the Product ID number as a value to count against i.e. If I choose product number 3 then the criteria expects 3 or more purchases in total via Nexus. I assume this is just legacy code where you have looked to check against the ps_item_id in nexus_purchases as opposed to count a users total purchases E.g. Using Product ID 2 JJ
×
×
  • Create New...