WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Print Invoice & Delivery Note
Add extra column with product price (4 posts)

  1. rzproducts
    Member
    Posted 1 year ago #

    Hi,

    I would like to add another column with the product listing price (per piece) instead of only the total. It is confusing to my clients when I add an order with 15 pieces of a product, and it only displays the total amount instead of the price per piece.

    Is this possible?

    Thanks!

    http://wordpress.org/extend/plugins/woocommerce-delivery-notes/

  2. zkingdesign
    Member
    Posted 10 months ago #

    I want to know this too. Did you manage to solve it meanwhile?

    Thanks.

  3. zkingdesign
    Member
    Posted 10 months ago #

    I managed to figure it out. So here's the solution. Go to plugin\templates\print\print-delivery-note.php find <table> around line 62

    <table>
    						<thead>
    							<tr>
    								<th class="product-label"><?php _e('Product', 'woocommerce-delivery-notes'); ?></th>
    								<th>U.M</th>
    								<th class="quantity-label"><?php _e('Cantitatea', 'woocommerce-delivery-notes'); ?></th>
    								<th class="totals-label"><?php _e('Pretul Unitar -lei-', 'woocommerce-delivery-notes'); ?></th> // this is the single price table heading
    								<th class="totals-label"><?php _e('Valoarea -lei-', 'woocommerce-delivery-notes'); ?></th>
    							</tr>
    						</thead>
    						<tbody>
    							<?php $items = wcdn_get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item ) : ?><tr>
    								<td class="description"><?php echo $item['name']; ?>
    									<?php echo $item['meta']; ?>
    									<dl class="meta">
    										<?php if( !empty( $item['sku'] ) ) : ?><dt><?php _e( 'SKU:', 'woocommerce-delivery-notes' ); ?></dt><dd><?php echo $item['sku']; ?></dd><?php endif; ?>
    										<?php if( !empty( $item['weight'] ) ) : ?><dt><?php _e( 'Weight:', 'woocommerce-delivery-notes' ); ?></dt><dd><?php echo $item['weight']; ?><?php echo get_option('woocommerce_weight_unit'); ?></dd><?php endif; ?>
    									</dl>
    								</td>
    								<td>BUC.</td>
    								<td class="quantity"><?php echo $item['quantity']; ?></td>
    								<td class="price"><?php echo $item['single_price']; ?></td> // this adds the single price for item
    								<td class="price"><?php echo $item['price']; ?></td>
    							</tr><?php endforeach; endif; ?>
    						</tbody>
    					</table>
  4. MartaM
    Member
    Posted 3 months ago #

    I have used this method to printing price per piece, but it doesn't work after plugin update.
    Do you have any ideas?

    Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic