LeighMartin
Forum Replies Created
-
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] add shipping method to invoiceThanks again for such speedy help Ewout. It works beautifully.
I win the prize for biggest idiot
/product/126/*
works perfectly well IF you have enough brains to find the ‘use wildcard’ tickbox at the very bottom of the list of 301s.
Sorry! But perhaps this will help someone else in future!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] order numberHi Ewout,
Wonderful, thanks so much for getting back to me so quickly, your support is really great,
Kind regards
LeighOops! If I had even half a brain it would help! This is working perfectly now.
Thanks again for the support, definitely 5*
Leigh
Don’t think that made much of a difference, I think it was more me than the code. When I tried again, it all seemed to work so the code above is still in my invoice.
Hi Ewout,
Many thanks for your quick reply, it worked! Your support is fab 🙂
I made a few other changes in addition – the totals didn’t line up, had to set column width to 4 for the rest of the invoice but it all seems to work now, so I’ll post it below for reference:
<table class="order-details"> <thead> <tr> <th class="product-label"><?php _e('Product', 'wpo_wcpdf'); ?> </th> <th class="attributes-label"><?php _e('Size and Colour', 'wpo_wcpdf'); ?> </th> <th class="quantity-label"><?php _e('Quantity', 'wpo_wcpdf'); ?> </th> <th class="price-label"><?php _e('Price', 'wpo_wcpdf'); ?></th> </tr> </thead> <tbody> <?php $items = $wpo_wcpdf->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item ) : ?> <tr> <td class="description"> <?php $description_label = __( 'Description', 'wpo_wcpdf' ); // registering alternate label translation ?> <span class="item-name"> <?php echo $item['name']; ?> </td><td><dl class="meta"> <?php $description_label = __( 'SKU', 'wpo_wcpdf' ); // registering alternate label translation ?> <?php if( !empty( $item['sku'] ) ) : ?><span class="item-meta"> <?php echo $item['meta']; ?> <?php if ( isset($item['item']['item_meta']['pa_Size'] ) ) { echo implode(', ', $item['item']['item_meta']['pa_size']); } ?><?php if ( isset($item['item']['item_meta']['pa_Colour'] ) ) { echo implode(', ', $item['item']['item_meta']['pa_colour']); } ?> <dd> </dd> <?php endif; ?> <?php if( !empty( $item['weight'] ) ) : ?> <dt> <?php _e( 'Weight:', 'wpo_wcpdf' ); ?></dt><dd><?php echo $item['weight']; ?> <?php echo get_option('woocommerce_weight_unit'); ?> </dd><?php endif; ?> </dl> </td> <td class="quantity"> <?php echo $item['quantity']; ?> </td> <td class="price"> <?php echo $item['order_price']; ?> </td> </tr> <?php endforeach; endif; ?> </tbody> <tfoot> <tr class="no-borders"> <td class="no-borders" colspan="4"> <table class="totals"> <tfoot> <?php foreach( $wpo_wcpdf->get_woocommerce_totals() as $total ) : ?> <tr> <td class="no-borders"> </td> <th class="description"><?php echo $total['label']; ?></th> <td class="price"><span class="totals-price"><?php echo $total['value']; ?></span></td> </tr> <?php endforeach; ?></tfoot> </table>Not to worry, this was easily sorted