Title: extra column with attributes
Last modified: May 13, 2018

---

# extra column with attributes

 *  Resolved [fepabe](https://wordpress.org/support/users/fepabe/)
 * (@fepabe)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/extra-column-with-attributes/)
 * Good morning. I tried to add an extra column with the attributes of a product.
   My intention was to add the attributes below the product description but I failed
   and I had to add an extra column.
 * I’ve added …
 * <th class=”attribute”><?php _e(‘Note’, ‘woocommerce-pdf-invoices-packing-slips’);?
   ></th>
 * and ….
 * <td><?php if(!empty($item[‘product’])) $this->product_attribute(‘Gratuito’, $
   item[‘product’]); ?></td>
 * In doing so, the total is no longer aligned on the left but remains centered 
   on the second and third columns.
 * 1) Can you check if my code is correct?
    2) How can I move the totals of a column?
   3) And if instead I wanted to put the attributes under the description of each
   product?
 * Thank you
 * Federico

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/extra-column-with-attributes/#post-10277440)
 * Hi Federico!
    Here are the answers to your questions:
    1. The code looks fine to me
    2. You will need to modify the table column properties of the totals, so that the
       total number of columns is the same. You can do this by adding a colspan to 
       the first cell in the table footer, changing `<td class="no-borders">` (only
       of that first cell) to `<td class="no-borders" colspan="2">`.
    3. Simply put the code in the `<td class="product">...</td>` cell.
 * Hope that helps – good luck!
 * _[ [Signature deleted](https://wordpress.org/support/guidelines/#avoid-signatures)]_
 * p.s. if coding/html is not your strongsuit, I can really recommend the [Premium templates extension](https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-premium-templates/),
   which will let you do stuff like this without any coding.

Viewing 1 replies (of 1 total)

The topic ‘extra column with attributes’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

## Tags

 * [extra column](https://wordpress.org/support/topic-tag/extra-column/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ewout](https://wordpress.org/support/users/pomegranate/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/extra-column-with-attributes/#post-10277440)
 * Status: resolved