WordPress.org

Ready to get started?Download WordPress

Forums

DukaPress
How to edit Dukapress PDF invoice (6 posts)

  1. torboxz
    Member
    Posted 3 years ago #

    Hi,

    How can I edit the pdf invoice? Since most of my customer will probably use cash in advance payment method, I would want to add other information in the invoice, just a few notes to remind the buyer to send email or text message the transaction details like the date and time of money transfer, the value and their invoice number so that I can follow up to process their order.

    Pardon my English.

    Regards,
    torboxz

    http://wordpress.org/extend/plugins/dukapress/

  2. moshthepitt
    Member
    Plugin Author

    Posted 3 years ago #

    It is a little difficult to edit the PDF - sorry for the inconvenience :(. But the code that you need to edit is in dukapress.php from Line 1587

  3. torboxz
    Member
    Posted 3 years ago #

    Wow, it's not a 'little difficult' for me, it IS difficult :P I'm not very familiar with PHP. Looks like it will take a lot of time but now I know which file to replace if I want to change my invoice logo :) and do I have to use the same dimension for the logo?

    How about this, maybe you can put a text box in the setting page for extra notes or anything that will be printed in the invoice? Dukapress is great and with that it would be awesome!

  4. torboxz
    Member
    Posted 3 years ago #

    Hi moshthepitt,

    By referring here, I can use
    $pdf->Cell(0,0,'Text',0,1); //alignment is omitted
    To insert any text to the invoice.

    I intend to insert a note after the total value of the purchase so I edited dukapress.php and insert these codes starting at line 1785

    $pdf->Ln();
    $pdf->SetFont('Arial', '', 9);
    $pdf->Cell(0, 0, 'Note:', 0, 1, 'L');
    $pdf->Cell(0, 0, 'Please email me', 0, 1, 'L');
    $pdf->Cell(0, 0, '1 - Ref no.', 0, 1,'L');
    $pdf->Cell(0, 0, '2 - Invoice no.', 0, 1, 'L');
    $pdf->Cell(0, 0, '3 - Date and time hh:mm:ss', 0, 1, 'L');
    $pdf->Cell(0, 0, '4 - Value.', 0, 1, 'L');

    with the hope of getting the text will be printed line by line but what I got is that all the text is printed on the same line (left feed but no carriage return).

    I would like to use MultiCell() but I don't know the format

    Here's the cutout image from the pdf invoice. Please ignore the text as it is in Malay.

    I've tried omitting the alignment parameter but to no avail.

  5. torboxz
    Member
    Posted 3 years ago #

    I've tried using multicell but still the same.

  6. Ovidiu
    Member
    Posted 3 years ago #

    I need to edit the footer, this is the original: $footer_text = $dp_shopping_cart_settings['shop_name'] . $vat_id;

    this is my try: $footer_text = $dp_shopping_cart_settings['shop_name'] . $vat_id . echo('Bank Name'); . $dp_shopping_cart_settings['bank_name'] . echo('BAnk Routing #'); . $dp_shopping_cart_settings['bank_routing'] . echo('Bank Account') . $dp_shopping_cart_settings['bank_account'] . echo('Bank Account Owner'); . $dp_shopping_cart_settings['bank_account_owner'];

    I get some error: PHP Parse error: syntax error, unexpected T_ECHO in /var/www/clients/clientxx/webxx/web/wp-content/plugins/dukapress/dukapress.php on line 1454

    I'm not really a coder, anyone can help out here?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags