diff --git a/config/paymentmethods.php b/config/paymentmethods.php index 2ac30fc74..6dd355233 100755 --- a/config/paymentmethods.php +++ b/config/paymentmethods.php @@ -1,6 +1,4 @@ \ No newline at end of file +]; \ No newline at end of file diff --git a/config/pricerules.php b/config/pricerules.php new file mode 100644 index 000000000..25058db0c --- /dev/null +++ b/config/pricerules.php @@ -0,0 +1,5 @@ + \ No newline at end of file +]; \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/assets/js/app.js b/packages/Webkul/Admin/src/Resources/assets/js/app.js index 3c2238a80..ceb6fe298 100755 --- a/packages/Webkul/Admin/src/Resources/assets/js/app.js +++ b/packages/Webkul/Admin/src/Resources/assets/js/app.js @@ -8,83 +8,72 @@ Vue.prototype.$http = axios window.eventBus = new Vue(); -window.onload = function () { - $(document).ready(function() { - navbarLeftCssTop = parseInt($('.navbar-left').css("top")); - windowHeight = $(window).height(); - menubarHeight = $('ul.menubar').height(); - documentHeight = $(document).height(); - contentHeight = $('.content').height(); - innerSectionHeight = $('.inner-section').height(); - asideNavHeight = $('.aside-nav').height(); - pageContentHeight = $('.page-content').height(); - accordianHeight = $('.accordian').height(); +window.addEventListener('DOMContentLoaded', function() { + moveDown = 60; + moveUp = -60; + count = 0; + countKeyUp = 0; + pageDown = 60; + pageUp = -60; + scroll = 0; - if (menubarHeight < windowHeight) { - differenceInHeight = windowHeight - menubarHeight; - } else { - differenceInHeight = menubarHeight - windowHeight; - } + listLastElement = $('.menubar li:last-child').offset(); + lastElementOfNavBar = listLastElement.top; - if(pageContentHeight <= innerSectionHeight - 60) { - $('.navbar-left').css("position","absolute"); - // $('.content').css({"position": "fixed", "width": "65%"}); - // $('.content-wrapper').css({"position": "sticky", "top": "60px"}); - } - else { - $('.accordian-header').on('click',function(event) { - pageContentHeightOnAccordianClick = $('.page-content').height(); + navbarTop = $('.navbar-left').css("top"); + menuTopValue = $('.navbar-left').css('top'); + menubarTopValue = menuTopValue; - if(pageContentHeightOnAccordianClick <= innerSectionHeight) { - $('.navbar-left').css("position","absolute"); - $('.content').css("position","fixed"); - $('.content-wrapper').css({"position": "sticky", "top": "60px"}); - } - }); - } + documentHeight = $(document).height(); + menubarHeight = $('ul.menubar').height(); + navbarHeight = $('.navbar-left').height(); + windowHeight = $(window).height(); + contentHeight = $('.content').height(); + innerSectionHeight = $('.inner-section').height(); + gridHeight = $('.grid-container').height(); + pageContentHeight = $('.page-content').height(); - scrollTopWhenWindowLoaded = $(document).scrollTop(); + if (menubarHeight <= windowHeight) { + differenceInHeight = windowHeight - menubarHeight; + } else { + differenceInHeight = menubarHeight - windowHeight; + } + + if (menubarHeight > windowHeight) { + document.addEventListener("keydown", function(event) { + if ((event.keyCode == 38) && count <= 0) { + count = count + moveDown; + + $('.navbar-left').css("top", count + "px"); + } else if ((event.keyCode == 40) && count >= -differenceInHeight) { + count = count + moveUp; + + $('.navbar-left').css("top", count + "px"); + } else if ((event.keyCode == 33) && countKeyUp <= 0) { + countKeyUp = countKeyUp + pageDown; + + $('.navbar-left').css("top", countKeyUp + "px"); + } else if ((event.keyCode == 34) && countKeyUp >= -differenceInHeight) { + countKeyUp = countKeyUp + pageUp; + + $('.navbar-left').css("top", countKeyUp + "px"); + } else { + $('.navbar-left').css("position", "fixed"); + } + }); + + $("body").css({minHeight: $(".menubar").outerHeight() + 100 + "px"}); + + window.addEventListener('scroll', function() { + documentScrollWhenScrolled = $(document).scrollTop(); - if (menubarHeight > documentHeight && menubarHeight > windowHeight) { - $(document).scroll(function() { - documentScrollWhenScrolled = $(document).scrollTop(); if (documentScrollWhenScrolled <= differenceInHeight + 200) { - $('.navbar-left').css('top', documentScrollWhenScrolled + 60 + 'px'); - + $('.navbar-left').css('top', -documentScrollWhenScrolled + 60 + 'px'); scrollTopValueWhenNavBarFixed = $(document).scrollTop(); } - }); - } else if (menubarHeight < windowHeight) { - $('.navbar-left').css("position", "fixed"); - } else if (menubarHeight < documentHeight) { - if (scrollTopWhenWindowLoaded > differenceInHeight) { - $('.navbar-left').css('top', -differenceInHeight + 'px'); - } - - if (menubarHeight > windowHeight) { - $(document).scroll(function() { - documentScrollWhenScrolled = $(document).scrollTop(); - - if (documentScrollWhenScrolled <= differenceInHeight + 200) { - $('.navbar-left').css('top', -documentScrollWhenScrolled + 60 + 'px'); - - scrollTopValueWhenNavBarFixed = $(document).scrollTop(); - } - }); - } else if (menubarHeight < windowHeight) { - $(document).scroll(function() { - documentScrollWhenScrolled = $(document).scrollTop(); - if (documentScrollWhenScrolled <= differenceInHeight + 70) { - $('.navbar-left').css('top', -documentScrollWhenScrolled + 60 + 'px'); - - scrollTopValueWhenNavBarFixed = $(document).scrollTop(); - } - }); - - } - } - }); -} + }); + } +}); $(document).ready(function () { Vue.config.ignoredElements = [ diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 7165ebd3e..03a1b9c3a 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -787,15 +787,23 @@ return [ 'priority' => 'Priority', 'add-condition' => 'Add Conditions', 'disc_amt' => 'Discount Amount', - 'disc_percent' => 'Discount Percentage' + 'disc_percent' => 'Discount Percentage', + 'is-coupon' => 'Use Coupon', + 'is-coupon-yes' => 'Yes', + 'is-coupon-no' => 'No', + 'uses-per-cust' => 'Uses per customer', ], 'catalog' => [ 'name' => 'Name', 'description' => 'Description', 'apply-percent' => 'Apply as percentage', - 'apply-fixed' => 'Apply as fixed Amount', + 'apply-fixed' => 'Apply as fixed amount', 'adjust-to-percent' => 'Adjust to percentage', 'adjust-to-value' => 'Adjust to discount value' + ], + 'cart' => [ + 'buy-atleast' => 'Buy Atleast (N)', + 'apply-to-shipping' => 'Apply to shipping' ] ], diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 08da8d332..e821486ce 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -1,12 +1,12 @@ @extends('admin::layouts.content') @section('page_title') - {{ __('admin::app.promotion.add-catalog-rule') }} + {{ __('admin::app.promotion.add-cart-rule') }} @stop @section('content')