pdf invoice file name change

Discussion in 'Templates customization' started by guylewis, Apr 21, 2009.

  1. guylewis

    guylewis Member

    Joined:
    Oct 10, 2005
    Messages:
    56
    Hi guys, my pdf invoice file name is "amember-invoice-[number].pdf

    Does anyone know how to customize this?

    I would like to change out amember for my own company name. Would make a lot more sense to a customer that way.

    Thanks
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    That is defined in member.php file around line 541 (depending on what version of aMember you are using.

    Code:
    header("Content-Disposition: attachment; filename=amember-invoice-$id.pdf");
  3. guylewis

    guylewis Member

    Joined:
    Oct 10, 2005
    Messages:
    56
  4. stevenjohn

    stevenjohn Member

    Joined:
    Nov 9, 2006
    Messages:
    40
    Hi there,

    Has anyone worked out how to update the filename in v4? have looked around and cannot see it, and member.php no longer exists..

    I thought it would be in a config file, but couldn't find it in there either - greatly appreciate someones help here.

    Kind regards, Steve.
  5. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    @stevenjohn
    You can modify name of PDF file with invoice in ver. 4 in the following file
    amember/library/Am/Pdf/Invoice.php
    just find method getFileName and replace 'amember-invoice-' with something you prefer.
  6. stevenjohn

    stevenjohn Member

    Joined:
    Nov 9, 2006
    Messages:
    40
    @caesar
    Thank you very much - cant believeI missed that, I hunted through that file and completely missed it.

    Appreciate you taking the time to give me the answer.

    Kind regards, Steve
  7. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Steve , Good news - in latest version there is configuration option - invoice filename. So you will be able to customize it without modifying any file.

Share This Page