Posted on

How to install Woo Product Table Pro Plugin

Introduction

You can create a beautiful and user friendly product table very easily. Our product table provides many more features like drag and drop elements, Sorting table data, advance search option. Also have responsive layout, pagination and third party plugin supports. You can easily change table design as you want.

How to install

From v7.0.0, we have made our “Woo Product table Pro” plugin as an addon of our free plugin “Woo Product Table – Free WooCommerce Table view solution.”
So from now, our free plugin must have to be installed to activate Woo Product Table Pro. So let’s start ..

From your WordPress admin panel –

  1. Navigate to : Plugins -> Add New

  2. Type “Woo Product Table” in Search Plugins … and press Enter

  3. Choose Woo Product Table Plugin by CodeAstrology and click “Install now”


  4. And now click “Activate”


  5. Now first extract your zip file, what you have downloaded from Codecanyon. And enter to extracted folder. up to -> inside [Main Files] folder.


  6. Chose right plugin file. Like following screenshot:


  7. Now from WordPress Admin Panel, go to Plugins > Installed Plugins


  8. Click on the “Add New” button


  9. Click on the “Upload Plugin” button


  10. Activate the newly installed Plugin


That’s it !

Posted on

WooCommerce Product’s Variables Show as Individual Row

We have introduced a new feature in Woo Product Table Pro. From now you can show variable drop downs as separate row. Each variable combination will place in an individual row.

Let’s see how to display variations in separate row. Currently there is only one way to do this. Follow the below steps to show WooCommerce products variations in separate rows.

  1. Create a table

    First create a product table. Check this to learn about How to Create WooCommerce Product Table.

  2. Select a Variable Product

    Now select a variable product to show it’s variations in a table like this demo product table.how-to-variations

  3. Select Product Type

    You can see in above image, I have selected Product Type to Only Variation Product. You also have to select this option to create variation table.

  4. Paste the Shortcode

    Now copy and paste the shortcode to that product’s content area which one you have selected in Step 2 product include field.

Now you can see a variable product table for Woocommerce variable product.

Posted on

How to Add Custom Column using Action and Filter Hooks

In Woo Product Table plugin, there are lots of column already we have added. But for you maybe those are not enough. You wanted to add more custom column. That’s why I am writing this tutorial.

First we have to our custom column in default column array using wpto_default_column_arr filter.

if( !function_exists( 'new_shortcode_column' ) ){
   function new_shortcode_column( $column_array ) {
       $column_array['new_shortcode'] = 'New Shortcode';
       return $column_array;
   }
}
add_filter( 'wpto_default_column_arr', 'new_shortcode_column' );

We have added our new shortcode column to default column array. Now we need a file where we can add the content for that custom shortcode. Below this code is used in our addon plugin. Which you can find at branch New Shortcode Column – link to https://github.com/codersaiful/UltraAddons-addons/tree/new_shortcode_column

Below we have used wpto_template_loc_item_ . $keyword filter.

if( !function_exists( 'temp_file_for_new_shortcode' ) ){
    function temp_file_for_new_shortcode( $file ){
        //$file = __DIR__ . '/../file/hello.php';
        $file = $your_file_location;
        return $file;
    }
}
add_filter( 'wpto_template_loc_item_new_shortcode', 'temp_file_for_new_shortcode', 10 );

Now we need to add a input field for get the custom shortcode from user. here we have used wpto_column_setting_form_ . $keyword action to add the input field inside column area in column tab.

function input_for_new_shortcode($column_settings){
    $text = isset( $column_settings['new_shortcode']['text'] ) ? $column_settings['new_shortcode']['text'] : false;
    ?>
<input class="ua_input" name="column_settings[new_shortcode][text]" value="<?php echo esc_attr( $text ); ?>">
<?php 
}
add_action( 'wpto_column_setting_form_new_shortcode', 'input_for_new_shortcode' );

Now we have to show the shortcode content using our custom file. Here we have used hello.php

<?php
$my_shortcode = isset( $settings['text'] ) ? $settings['text'] : '';
echo do_shortcode( $settings['text'] );