Mikkel-T

+Clients
  • Content count

    41
  • Joined

  • Last visited


About Mikkel-T

  • Rank
    core_member_rank_45

Mikkel-T's Activity

  1. Mikkel-T added a post in a topic: Download: Diablo 3 Vanguard v2 [codegame.net]   

    ^This   Also, is there support for ProMenu? -  http://community.invisionpower.com/files/file/5435-promenu-plus/
  2. Mikkel-T added a post in a topic: Custom actions   

    Okay, but for some reason that doesn't work either.
    Also if i want to use custom fields how can I do that? :)
  3. Mikkel-T added a post in a topic: Custom actions   

    Okay, if the registry is not passed how would I do then :)
    Should I extend a specific class, and how would I eventually get on from there?
  4. Mikkel-T added a post in a topic: Custom actions   

    Yea, I don't use onPurchaseGenerated just onpaid, which is the one not working.
  5. Mikkel-T added a post in a topic: Custom actions   

    This is my class:

    <?php class custom_actions_WowJob //extends ipsCommand { private $registry; private $DB; private $settings; private $request; private $lang; private $member; private $memberData; private $cache; private $caches; function __construct($registry){ $this->registry = $registry; $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->lang = $this->registry->getClass('class_localization'); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); } /** * Item Purchased (run before onPurchaseGenerated) * * @param array The member purchasing * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param invoice Invoice Model * @return void */ public function onPaid( $member, $package, $invoice ) { $this->DB->update( "ccs_custom_database_3", array( 'field_34' => 1 ), 'primary_id_field=1' ); ipsRegistry::DB()->update( "ccs_custom_database_3", array( 'field_34' => 1 ), 'primary_id_field=1' ); } /** * Purchase record generated (run after onPaid) * * @param array The member purchasing * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param invoice Invoice Model * @param array Row from nexus_purchases [since Nexus 1.5] * @return void */ public function onPurchaseGenerated( $member, $package, $invoice, $purchase ) { $db = $this->connect(); $db = ipsRegistry::DB(); $db->update( "ccs_custom_database_3", array( 'field_34' => 1 ), 'primary_id_field=1' ); } /** * Purchase Renewed, but was still active anyway * * @param array The member renewing * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param invoice Invoice Model * @param array The row from nexus_purchases [since Nexus 1.5] * @return void */ public function onRenew( $member, $package, $invoice, $purchase ) { } /** * Purchase Renewed after had expired * * @param array The member renewing * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param invoice|null Invoice Model [May not be set if manually reactivating] * @param array The row from nexus_purchases [since Nexus 1.5] * @return void */ public function onReactivate( $member, $package, $invoice, $purchase ) { } /** * Purchase Expired * * @param array The member the purchase belongs to * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param invoice|null Will usually be null. If the purchase is expiring because the invoice which previously renewed it is now being marked unpaid, the invoice object will be passed. * @param array The row from nexus_purchases [since Nexus 1.5] * @return void */ public function onExpire( $member, $package, $invoice, $purchase ) { } /** * Purchase Cancelled or Deleted * * @param array The member the purchase belongs to * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param invoice|null Will usually be null. If the purchase is being cancelled because the invoice which was used to purchase it it is now being marked unpaid, the invoice object will be passed. * @param array The row from nexus_purchases [since Nexus 1.5] * @return void */ public function onCancel( $member, $package, $invoice, $purchase ) { } /** * Purchase is transferred to another member * * @param array Old owner * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param array The row from nexus_purchases * @param customer New owner * @return void */ public function onTransfer( $oldOwner, $package, $purchase, $newOwner ) { } /** * Purchase is upgraded/downgraded * * @param array The member the purchase belongs to * @param array Old package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param array The row from nexus_purchases * @param package New package object * @return void */ public function onchange( $member, $oldPackage, $purchase, $newPackage ) { } /** * Purchases' parent purchase is changed * * @param array The member the purchase belongs to * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param array The row from nexus_purchases * @param array|null The previous parent (may be null if had no parent previously) * @param array|null The new parent (may be null if was previously associated and now not) * @return void */ public function onAssociate( $member, $package, $purchase, $oldParent, $newParent ) { } }
  6. Mikkel-T added a post in a topic: Custom actions   

    Hi Mark,
    I thought I achieved that by using this:

    $db = ipsRegistry :: DB ();
    $db -> update ( "ccs_custom_database_3" , array ( 'field_34' => 1 ), 'primary_id_field=1' );
    Anyway, I tried yours without luck.

    Then I tried this:

    And it didn't appear to be working either..
    Is the registry sent when this class is created?
    private $registry; private $DB; private $settings; private $request; private $lang; private $member; private $memberData; private $cache; private $caches; function __construct($registry){ $this->registry = $registry; $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->lang = $this->registry->getClass('class_localization'); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); } /** * Item Purchased (run before onPurchaseGenerated) * * @param array The member purchasing * @param array Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type) * @param invoice Invoice Model * @return void */ public function onPaid( $member, $package, $invoice ) { $this->DB->update( "ccs_custom_database_3", array( 'field_34' => 1 ), 'primary_id_field=1' ); }
  7. Mikkel-T added a post in a topic: Custom actions   

    Your lucky they would answer your tickets, they wouldn't support me :P
    Tried this:

    Wouldn't work either.. :(
    public function onPaid( $member, $package, $invoice ) { $db = $this->connect(); $db = ipsRegistry::DB(); $db->update( "ccs_custom_database_3", array( 'field_34' => 1 ), 'primary_id_field=1' ); }
  8. Mikkel-T added a post in a topic: Custom actions   

    Hi,
    Wasn't sure where to put this.
    I'm very confused about how the custom actions works.
    I looked at this tutorial: http://community.invisionpower.com/resources/documentation/index.html/_/developer-resources/ipnexus/ipnexus-custom-actions-r496
    But it's not of much help really..
    I tried with this very basic function:


    Well, no errors was displayed when trying to purchase my item, however that query didn't get executed, or it didn't change anything. No PHP errors at all, nothing to debug with.
    Also, i would like to use the custom fields for my product, how can I do this?
    public function onPaid( $member, $package, $invoice ) { $this->DB->update( "ccs_custom_database_3", array( 'field_34' => 1 ), 'primary_id_field=1' ); }
  9. Mikkel-T added a post in a topic: Searching in IP.Content   

    Ah okay.
    I was hoping for a way to specify search criteria on each field on specific records. Not just a single one.
    Also if you had a check-box field in a record, you could search by inputting text boxes :)
    I guess I'll head over to the custom services.

Status Feed