Default Payment System in Add Invoice

Discussion in 'Customization & add-ons' started by unmortal, Oct 28, 2014.

  1. unmortal

    unmortal New Member

    Joined:
    Sep 10, 2006
    Messages:
    25
    Is there a way to choose a payment system that will be defaulted to in the Add Invoice page? I'd like the field to be defaulted to PayPal if possible.
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    It is not possible to do from admin interface. You need to customize one core file to achieve your needs. It is
    amember/application/default/controllers/AdminUserPaymentsController.php. Please find addInvoiceAction method and
    replace
    PHP:
    ->loadOptions(array(''=>'') + $this->getDi()->paysystemList->getOptions());
    with
    PHP:
    ->loadOptions(array(''=>'') + $this->getDi()->paysystemList->getOptions())
                ->
    setValue('paypal');
    Please note these changes can be overwritten with upgrade.
  3. unmortal

    unmortal New Member

    Joined:
    Sep 10, 2006
    Messages:
    25
    This is working great thank you Caesar. I will make a note that I'll need to change this after upgrade.

Share This Page