Adding PDF link to invoice detail page

Discussion in 'Styling and Customization Questions' started by Hoo, Sep 18, 2015.

  1. Hoo

    Hoo Active Member

    Joined:
    Sep 6, 2011
    Messages:
    161
    Likes Received:
    30
    I know how to customise the invoice detail page on the client side where they can pay their invoice, but I want to add a link to the PDF generator on this page so that clients won't have to go back to their invoice listing page to see the printable version.

    Thanks guys.
     
    #1
    shahidi likes this.
  2. CE-Juan

    CE-Juan Moderator Staff Member

    Joined:
    Aug 27, 2011
    Messages:
    625
    Likes Received:
    70
    Hi,

    Please unzip the attached file and place the content on:
    \templates\common\views\billing\invoicepublic\invoice.phtml

    Or edit your file
    \templates\common\views\billing\invoicepublic\invoice.phtml

    search for the line 23:
    HTML:
    <h1 class="invoice-title"><?php echo $this->title; ?> #<?php echo $this->invoice_id;?></h1>

    and replace it with:
    HTML:
    <h1 class="invoice-title"><?php echo $this->title; ?> #<?php echo $this->invoice_id;?>&nbsp;<span class="invoicepdflink"><a href="index.php?sessionHash=<?php echo CE_Lib::getSessionHash(); ?>&fuse=billing&controller=invoice&action=generatepdfinvoice&invoiceid=<?php echo $this->invoice_id;?>" target="_blank"><img class="pdfimage" src="templates/admin/images/document-pdf-text.png" border="0" data-toggle="tooltip" title="<?php echo $this->user->lang("View PDF Invoice");?>" /></a></span></h1>


    Thanks
     

    Attached Files:

    #2
    CE-Sreenath likes this.
  3. Hoo

    Hoo Active Member

    Joined:
    Sep 6, 2011
    Messages:
    161
    Likes Received:
    30
    Thanks Juan, much appreciated it!
    Will this be added to the next release or should I add it to my customisation list?
     
    #3
  4. CE-Juan

    CE-Juan Moderator Staff Member

    Joined:
    Aug 27, 2011
    Messages:
    625
    Likes Received:
    70
    I have added it to be released on 5.4 as it is helpful.

    Thanks.
     
    #4
    CE-Sreenath and shahidi like this.
  5. Hoo

    Hoo Active Member

    Joined:
    Sep 6, 2011
    Messages:
    161
    Likes Received:
    30
    Fantastic, thanks!
     
    #5

Share This Page