+7 (863) 226-17-14, 226-44-82
' + '' + '' + //img '' + '' + //свойства '' + '' + '' + //delete '' + '' ); StartShopFlyBasket.Data.Items.forEach(function(item){ var row = $(''); row.append($('')); row.append($( '' )); row.append($( '' )); var propCell = $(''); var propCellWrapper = $('
'); if (Array.isArray(item.props)) { var propCellInsideWrapper = $('
'); item.props.forEach(function(value){ var propCellText = $('
'); var propCellName = $('
' + value.name + ':
'); propCellText.append(propCellName); var propCellValue = $('
' + value.value + '
'); propCellText.append(propCellValue); propCellInsideWrapper.append(propCellText); }); propCellWrapper.append(propCellInsideWrapper); } propCell.append(propCellWrapper); row.append(propCell); row.append($( '' )); var quantityCell = $(''); var quantityCellWrapper = $('
'); var quantityCellNumeric = $('
'); var quantityCellButtonDec = $(''); quantityCellNumeric.append(quantityCellButtonDec); var quantityCellText = $(''); quantityCellNumeric.append(quantityCellText); var quantityCellButtonInc = $(''); quantityCellNumeric.append(quantityCellButtonInc); var Quantity = new Startshop.Controls.NumericUpDown({ Value: +item.quantity, Minimum: 1, Ratio: 1, Maximum: 1, Unlimited: true, ValueType: "float" }); Quantity.Settings.Events.OnValueChange = function ($oNumeric) { var oldValue = $('#startshop_basket_small_fly_000000004348aedc000000000ca4ecdf .QuantityNumeric'+item.id).val(); var id = item.id; var amount = $oNumeric.GetValue(); $.ajax({ type: "POST", url: "/ajax/basket.php", data: { action: "quantity", id: id, amount: amount }, success: function (res) { if (res.success === true) { quantityCellText.val(amount); StartShopFlyBasket.Data.Count = res.basket.count; StartShopFlyBasket.Data.FullCount = res.basket.full_count; StartShopFlyBasket.Data.Sum = res.basket.sum; StartShopFlyBasket.SetTitle(); } }, error: function () { Quantity.SetValue(oldValue); } }); }; quantityCellButtonInc.click(function () { Quantity.Increase(); }); quantityCellButtonDec.click(function () { Quantity.Decrease(); }); quantityCellText.change(function () { Quantity.SetValue($(this).val()); }); quantityCellWrapper.append(quantityCellNumeric); quantityCell.append(quantityCellWrapper); row.append(quantityCell); var deleteCell = $(''); var deleteCellWrapper = $('
'); var deleteCellLink = $(''); deleteCellLink.click(function(){ StartShopFlyBasket.DeleteRow(item.id); }); deleteCellWrapper.append(deleteCellLink); deleteCell.append(deleteCellWrapper); row.append(deleteCell); row.append($('')); table.append(row); }); container.append(table); basket.append(container); basket.append( '
'+ '
Закрыть
' + ''+ '
' ); } StartShopFlyBasket.SetTitle(); if (cb && typeof(cb) === "function") cb(); }
+7 (863) 226-17-14, 226-44-82
Заказать звонок
'); } else { basket.append('
Товаров в корзине '+StartShopFlyBasket.Data.Count+' — '+StartShopFlyBasket.Data.Sum+' руб.
'); var container = $('
'); var table = $('
'); table.append( '
Наименование
Цена
Количество
' + '
' + '
' + '
' + '' + '
' + '
' + '
' + '
' + '' + item.name + '' + '
' + '
' + '
' + item.price + ' руб.' + '
' + '