Jump to content



  • Posts

  • Joined

  • Days Won


Community Answers

  1. TheJackal84's post in payTo: split payment for two members was marked as the answer   
    OK so I figured out a way, ( I was bored and intrested in this lol )
    Do the invoice normally and then payTo the club owner his 10%, ( you can just use 90% as commission for the site as that is what it will be ) now under invoice save do something like this
    $totalPercent = \IPS\Settings::i()->club_owner_percent + \IPS\Settings::i()->sites_percent; $getTotal = $price->amount->percentage( $totalPercent ); $toPayOwner = new \IPS\nexus\Money( $price->amount->subtract( $getTotal ), $currency ); $extra = $invoice->status_extra; $extra['sellerscut'] = $toPayOwner; $invoice->status_extra = $extra; $invoice->save(); now if the item was $12 and the both % were set to 10% it will save as {"amount":"9.6","currency":"USD"} as 20% of $12 is $2.40, take $2.40 away from $12 is $9.60.
    In the onPaid call
    $invoice->status_extra['sellerscut'] and there you have the $9.60 to pay to the seller
  2. TheJackal84's post in {{if}} statement in add attribute was marked as the answer   
    Ok I done it and got it to work basically you need to add this sort of code to the template
    {{if \IPS\Settings::i()->My_setting == 0}} {{$test = 0;}} {{else}} {{$test = 1;}} {{endif}} and as the attribute the key will be what ever your key is and the value will be
    {$test} then it will show if your setting is selected
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy