<?php
/**
 * This template is used for displaying the WooCommerce product commission wrapper.
 *
 * This template can be overridden by copying it to yourtheme/affs/dashboard/wc-product-commission-wrapper.php
 *
 * To maintain compatibility, Sumo Affiliates Pro will update the template files and you have to copy the updated files to your theme
 */
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly.
}
?>
<p class='fs-product-commission-filters fs-frontend-filter'>
    <input type='text' class='fs-product-commission-search fs-frontend-search' value='<?php echo esc_attr($search); ?>' />
    <button type='button' class='fs-product-commission-search-btn fs-frontend-search-btn'><?php _e('Search Products', FS_AFFILIATES_LOCALE); ?></button>
</p>

<table class="fs-affiliates-product-commisssion-table">   
    <thead>
        <tr> 
            <th><?php _e('SKU', FS_AFFILIATES_LOCALE); ?></th>
            <th><?php _e('Product Name', FS_AFFILIATES_LOCALE); ?></th>
            <th><?php _e('Product Price', FS_AFFILIATES_LOCALE); ?></th>
            <th><?php _e('Commission Value', FS_AFFILIATES_LOCALE); ?></th>
            <th><?php _e('Commission Amount', FS_AFFILIATES_LOCALE); ?></th>  
        </tr>
    </thead>
    <tbody>
        <?php
        fs_affiliates_get_template('dashboard/wc-product-commissions.php', array('product_ids' => $product_ids ,'affiliate_id'=>$affiliate_id));
        ?>
    </tbody>       
    <?php if ($pagination['page_count'] > 1) : ?>
        <tfoot>                
            <tr>
                <td colspan="<?php echo esc_attr($count); ?>" class="footable-visible actions">               
                    <?php
                    fs_affiliates_get_template('dashboard/pagination.php', array('pagination' => $pagination));
                    ?>                
                </td>
            </tr>
        </tfoot>
    <?php endif; ?>
</table>
    <?php

