Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Add Column to products table
Tagged: products page
- This topic has 3 replies, 2 voices, and was last updated 6 years, 4 months ago by WCFM Forum.
- AuthorPosts
- August 9, 2018 at 1:16 pm #28012RamiParticipant
Hi,
I am trying to add a column to the vendor products table that contains ACF field (a dynamic link to other pages), I added the column to woocommerce back end products table, and I thought it will be auto generated by WCFM, but it didn’t.
What filter do I need to use to add the column and contents for the table.
Thanks. - August 9, 2018 at 4:51 pm #28085WCFM ForumMember
Hi,
WCFM Vendor dashboard has an additional hidden column, you may use that for the purpose.
Use this filter for display the data – apply_filters( ‘wcfm_vendors_additonal_data’, ‘–’, $wcfm_vendors_id );
You may change that column name using this filter – apply_filters( ‘wcfm_vendors_additional_info_column_label’, __( ‘Additional Info’, ‘wc-frontend-manager’ ) );
And off course add this line of code to make that column visible –
add_filter( 'wcfm_vendors_additonal_data_hidden', '__return_false' );
Feel free to ask me if you require any other assistance on this!
Thank You
- August 9, 2018 at 11:13 pm #28114RamiParticipant
Thank you for your reply and I appreciate your help, but I think I didn’t make my needs clear enough.
The filters above are to add additional column to “vendors” table in the admin WCFM dashboard, but what I needed is to add the column to the “products” table in the vendor WCFM dashboard, where the vendor is the logged in user.
Please see the attached image, and forgive me, the site is RTL and in Arabic.
Thanks. - August 10, 2018 at 6:05 am #28127WCFM ForumMember
Hi,
Ahh … sorry, may be I got your requirement wrongly.
Well, Products table also has a “Additional Column” for showing extra data. But this can’t be visible the position you have mention –
For here,
1. Show data using this filter – apply_filters( ‘wcfm_products_additonal_data’, ‘–’, $product_id );
2. Change column name by this filter – apply_filters( ‘wcfm_products_additional_info_column_label’, __( ‘Additional Info’, ‘wc-frontend-manager’ ) );
3. Make this visible by adding this line of code –add_filter( 'wcfm_products_additonal_data_hidden', '__return_false' );
Thank You
- AuthorPosts
- The topic ‘Add Column to products table’ is closed to new replies.