• Resolved DCLVBS

    (@decalvibes)


    Hi there,

    I am currently facing the issue that the pw giftcard amount is not showing at pdf invoice document as a discount. I already got in touch with the plugin developer of the pdf invoices plugin but he informed me as follows:

    “The value of the discount will only be taken if it is included inside our Order object discount. We assume that you are showing this separately, and not inside the default discount”

    I can confirm that the pw discount is showing separately. Could you implement the giftcard discount inside the default discount so it will be shown at the document which will generated by the “PDF Invoices and Packing Slips For WooCommerce”-Plugin? Or do you have any other solution?

    Currently it looks like:

    Subtotal: 100€
    Discount 0€
    Total: 50€

    I am looking forwad to hearing from you soon.
    Many thanks in advance!

    Br, Alex

Viewing 7 replies - 1 through 7 (of 7 total)
  • I second this !!

    On my PDF invoice, no record is shown of the PW gift Card amount that was deducted from my balance.

    It shows for instance:

    Order Subtotal : € 52.00
    Shipment costs : €7.50
    Order Total : € 14.50

    and is nowhere it is showing where the €45.00 went to, my accountant is not pleased !!!

    We should have a discount line between shipment and order total, telling the PW giftcard discount that was deducted, like it shows in the Admin order detail screen.

    Thread Starter DCLVBS

    (@decalvibes)

    Hi @pimwick

    as this is a urgent issue, could please anybody spent his attention in this case? I am looking forward to hearing from you soon.

    Many thanks in advance!
    Br, Alex

    Plugin Author pimwick

    (@pimwick)

    I just tested with PDF Invoices & Packing Slips for WooCommerce version 3.2.6 and the gift card amount was shown in the totals section.

    This seems to be an issue with custom invoice templates. Reach out to the WP Overnight support team and they should be able to assist you in ensuring that the gift card information appears on the custom invoice PDF templates.

    Thread Starter DCLVBS

    (@decalvibes)

    Hi @pimwick

    thank you for you reply! Sorry It looks like the plugins are titled similar.
    The plugin I am using is: PDF Invoices and Packing Slips For WooCommerce PRO (by Acowebs).

    In the meantime they informed me to edit the invoice template to show your plugins gift-card amount on it:

    “The value of the discount will only be taken if it is included inside our Order object discount. We assume that you are showing this separately, and not inside the default discount. You will have to add this manually by customizing the file from the theme”

    Here is the code I should edit:

    										if( $discount_show ){
    											$html .= "<tr>
    												<td style='".$discount_lbl_style."'>".__($discount_lbl, 'pdf-invoices-and-packing-slips-for-woocommerce')."</td>
    												<td style='".$discount_cost_style."'>"."- ".wc_price($order_data['total_discount'], array('currency' => $order_data['currency']))."</td>
    											</tr>";
    										}
    
    										if( $discount_tx_show ){
    											$html .= "<tr>
    												<td style='".$discount_tx_lbl_style."'>".__($discount_tx_lbl, 'pdf-invoices-and-packing-slips-for-woocommerce')."</td>
    												<td style='".$discount_tx_cost_style."'>"."- ".wc_price($order_data['discount_tax'], array('currency' => $order_data['currency']))."</td>
    											</tr>";
    										}

    But what should I change/implementt there to be able to show both the default discounts from woocommerce and your giftcard amount?

    Could you help me here?
    Many thanks in advance for your efforts!

    Br, Alex

    Plugin Author pimwick

    (@pimwick)

    Customizing their template is beyond the scope of what we can support, however here is a sample bit of code showing how to retrieve the gift cards applied to an order:

    foreach( $order->get_items('pw_gift_card') as $item_id => $item ) {
        $item_data = $item->get_data();
    
        if ( empty($item_data) ) {
            return;
        }
    
        $card_number = $item_data['card_number'];
        $amount = wc_price( $item_data['amount'] );
    }

    Perhaps if you share that code with their support team they can turn it into the code needed for their template file?

    Plugin Author pimwick

    (@pimwick)

    I’m marking this thread as resolved since we haven’t heard back but let us know if you need additional help.

    Thread Starter DCLVBS

    (@decalvibes)

    Hi @pimwick

    thank you so much for your reply! Your code snippet helped a lot. I edited the document template regarding this. Now the giftcard amount is displaying on the invoices as required.

    Yes you can mark this thread as solved 🙂

    Thank you!!
    Br, Alex

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Redeemed PW Giftcards Coupon Amount not showing on PDF invoices’ is closed to new replies.