$.ajax({
type: "POST",
url: 'ajax_subtotal.php',
data: listing_id=listId,
dataType:'json',
success: function(data)
{
if(data['result']=='success')
{
alert(data['pricing']);
}
}
data['pricing']gives me the price of one product. The function calls when the quantity of the product changes. So, how can I calculate the total cost of several products at once?
source
share