﻿

/* Application specific */
orderService = new OrderService(); 

function addProductToBasket(classifierPath, productId, count)
{
	if(count == null) {
		count = parseInt($('#count_' + productId).val());
		if(isNaN(count))
			count = 1;     
	}

    orderService.checkProduct(classifierPath, productId, count, function(response){
            if(response.result)
            {
                $('#basket_info .inner').html(response.result);
                $('#basket_info').fadeIn();           
            } else
            {
				alert(response.error.message);
                //alert('По техническим причинам добавить товар в Вашу корзину не удалось.');
            }
        });

    return false;
}
