hi garret...

here is the json responsei get:

{
        "product_id":"000003",
        "product_name":"Sample shoe",
        "product_brand":"Shoe Brand",
        "product_slug":"slug3",
        "product_description":"description3",
        "product_active":"1",
        "product_type":"shoe",
        "product_gender":"youth",
        "product_sizes":"14",
        "product_style":"style 3",
        "product_categories":"3",
        "product_shipping":"shipping 3",
        "product_cost":"40.0",
        "product_retail":"70.0"
}


here is how i have been trying to deal with it:
function getProductInfo(product_id) {
    jQuery.post(
        "/wp/wp-admin/admin-ajax.php", {
            action: "getProductInfo",
            'cookie': encodeURIComponent(document.cookie),
            'product_id': product_id
       },function(obj) {
           jQuery.each(obj, function(i, val) {
                jQuery('#' + i).attr('value',val);
           });
       },"JSON");
}

thanks again... i appreciate your time...

Reply via email to