, ,

How To Add Custom Fields In WooComerce Product Table

Custom Field in product table

This is a step by step tutorial on how you can add Custom Fields In WooComerce Product Table and show extra product data.

 

What is custom fields?

The fields you use in your site such as product title, price, ratings, date are called metadata. Those fields are given as default in WooCommerce site.

But, if you want to add a field say brand for your products, that field are not available on WooCommerce. To do this you need to add an extra fields by using Custom Fields creator.

The uses of Custom Fields are so much to describe in a word. Let’s have look how you can use Custom Fields In WooComerce Product Table.

  • Too add an email address
  • To add Maps
  • To show extra info like author or Class for a product
  • Product image/description/price etc

How to add Custom Fields?

Add and configure your Custom Fields following the five easy steps.

 

Step 1: Installation and Activate Custom Fields

In this guide we’ve used Advanced Custom Fields plugin with Woo Product Table pro plugin.

To add a Custom Fields in your WooCommerce site log in your site. From Dashboard navigate to plugin. On the top-left of the screen click on add new. Then in search option type acf. You will see some plugin. Try Advanced Custom Fields among them.

 

acf-for-Product-table

Install Advanced Custom Field

 

Install the plugin and and active it. You can active it from Dashboard->Plugins->Installed Plugins->Advanced Custom Field and then active it.

 

Step 2: Add Field Group

Now navigate to Dashboard ->Custom Field->Add New

From the top of the screen input your Field Group Title in Add New Field Group. Here I’ve input Brand Name. Input yourself what you want.

 

add custom field for product table

Add field group for product table

 

Step 3: Configure Field details

Then click on add field right-left to the screen.

After that select your Field Label from Field level option. Here I’ve given Brand as Field Level. Here Field Name will be taken automatically.

Now select Field Type. Here are a lot of options. You can set Text/Number/Email/Message/Checkbox and some other options. So choose what you want to add as custom field.

Here I’ve selected Text as my Brand name is a text.

 

field-acf-product-table

Configure field details

 

Step 4: Configure Location

The good news is you can add Custom field anywhere like post/page/template. To select the functionality go to Location.

I want to add custom field as post in our product. So I’ve selected Post Type in “Show this field group if”.

Also select the field “is equal to product” to Product.

 

Select location

Select location

 

Step 5: Publish Page

Now click on Publish button from the top of the page.

 

Publish ACF

Publish ACF

 

So I’ve created an Advanced Custom Field option for Product.

Before I’ve said that custom fields can be added anywhere. In this guide I’ve used this custom field in a WooCommerce Product Table.

If you want to know about the plugin have a look into my previous post about Woo Product Table Pro.

Before showing a custom fields in Product Table  let’s look how is the table.

 

Product table without custom fields

Product table without custom fields

 

There I want to add an extra column for Brand. I mean, I’ll add a column that will show products of different brand.

 

How to show Custom Fields?

In three steps you can show the created Custom Fields In WooComerce Product Table.

Step 1: Add Brand name Value to Product

To show Custom Fields In WooComerce Product Table navigate to Dashboard->Products->All Products

Click on the products to edit. Just up to the bottom of screen there you will get a Brand Name option. Select your brand name in text-box named Value. I put here Polo for for a Tshirt.

 

Select brand

Select brand

Select brand

 

Finally Publish the product page.

 

Step 2: Configure the Shortcode

Now go to shortcode generator of Woo Product Table pro (Dashboard->Product Table->Product Table) and generate shortcode. Copy the shortcode and paste in which page/post you want to show the custom fields.

 

You can follow my previous post WooCommerce Product Table : Boost Your Sale to know in details to know about configuring shortcode.

 

Now in the desired page add cf_brand, just following to product_title in the column_keyword’s inverted comma(“”)

 

input column header

Here I’ve given brand as I selected Field Name to brand before.

Note: Always select small letter for this sector.

Now type Brand, after Product Title in column-title’s inverted comma (“”) section as I’ve shown below.

 

input column title

 

Step 3: Publish/Update the Page

Then update the page and from the top of the page click on view page.

Then there will be a additional column say Brand. And the Product table may look like after adding the custom field:

 

Custom Field in product table

Custom Field in product table

 

So here an extra column has appeared than before named Brand.

Though using Custom Fields In WooComerce is a tedious task to do for a beginner, anyone can do it following the above steps. I hope you’ve gotten it using Custom Field. If you have more specific question, please leave a comment below.