diff --git a/asserts/media/categories/C--fakepath-KaspBis_190x220.png b/asserts/media/categories/C--fakepath-KaspBis_190x220.png deleted file mode 100644 index 7636c5c..0000000 Binary files a/asserts/media/categories/C--fakepath-KaspBis_190x220.png and /dev/null differ diff --git a/asserts/media/categories/C--fakepath-KaspVirt_190x224.png b/asserts/media/categories/C--fakepath-KaspVirt_190x224.png deleted file mode 100644 index e00f7de..0000000 Binary files a/asserts/media/categories/C--fakepath-KaspVirt_190x224.png and /dev/null differ diff --git a/asserts/media/categories/KaspDLP.png b/asserts/media/categories/KaspDLP.png deleted file mode 100644 index 4784291..0000000 Binary files a/asserts/media/categories/KaspDLP.png and /dev/null differ diff --git a/asserts/media/categories/KaspHome.png b/asserts/media/categories/KaspHome.png deleted file mode 100644 index 73c5d41..0000000 Binary files a/asserts/media/categories/KaspHome.png and /dev/null differ diff --git a/asserts/media/categories/KaspServer.png b/asserts/media/categories/KaspServer.png deleted file mode 100644 index 396b788..0000000 Binary files a/asserts/media/categories/KaspServer.png and /dev/null differ diff --git a/asserts/media/categories/KaspVirt.png b/asserts/media/categories/KaspVirt.png deleted file mode 100644 index e00f7de..0000000 Binary files a/asserts/media/categories/KaspVirt.png and /dev/null differ diff --git a/asserts/media/categories/KasperDataCenter.png b/asserts/media/categories/KasperDataCenter.png deleted file mode 100644 index 2143b1c..0000000 Binary files a/asserts/media/categories/KasperDataCenter.png and /dev/null differ diff --git a/asserts/media/payment/Payment_foot.jpg b/asserts/media/payment/Payment_foot.jpg deleted file mode 100644 index f55fc91..0000000 Binary files a/asserts/media/payment/Payment_foot.jpg and /dev/null differ diff --git a/asserts/media/payment/Payment_foot.png b/asserts/media/payment/Payment_foot.png deleted file mode 100644 index 723e2b8..0000000 Binary files a/asserts/media/payment/Payment_foot.png and /dev/null differ diff --git a/asserts/media/payment/Payment_header.png b/asserts/media/payment/Payment_header.png deleted file mode 100644 index e3e28fb..0000000 Binary files a/asserts/media/payment/Payment_header.png and /dev/null differ diff --git a/asserts/media/payment/payment_header.jpg b/asserts/media/payment/payment_header.jpg deleted file mode 100644 index e1a49bd..0000000 Binary files a/asserts/media/payment/payment_header.jpg and /dev/null differ diff --git a/asserts/media/producers/1C.png b/asserts/media/producers/1C.png deleted file mode 100644 index e1946b6..0000000 Binary files a/asserts/media/producers/1C.png and /dev/null differ diff --git a/asserts/media/producers/Acronis.png b/asserts/media/producers/Acronis.png deleted file mode 100644 index c001461..0000000 Binary files a/asserts/media/producers/Acronis.png and /dev/null differ diff --git a/asserts/media/producers/Adobe.png b/asserts/media/producers/Adobe.png deleted file mode 100644 index 776551f..0000000 Binary files a/asserts/media/producers/Adobe.png and /dev/null differ diff --git a/asserts/media/producers/Autodesc.png b/asserts/media/producers/Autodesc.png deleted file mode 100644 index ac808cf..0000000 Binary files a/asserts/media/producers/Autodesc.png and /dev/null differ diff --git a/asserts/media/producers/Autodesc_16XiloX.png b/asserts/media/producers/Autodesc_16XiloX.png deleted file mode 100644 index ac808cf..0000000 Binary files a/asserts/media/producers/Autodesc_16XiloX.png and /dev/null differ diff --git a/asserts/media/producers/Corel.png b/asserts/media/producers/Corel.png deleted file mode 100644 index 3c76041..0000000 Binary files a/asserts/media/producers/Corel.png and /dev/null differ diff --git a/asserts/media/producers/DrWeb.png b/asserts/media/producers/DrWeb.png deleted file mode 100644 index 22dc000..0000000 Binary files a/asserts/media/producers/DrWeb.png and /dev/null differ diff --git a/asserts/media/producers/Eset.png b/asserts/media/producers/Eset.png deleted file mode 100644 index 9dfa0fa..0000000 Binary files a/asserts/media/producers/Eset.png and /dev/null differ diff --git a/asserts/media/producers/Kerio.png b/asserts/media/producers/Kerio.png deleted file mode 100644 index 1cc298a..0000000 Binary files a/asserts/media/producers/Kerio.png and /dev/null differ diff --git a/asserts/media/producers/Radmin.png b/asserts/media/producers/Radmin.png deleted file mode 100644 index c71dc9b..0000000 Binary files a/asserts/media/producers/Radmin.png and /dev/null differ diff --git a/asserts/media/producers/img_1395923930.png b/asserts/media/producers/img_1395923930.png deleted file mode 100644 index 78b2d58..0000000 Binary files a/asserts/media/producers/img_1395923930.png and /dev/null differ diff --git a/asserts/media/producers/img_1395923930_8d2XXg8.png b/asserts/media/producers/img_1395923930_8d2XXg8.png deleted file mode 100644 index 78b2d58..0000000 Binary files a/asserts/media/producers/img_1395923930_8d2XXg8.png and /dev/null differ diff --git a/asserts/media/producers/img_1395928950.png b/asserts/media/producers/img_1395928950.png deleted file mode 100644 index 22dc000..0000000 Binary files a/asserts/media/producers/img_1395928950.png and /dev/null differ diff --git a/asserts/media/producers/kaspersky.png b/asserts/media/producers/kaspersky.png deleted file mode 100644 index 78b2d58..0000000 Binary files a/asserts/media/producers/kaspersky.png and /dev/null differ diff --git a/asserts/media/producers_images/Autodesc.png b/asserts/media/producers_images/Autodesc.png deleted file mode 100644 index ac808cf..0000000 Binary files a/asserts/media/producers_images/Autodesc.png and /dev/null differ diff --git a/asserts/media/producers_images/acronis.png b/asserts/media/producers_images/acronis.png deleted file mode 100644 index c001461..0000000 Binary files a/asserts/media/producers_images/acronis.png and /dev/null differ diff --git a/asserts/media/producers_images/img_1395923930.png b/asserts/media/producers_images/img_1395923930.png deleted file mode 100644 index 78b2d58..0000000 Binary files a/asserts/media/producers_images/img_1395923930.png and /dev/null differ diff --git a/asserts/media/producers_images/img_1395928584.png b/asserts/media/producers_images/img_1395928584.png deleted file mode 100644 index 776551f..0000000 Binary files a/asserts/media/producers_images/img_1395928584.png and /dev/null differ diff --git a/asserts/media/producers_images/img_1395928950.png b/asserts/media/producers_images/img_1395928950.png deleted file mode 100644 index 22dc000..0000000 Binary files a/asserts/media/producers_images/img_1395928950.png and /dev/null differ diff --git a/asserts/media/producers_images/img_microsoft.png b/asserts/media/producers_images/img_microsoft.png deleted file mode 100644 index f324b39..0000000 Binary files a/asserts/media/producers_images/img_microsoft.png and /dev/null differ diff --git a/asserts/media/products/2017/04/25/thumb_1381486034.jpg b/asserts/media/products/2017/04/25/thumb_1381486034.jpg deleted file mode 100644 index f5c2eb9..0000000 Binary files a/asserts/media/products/2017/04/25/thumb_1381486034.jpg and /dev/null differ diff --git a/asserts/media/products/2017/04/25/thumb_1384933473.jpg b/asserts/media/products/2017/04/25/thumb_1384933473.jpg deleted file mode 100644 index bef871c..0000000 Binary files a/asserts/media/products/2017/04/25/thumb_1384933473.jpg and /dev/null differ diff --git a/asserts/media/products/2017/04/25/thumb_1401701995.png b/asserts/media/products/2017/04/25/thumb_1401701995.png deleted file mode 100644 index 3cd4fbc..0000000 Binary files a/asserts/media/products/2017/04/25/thumb_1401701995.png and /dev/null differ diff --git a/asserts/media/products/2017/04/25/thumb_1424247372.png b/asserts/media/products/2017/04/25/thumb_1424247372.png deleted file mode 100644 index 4e7f323..0000000 Binary files a/asserts/media/products/2017/04/25/thumb_1424247372.png and /dev/null differ diff --git a/asserts/media/products/2017/04/25/thumb_1438765887.jpg b/asserts/media/products/2017/04/25/thumb_1438765887.jpg deleted file mode 100644 index e879e27..0000000 Binary files a/asserts/media/products/2017/04/25/thumb_1438765887.jpg and /dev/null differ diff --git a/asserts/media/products/2017/04/25/thumb_1473758588.png b/asserts/media/products/2017/04/25/thumb_1473758588.png deleted file mode 100644 index e4ec51e..0000000 Binary files a/asserts/media/products/2017/04/25/thumb_1473758588.png and /dev/null differ diff --git a/asserts/media/products/2017/04/25/thumb_1473758588_2zuWRdC.png b/asserts/media/products/2017/04/25/thumb_1473758588_2zuWRdC.png deleted file mode 100644 index e4ec51e..0000000 Binary files a/asserts/media/products/2017/04/25/thumb_1473758588_2zuWRdC.png and /dev/null differ diff --git a/asserts/media/products/2017/04/25/thumb_1473758588_86Q6iPb.png b/asserts/media/products/2017/04/25/thumb_1473758588_86Q6iPb.png deleted file mode 100644 index e4ec51e..0000000 Binary files a/asserts/media/products/2017/04/25/thumb_1473758588_86Q6iPb.png and /dev/null differ diff --git a/asserts/media/products/2017/05/18/office.png b/asserts/media/products/2017/05/18/office.png deleted file mode 100644 index 5789fc9..0000000 Binary files a/asserts/media/products/2017/05/18/office.png and /dev/null differ diff --git a/asserts/media/products/2017/05/26/office.png b/asserts/media/products/2017/05/26/office.png deleted file mode 100644 index 5789fc9..0000000 Binary files a/asserts/media/products/2017/05/26/office.png and /dev/null differ diff --git a/asserts/media/products/2017/05/26/thumb_1381486034.jpg b/asserts/media/products/2017/05/26/thumb_1381486034.jpg deleted file mode 100644 index f5c2eb9..0000000 Binary files a/asserts/media/products/2017/05/26/thumb_1381486034.jpg and /dev/null differ diff --git a/asserts/media/products/2017/05/26/thumb_1384933473.jpg b/asserts/media/products/2017/05/26/thumb_1384933473.jpg deleted file mode 100644 index bef871c..0000000 Binary files a/asserts/media/products/2017/05/26/thumb_1384933473.jpg and /dev/null differ diff --git a/asserts/media/products/2017/05/26/thumb_1401701995.png b/asserts/media/products/2017/05/26/thumb_1401701995.png deleted file mode 100644 index 3cd4fbc..0000000 Binary files a/asserts/media/products/2017/05/26/thumb_1401701995.png and /dev/null differ diff --git a/asserts/media/products/2017/05/26/thumb_1424247372.png b/asserts/media/products/2017/05/26/thumb_1424247372.png deleted file mode 100644 index 4e7f323..0000000 Binary files a/asserts/media/products/2017/05/26/thumb_1424247372.png and /dev/null differ diff --git a/asserts/media/products/2017/05/26/thumb_1438765887.jpg b/asserts/media/products/2017/05/26/thumb_1438765887.jpg deleted file mode 100644 index e879e27..0000000 Binary files a/asserts/media/products/2017/05/26/thumb_1438765887.jpg and /dev/null differ diff --git a/asserts/media/products/2017/05/26/thumb_1473758588.png b/asserts/media/products/2017/05/26/thumb_1473758588.png deleted file mode 100644 index e4ec51e..0000000 Binary files a/asserts/media/products/2017/05/26/thumb_1473758588.png and /dev/null differ diff --git a/asserts/media/products/2017/08/15/AV_noshield_ru.png b/asserts/media/products/2017/08/15/AV_noshield_ru.png deleted file mode 100644 index e0e0b12..0000000 Binary files a/asserts/media/products/2017/08/15/AV_noshield_ru.png and /dev/null differ diff --git a/asserts/media/products/2017/08/15/FLASH.jpg b/asserts/media/products/2017/08/15/FLASH.jpg deleted file mode 100644 index 7d32f0e..0000000 Binary files a/asserts/media/products/2017/08/15/FLASH.jpg and /dev/null differ diff --git a/asserts/media/products/2017/08/15/PSHP.jpg b/asserts/media/products/2017/08/15/PSHP.jpg deleted file mode 100644 index 716d568..0000000 Binary files a/asserts/media/products/2017/08/15/PSHP.jpg and /dev/null differ diff --git a/asserts/media/products/2017/08/15/product-box-KAV.PNG b/asserts/media/products/2017/08/15/product-box-KAV.PNG deleted file mode 100644 index be9b36a..0000000 Binary files a/asserts/media/products/2017/08/15/product-box-KAV.PNG and /dev/null differ diff --git a/asserts/media/products/2017/08/15/product-box-KAV_3EiJVdh.PNG b/asserts/media/products/2017/08/15/product-box-KAV_3EiJVdh.PNG deleted file mode 100644 index be9b36a..0000000 Binary files a/asserts/media/products/2017/08/15/product-box-KAV_3EiJVdh.PNG and /dev/null differ diff --git a/asserts/media/products/2017/08/15/product-box-KAV_HDG9zYh.PNG b/asserts/media/products/2017/08/15/product-box-KAV_HDG9zYh.PNG deleted file mode 100644 index be9b36a..0000000 Binary files a/asserts/media/products/2017/08/15/product-box-KAV_HDG9zYh.PNG and /dev/null differ diff --git a/asserts/media/products/2017/08/15/product-box-KAV_IevmPsH.PNG b/asserts/media/products/2017/08/15/product-box-KAV_IevmPsH.PNG deleted file mode 100644 index be9b36a..0000000 Binary files a/asserts/media/products/2017/08/15/product-box-KAV_IevmPsH.PNG and /dev/null differ diff --git a/asserts/media/products/2017/08/15/product-box-KISMD.png b/asserts/media/products/2017/08/15/product-box-KISMD.png deleted file mode 100644 index 9a788c9..0000000 Binary files a/asserts/media/products/2017/08/15/product-box-KISMD.png and /dev/null differ diff --git a/asserts/media/products/2017/08/16/FLASH.jpg b/asserts/media/products/2017/08/16/FLASH.jpg deleted file mode 100644 index 7d32f0e..0000000 Binary files a/asserts/media/products/2017/08/16/FLASH.jpg and /dev/null differ diff --git a/asserts/media/products/2017/08/16/FLASH_zh9HTjk.jpg b/asserts/media/products/2017/08/16/FLASH_zh9HTjk.jpg deleted file mode 100644 index 7d32f0e..0000000 Binary files a/asserts/media/products/2017/08/16/FLASH_zh9HTjk.jpg and /dev/null differ diff --git a/asserts/media/products/2017/08/16/PSHP.jpg b/asserts/media/products/2017/08/16/PSHP.jpg deleted file mode 100644 index 716d568..0000000 Binary files a/asserts/media/products/2017/08/16/PSHP.jpg and /dev/null differ diff --git a/asserts/media/products/2017/08/16/PSHP_f1SnYCA.jpg b/asserts/media/products/2017/08/16/PSHP_f1SnYCA.jpg deleted file mode 100644 index 716d568..0000000 Binary files a/asserts/media/products/2017/08/16/PSHP_f1SnYCA.jpg and /dev/null differ diff --git a/asserts/media/products/KAV.png b/asserts/media/products/KAV.png deleted file mode 100644 index be9b36a..0000000 Binary files a/asserts/media/products/KAV.png and /dev/null differ diff --git a/asserts/media/products/KIS.png b/asserts/media/products/KIS.png deleted file mode 100644 index 0eb53b4..0000000 Binary files a/asserts/media/products/KIS.png and /dev/null differ diff --git a/asserts/media/products/KMobil.png b/asserts/media/products/KMobil.png deleted file mode 100644 index 6bbbaf4..0000000 Binary files a/asserts/media/products/KMobil.png and /dev/null differ diff --git a/asserts/media/products/KSOS.png b/asserts/media/products/KSOS.png deleted file mode 100644 index 62b58b5..0000000 Binary files a/asserts/media/products/KSOS.png and /dev/null differ diff --git a/asserts/media/products/KSOS_FjO7RsO.png b/asserts/media/products/KSOS_FjO7RsO.png deleted file mode 100644 index 4412c5b..0000000 Binary files a/asserts/media/products/KSOS_FjO7RsO.png and /dev/null differ diff --git a/asserts/media/products/KSOS_PX7cStV.png b/asserts/media/products/KSOS_PX7cStV.png deleted file mode 100644 index 4412c5b..0000000 Binary files a/asserts/media/products/KSOS_PX7cStV.png and /dev/null differ diff --git a/asserts/media/products/KSOS_s1wLmcw.png b/asserts/media/products/KSOS_s1wLmcw.png deleted file mode 100644 index 2213e4c..0000000 Binary files a/asserts/media/products/KSOS_s1wLmcw.png and /dev/null differ diff --git a/asserts/media/products/KSOS_vuwKkwu.png b/asserts/media/products/KSOS_vuwKkwu.png deleted file mode 100644 index 56ff51a..0000000 Binary files a/asserts/media/products/KSOS_vuwKkwu.png and /dev/null differ diff --git a/asserts/media/products/product-box-KAV.PNG b/asserts/media/products/product-box-KAV.PNG deleted file mode 100644 index be9b36a..0000000 Binary files a/asserts/media/products/product-box-KAV.PNG and /dev/null differ diff --git a/asserts/media/products/product-box-KAV_Le1oupJ.PNG b/asserts/media/products/product-box-KAV_Le1oupJ.PNG deleted file mode 100644 index be9b36a..0000000 Binary files a/asserts/media/products/product-box-KAV_Le1oupJ.PNG and /dev/null differ diff --git a/asserts/media/products/product-box-KISMD.png b/asserts/media/products/product-box-KISMD.png deleted file mode 100644 index 9a788c9..0000000 Binary files a/asserts/media/products/product-box-KISMD.png and /dev/null differ diff --git a/asserts/media/products_images/AV_noshield_ru.png b/asserts/media/products_images/AV_noshield_ru.png deleted file mode 100644 index e0e0b12..0000000 Binary files a/asserts/media/products_images/AV_noshield_ru.png and /dev/null differ diff --git a/asserts/media/products_images/FLASH.jpg b/asserts/media/products_images/FLASH.jpg deleted file mode 100644 index 7d32f0e..0000000 Binary files a/asserts/media/products_images/FLASH.jpg and /dev/null differ diff --git a/asserts/media/products_images/PSHP.jpg b/asserts/media/products_images/PSHP.jpg deleted file mode 100644 index 716d568..0000000 Binary files a/asserts/media/products_images/PSHP.jpg and /dev/null differ diff --git a/asserts/media/products_images/office.png b/asserts/media/products_images/office.png deleted file mode 100644 index 5789fc9..0000000 Binary files a/asserts/media/products_images/office.png and /dev/null differ diff --git a/asserts/media/products_images/office_fXQZU7g.png b/asserts/media/products_images/office_fXQZU7g.png deleted file mode 100644 index 5789fc9..0000000 Binary files a/asserts/media/products_images/office_fXQZU7g.png and /dev/null differ diff --git a/asserts/media/products_images/product-box-KAV.PNG b/asserts/media/products_images/product-box-KAV.PNG deleted file mode 100644 index be9b36a..0000000 Binary files a/asserts/media/products_images/product-box-KAV.PNG and /dev/null differ diff --git a/asserts/media/products_images/product-box-KISMD.png b/asserts/media/products_images/product-box-KISMD.png deleted file mode 100644 index 9a788c9..0000000 Binary files a/asserts/media/products_images/product-box-KISMD.png and /dev/null differ diff --git a/asserts/media/products_images/thumb_1381486034.jpg b/asserts/media/products_images/thumb_1381486034.jpg deleted file mode 100644 index f5c2eb9..0000000 Binary files a/asserts/media/products_images/thumb_1381486034.jpg and /dev/null differ diff --git a/asserts/media/products_images/thumb_1384933473.jpg b/asserts/media/products_images/thumb_1384933473.jpg deleted file mode 100644 index bef871c..0000000 Binary files a/asserts/media/products_images/thumb_1384933473.jpg and /dev/null differ diff --git a/asserts/media/products_images/thumb_1401701995.png b/asserts/media/products_images/thumb_1401701995.png deleted file mode 100644 index 3cd4fbc..0000000 Binary files a/asserts/media/products_images/thumb_1401701995.png and /dev/null differ diff --git a/asserts/media/products_images/thumb_1424247372.png b/asserts/media/products_images/thumb_1424247372.png deleted file mode 100644 index 4e7f323..0000000 Binary files a/asserts/media/products_images/thumb_1424247372.png and /dev/null differ diff --git a/asserts/media/products_images/thumb_1438765887.jpg b/asserts/media/products_images/thumb_1438765887.jpg deleted file mode 100644 index e879e27..0000000 Binary files a/asserts/media/products_images/thumb_1438765887.jpg and /dev/null differ diff --git a/asserts/media/products_images/thumb_1473758588.png b/asserts/media/products_images/thumb_1473758588.png deleted file mode 100644 index e4ec51e..0000000 Binary files a/asserts/media/products_images/thumb_1473758588.png and /dev/null differ diff --git a/asserts/static_dev/js/scripts.js b/asserts/static_dev/js/scripts.js index c7aa02f..c6b5298 100644 --- a/asserts/static_dev/js/scripts.js +++ b/asserts/static_dev/js/scripts.js @@ -1,6 +1,6 @@ -$(document).ready(function(){ +$(document).ready(function () { var form = $('#form-buying-products'); - form.on('submit', function(e){ + form.on('submit', function (e) { e.preventDefault(); $('#number').val(); var nmb = $('#number').val(); @@ -22,25 +22,25 @@ $(document).ready(function(){ data: data, cache: true, success: function (data) { - if (data.products_total_nmb){ - $('#basket_total_nmb').text('('+data.products_total_nmb+')'); + if (data.products_total_nmb) { + $('#basket_total_nmb').text('(' + data.products_total_nmb + ')'); $('.basket-items ul').html(""); - $.each(data.products, function(k, v){ - $('.basket-items ul').append('
  • '+v.name+', ' + v.nmb + 'pc. ' + 'for ' + v.price_per_item + 'rub. ' + + $.each(data.products, function (k, v) { + $('.basket-items ul').append('
  • ' + v.name + ', ' + v.nmb + 'pc. ' + 'for ' + v.price_per_item + 'rub. ' + //'x'+ - '
  • '); + ''); }); } }, - error: function(){ - console.log("error") - } + error: function () { + console.log("error") + } }); }); calculate(); - function showingBasket(){ + function showingBasket() { $('.basket-items').removeClass('hidden'); }; @@ -49,18 +49,18 @@ $(document).ready(function(){ // showingBasket(); //}); - $('.basket-container').mouseover(function(){ - showingBasket(); - }); + $('.basket-container').mouseover(function () { + showingBasket(); + }); - $('.basket-container').mouseout(function(){ - showingBasket(); - }); + $('.basket-container').mouseout(function () { + showingBasket(); + }); - $(document).on('click', '.delete-item', function(e){ - e.preventDefault(); - $(this).closest('li').remove(); - }) + $(document).on('click', '.delete-item', function (e) { + e.preventDefault(); + $(this).closest('li').remove(); + }) }); function showOrHide(cb, cat) { @@ -70,7 +70,7 @@ function showOrHide(cb, cat) { else cat.style.display = "none"; } -function _discount(quantity, discount_policy){ +function _discount(quantity, discount_policy) { if (isNaN(discount_policy)) { return 1 } @@ -78,7 +78,7 @@ function _discount(quantity, discount_policy){ var keys = Object.keys(discount_policy); for (var i = 0, len = keys.length; i < len; i++) { var split_entry = keys[i].split('-'); - if (parseInt(split_entry[0]) <= quantity && quantity < parseFloat(split_entry[1])){ + if (parseInt(split_entry[0]) <= quantity && quantity < parseFloat(split_entry[1])) { return parseFloat(discount_policy[keys[i]]); } } @@ -86,7 +86,7 @@ function _discount(quantity, discount_policy){ } -function calculate(){ +function calculate() { var count = document.getElementById("variant_length").value; var quantity = document.getElementById("quantity").value; var result = document.getElementById("result"); @@ -117,14 +117,14 @@ function calculate(){ for (var i = 0, len = variants.length; i < len; i++) { if (variants[i]['attributes'][quant0.name] == quant0_val['name'] && variants[i]['attributes'][quant1.name] == quant1_val['name']) { - tmp_price = Math.round(variants[i]['price'] * _discount(quantity, discount_policy)); - result.innerHTML = tmp_price; - price_per_itom.value = tmp_price; - tmp_price = tmp_price * quantity; - result_itog.innerHTML = tmp_price; - erw.innerHTML = Math.round(tmp_price * 0.05); - product_slug.value = variants[i].slug; - } + tmp_price = Math.round(variants[i]['price'] * _discount(quantity, discount_policy)); + result.innerHTML = tmp_price; + price_per_itom.value = tmp_price; + tmp_price = tmp_price * quantity; + result_itog.innerHTML = tmp_price; + erw.innerHTML = Math.round(tmp_price * 0.05); + product_slug.value = variants[i].slug; + } } } else { @@ -132,14 +132,14 @@ function calculate(){ var quant0_val = JSON.parse(quant0.value.replace(/'/g, '"')); for (var i = 0, len = variants.length; i < len; i++) { if (variants[i]['attributes'][quant0.name] == quant0_val['name']) { - tmp_price = Math.round(variants[i]['price'] * _discount(quantity, discount_policy)); - result.innerHTML = tmp_price; - price_per_itom.value = tmp_price; - tmp_price = tmp_price * quantity; - result_itog.innerHTML = tmp_price; - erw.innerHTML = Math.round(tmp_price * 0.05); - product_slug.value = variants[i].slug; - } + tmp_price = Math.round(variants[i]['price'] * _discount(quantity, discount_policy)); + result.innerHTML = tmp_price; + price_per_itom.value = tmp_price; + tmp_price = tmp_price * quantity; + result_itog.innerHTML = tmp_price; + erw.innerHTML = Math.round(tmp_price * 0.05); + product_slug.value = variants[i].slug; + } } } } diff --git a/eshop/eshop_project/settings/base.py b/eshop/eshop_project/settings/base.py index b8e0b10..fd01332 100644 --- a/eshop/eshop_project/settings/base.py +++ b/eshop/eshop_project/settings/base.py @@ -1,15 +1,3 @@ -""" -Django settings for Eshop project. - -Generated by 'django-admin startproject' using Django 1.10.6. - -For more information on this file, see -https://docs.djangoproject.com/en/1.10/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.10/ref/settings/ -""" - import os from django.urls import reverse_lazy @@ -188,9 +176,6 @@ DISPOSABLE_EMAIL_DOMAINS = os.path.join(TEMPLATE_DIR, 'emails/disposable_email_d # Substituting auth user model AUTH_USER_MODEL = 'accounts_ext.User' -# Password validation -# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators - AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', diff --git a/eshop/eshop_project/tools/secret_gen.py b/eshop/eshop_project/tools/secret_gen.py index 61a1459..5b33abe 100644 --- a/eshop/eshop_project/tools/secret_gen.py +++ b/eshop/eshop_project/tools/secret_gen.py @@ -12,14 +12,17 @@ try: except NameError as ne: import os from eshop_project.settings.base import BASE_DIR + SECRET_FILE = os.path.join(BASE_DIR, 'secret.txt') try: SECRET_KEY = open(SECRET_FILE).read().strip() except IOError: try: import random - SECRET_KEY = ''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]) - with open(SECRET_FILE,'w') as f: + + SECRET_KEY = ''.join( + [random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]) + with open(SECRET_FILE, 'w') as f: f.write(SECRET_KEY) except IOError: Exception('Please create a %s file with random characters \ diff --git a/eshop/eshop_project/urls.py b/eshop/eshop_project/urls.py index 6b1f800..301421c 100644 --- a/eshop/eshop_project/urls.py +++ b/eshop/eshop_project/urls.py @@ -1,19 +1,4 @@ -"""Eshop URL Configuration - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/1.10/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.conf.urls import url, include - 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) -""" -from django.urls import re_path, include +from django.urls import re_path, path, include from django.contrib import admin from django.conf import settings from django.conf.urls.static import static @@ -23,36 +8,38 @@ from core import views admin.autodiscover() urlpatterns = [ - re_path(r'^jet/', include('jet.urls', 'jet')), - re_path(r'^jet/dashboard/', include('jet.dashboard.urls','jet-dashboard')), - re_path(r'^admin/', admin.site.urls), + re_path(r'^jet/', include('jet.urls', 'jet')), + re_path(r'^jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')), + re_path(r'^admin/', admin.site.urls), - re_path(r'^ckeditor/', include('ckeditor_uploader.urls')), + re_path(r'^ckeditor/', include('ckeditor_uploader.urls')), - re_path('pages/', include('django.contrib.flatpages.urls')), + re_path('pages/', include('django.contrib.flatpages.urls')), - re_path('accounts/', include(('accounts_ext.urls', 'accounts_ext'), namespace='accounts_ext')), - re_path('accounts/', include('registration.backends.default.urls')), - re_path('accounts/', include(('django.contrib.auth.urls', 'django.contrib.auth'), namespace='accounts')), + re_path('accounts/', include(('accounts_ext.urls', 'accounts_ext'), namespace='accounts_ext')), + re_path('accounts/', include('registration.backends.default.urls')), + re_path('accounts/', + include(('django.contrib.auth.urls', 'django.contrib.auth'), namespace='accounts')), - re_path(r'', include(('index.urls', 'index'), namespace='index')), - re_path(r'^contact-us/', include(('contact_us.urls', 'contact_us'), namespace='contact_us')), + re_path(r'', include(('index.urls', 'index'), namespace='index')), + re_path(r'^contact-us/', include(('contact_us.urls', 'contact_us'), namespace='contact_us')), - re_path(r'^products/', include(('products.urls', 'products'), namespace='products')), - re_path(r'^cabinet/', include(('cabinet.urls', 'cabinet'), namespace='cabinet')), + re_path(r'^products/', include(('products.urls', 'products'), namespace='products')), + re_path(r'^cabinet/', include(('cabinet.urls', 'cabinet'), namespace='cabinet')), - re_path(r'^cart/', include(('cart.urls', 'cart'), namespace='cart')), + re_path(r'^cart/', include(('cart.urls', 'cart'), namespace='cart')), - re_path(r'^news/', include(('blog_ext.urls','blog_ext'), namespace='news')), + re_path(r'^news/', include(('blog_ext.urls', 'blog_ext'), namespace='news')), -] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \ - + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \ + + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: import debug_toolbar + urlpatterns = [ - re_path(r'^__debug__/', include(debug_toolbar.urls)) - ] + urlpatterns + path('__debug__/', include(debug_toolbar.urls)), + ] + urlpatterns handler404 = views.Handler404View.as_view() handler500 = views.Handler500View.as_view() diff --git a/eshop/index/tests/test_views.py b/eshop/index/tests/test_views.py index d800517..7b6111f 100644 --- a/eshop/index/tests/test_views.py +++ b/eshop/index/tests/test_views.py @@ -1,5 +1,5 @@ from django.test import TestCase -from django.urls import resolve, reverse +from django.urls import reverse from index import views diff --git a/eshop/products/admin.py b/eshop/products/admin.py index e0314d3..5f00370 100644 --- a/eshop/products/admin.py +++ b/eshop/products/admin.py @@ -19,9 +19,11 @@ class CustomModelResource(resources.ModelResource): """ try: row['attributes'] = eval(row['attributes']) - row['discount_policy'] = eval(row['discount_policy']) except: - pass + try: + row['discount_policy'] = eval(row['discount_policy']) + except: + pass class CustomManyToManyWidget(widgets.ManyToManyWidget): diff --git a/eshop/products/models.py b/eshop/products/models.py index db16ad7..73163fe 100644 --- a/eshop/products/models.py +++ b/eshop/products/models.py @@ -61,9 +61,11 @@ class ProductCategory(AbstractStatusMPTTModel): class MPTTMeta: order_insertion_by = ('name',) + # If I write unique_together = (_('slug'), _('parent')) + # db shows errors class Meta: - unique_together = (_('slug'), _('parent')) - ordering = (_('tree_id'), _('level')) + unique_together = ('slug', 'parent') + ordering = ('tree_id', 'level') verbose_name = _("Категория") verbose_name_plural = _("Категории") diff --git a/eshop_old.tar.gz b/eshop_old.tar.gz deleted file mode 100644 index a9d7d2d..0000000 Binary files a/eshop_old.tar.gz and /dev/null differ diff --git a/media/producers/1c.png b/media/producers/1c.png new file mode 100644 index 0000000..07a7a33 Binary files /dev/null and b/media/producers/1c.png differ diff --git a/media/producers/avast.png b/media/producers/avast.png new file mode 100644 index 0000000..8b9a487 Binary files /dev/null and b/media/producers/avast.png differ diff --git a/media/producers/roadmin.png b/media/producers/roadmin.png new file mode 100644 index 0000000..28ff9c7 Binary files /dev/null and b/media/producers/roadmin.png differ diff --git a/media/producers/veeam.png b/media/producers/veeam.png new file mode 100644 index 0000000..e4934ec Binary files /dev/null and b/media/producers/veeam.png differ diff --git a/media/products/1s/1c.svg b/media/products/1s/1c.svg new file mode 100644 index 0000000..21ac2ce --- /dev/null +++ b/media/products/1s/1c.svg @@ -0,0 +1,65 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/media/products/antivirus/antivirus.svg b/media/products/antivirus/antivirus.svg new file mode 100644 index 0000000..91e4454 --- /dev/null +++ b/media/products/antivirus/antivirus.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/media/products/grafika-i-video/graphic.svg b/media/products/grafika-i-video/graphic.svg new file mode 100644 index 0000000..dcd1d77 --- /dev/null +++ b/media/products/grafika-i-video/graphic.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/media/products/microsoft/windows.svg b/media/products/microsoft/windows.svg new file mode 100644 index 0000000..609c234 --- /dev/null +++ b/media/products/microsoft/windows.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/media/products/ofisnyie-programmyi/office.svg b/media/products/ofisnyie-programmyi/office.svg new file mode 100644 index 0000000..dd6c460 --- /dev/null +++ b/media/products/ofisnyie-programmyi/office.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/media/products/proektirovanie/planning.svg b/media/products/proektirovanie/planning.svg new file mode 100644 index 0000000..aee410a --- /dev/null +++ b/media/products/proektirovanie/planning.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/media/products/rezervnoe-kopirovanie/save.svg b/media/products/rezervnoe-kopirovanie/save.svg new file mode 100644 index 0000000..3099aae --- /dev/null +++ b/media/products/rezervnoe-kopirovanie/save.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/media/products/virtualizatsiya/virtualization.svg b/media/products/virtualizatsiya/virtualization.svg new file mode 100644 index 0000000..f4d69e6 --- /dev/null +++ b/media/products/virtualizatsiya/virtualization.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/debug_toolbar/base.html b/templates/debug_toolbar/base.html deleted file mode 100644 index e69de29..0000000