"; ins_body += ""+productItems[1]+"
"; ins_body += "
Общая цена: "+productItems[3]+"
"; ins_body += "
Количество: "+productItems[2]+"
"; ins_body += "
"; ins_body += "Удалить"; ins_body += "
|
"; ins_body += "Заказать
|
"; td.innerHTML = ins_body; if(count_of_orders>0) { if($('no_articles')) { $('no_articles').style.display = 'none'; } } else { if($('no_articles')) { $('no_articles').style.display = 'block'; } } if(count_of_orders>1) { document.getElementById("order_all_btn").style.display = 'block'; } else { document.getElementById("order_all_btn").style.display = 'none'; } } ajaxObjects[ajaxIndex] = false; } function removeProductFromBasket(productId) { var productRow = document.getElementById('shopping_cart_items_product' + productId); count_of_orders--; if(count_of_orders>1) { $('no_articles').style.display = 'none'; } else { if(count_of_orders= 1) { var ajaxIndex = ajaxObjects.length; ajaxObjects[ajaxIndex] = new sack(); ajaxObjects[ajaxIndex].requestFile = url_addProductToBasket; // Saving product in this file ajaxObjects[ajaxIndex].setVar('productId', productId); ajaxObjects[ajaxIndex].setVar('count', count_set); ajaxObjects[ajaxIndex].onCompletion = function(){showAjaxBasketContent(ajaxIndex);}; // Specify function that will be executed after file has been found ajaxObjects[ajaxIndex].runAJAX(); // Execute AJAX function } else { alert('Количество товара необходимо указывать положительным, целым числом.'); } }