
function getProducts()
{
    var data    =   new FormData();
    data.append("request", "get_products");
    $.ajax
    ({
        type: "POST",
        enctype: 'multipart/form-data',
        url: "../../controllers/product.php",
        data: data,
        processData: false,
        contentType: false,
        cache: false,
        timeout: 600000,
        async: true,
        success: function (response) 
        {
            debugger;
            response    =   JSON.parse(response);
            if((response["html"]))
            {
                $("#ProductsWrapper").html('');
                $("#ProductsWrapper").html(response["html"]);
                $("#ProductsTable").DataTable();
            }

        },
        error: function (e) 
        {
            console.log("ERROR : ", e);
        }
    });
}














$(document).ready(function()
{

    getProducts();

});