Posts

Showing posts from June, 2018

Magento 2.2.2 above Open minicart when item is added, without page refresh

Navigate to vendor/magento/Magento_Checkout/view/web/js/view/minicart.js Under initialize: function, you will see Replace the function with this code php bin/magento cache:clean $ ( '[data-block="minicart"]' ). on ( 'contentLoading' , function ( event ) { addToCartCalls ++; self . isLoading ( true ); $ ( '[data-block="minicart"]' ). on ( 'contentUpdated' , function () { $ ( '[data-block="minicart"]' ). find ( '[data-role="dropdownDialog"]' ). dropdownDialog ( "open" ); setTimeout ( function () { $ ( '[data-block="minicart"]' ). find ( '[data-role="dropdownDialog"]' ). dropdownDialog ( "close" ); }, 4000 ); });

HTML MVC freamwork

HTML MVC freamwork , HTML include all pages one page . =============================== Create HTML MVC Project ================================ RootFolder -- build -- incliude -- base ------ footer . html ------ header . html ---- html - head . html - ( include header and footer in this page ) -- site ---- assets ------ css ------ js ------ images ------ fonts ---- index . html - ( include all pages like header and footer etc ..) ================================ site folder : Index . html ================================ include "html-head.html" include "main.html" include "html-footer.html" ================================ Create file : Gruntfile . js ================================ module . exports = function ( grunt ){    grunt . initConfig ({      clean: {        build: [ 'build/' ]     }, ...

font-face HTTPS issue fixes

@font-face { font-family : 'Material Icons' ; font-style : normal ; font-weight : 400 ; src : url ( https://fonts.gstatic.com/s/materialicons/v38/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 ) format ( 'woff2' ); } .material-icons { font-family : 'Material Icons' ; font-weight : normal ; font-style : normal ; font-size : 24px ; /* Preferred icon size */ display : inline-block ; line-height : 1 ; text-transform : none ; letter-spacing : normal ; word-wrap : normal ; white-space : nowrap ; direction : ltr ; /* Support for all WebKit browsers. */ -webkit-font-smoothing : antialiased ; /* Support for Safari and Chrome. */ text-rendering : optimizeLegibility ; /* Support for Firefox. */ -moz-osx-font-smoothing : grayscale ; /* Support for IE. */ font-feature-settings : 'liga' ; }

mixin.less

.flex-display(@display : flex ) { display : ~ "-webkit-@{display}" ; display : ~ "-moz-@{display}" ; display : ~ "-ms-@{display}box" ; // IE10 display : ~ "-ms-@{display}" ; // IE11 display : @display; } .flex(@columns : initial ) { -webkit-flex : @columns; -moz-flex : @columns; -ms-flex : @columns; flex : @columns; } .flex-direction(@direction : row ) { -webkit-box-orient : @direction; -webkit-box-direction : @direction; -webkit-flex-direction : @direction; -moz-flex-direction : @direction; -ms-flex-direction : @direction; flex-direction : @direction; } .flex-wrap(@wrap : nowrap ) { -webkit-flex-wrap : @ wrap ; -moz-flex-wrap : @ wrap ; -ms-flex-wrap : @ wrap ; flex-wrap : @ wrap ; } .flex-order(@order : 0 ) { -webkit-box-ordinal-group : @order; ...

OWL-Carousel arrows

jQuery ( '.owl-carousel' ). owlCarousel ({ loop: true , margin: 15 , autoplay: true , autoplayTimeout: 5000 , autoplayHoverPause: true , nav: true , navText: [ '<i class="material-icons">arrow_forward_ios</i>' , '<i class="material-icons">arrow_back_ios</i>' ], navClass: [ 'owl-prev' , 'owl-next' ], responsive: { 0 : { items: 1 }, 600 : { items: 3 }, 1000 : { items: 4 } } });

jQuery Scroll to ID

jQuery ( document ). ready ( function (){ jQuery ( ".link" ). click ( function () { jQuery ( 'html,body' ). animate ({ scrollTop: eval ( jQuery ( '#id' ). offset (). top - 250 ) }, 1000 ); }); });