Apollo.cart.products = {
	
	'updateQty' : function(productType,productId,divContentId) {
		
		$('#'+ divContentId ).removeClass('pharmaQtyStock');
		$('#'+ divContentId ).addClass('pharmaQtyStockLoading');
		
		$.ajax({
			'url'			: '/'								,
			'cache'			: false								,
			'dataType'		: 'json'							,
			'async'			: true								,
			'type'			: 'POST'							,
			
			'data'			: {
				'takeaction'	: 'pharmaProductQtyUpdate'			,
				'frmtype'		: ''								,
				'productType'	: productType						,
				'productId'		: productId
			},

			'error'			: function(XMLHttpRequest, textStatus, errorThrown) {
				
				$('#'+ divContentId ).removeClass('pharmaQtyStockLoading');
				$('#'+ divContentId ).addClass('pharmaQtyStock');
				
			},

			'success'		: function(data, textStatus, XMLHttpRequest) {
				
				$('#'+ divContentId ).removeClass('pharmaQtyStockLoading');
				$('#'+ divContentId ).addClass('pharmaQtyStock');

				if ( ! data['ok'] ) {
					return ;	
				}
				
				$('#'+ divContentId).html( data['qty'] 		);
				
			}
		});
	}
	
};
