diff --git a/local/modules/LivraisonParSecteurs/Hook/AdminHook.php b/local/modules/LivraisonParSecteurs/Hook/AdminHook.php index 2913fe56..4cba2df7 100644 --- a/local/modules/LivraisonParSecteurs/Hook/AdminHook.php +++ b/local/modules/LivraisonParSecteurs/Hook/AdminHook.php @@ -46,20 +46,21 @@ class AdminHook extends BaseHook if ((null !== $orderId) && ($moduleId == LivraisonParSecteurs::getModuleId())) { $lpsData = $this->getSession()->get('lpsData'); - $selectedDay = $lpsData->getDeliveryDate(); - $beginTime = $lpsData->getDeliveryStartTime(); - $endTime = $lpsData->getDeliveryEndTime(); + if (null !== $lpsData) { + $selectedDay = $lpsData->getDeliveryDate(); + $beginTime = $lpsData->getDeliveryStartTime(); + $endTime = $lpsData->getDeliveryEndTime(); - if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) ) - { - $event->add( - $this->render( - 'delivery-address.html', [ - 'day' => $selectedDay, - 'begin_time' => $beginTime, - 'end_time' => $endTime - ]) - ); + if ((null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime)) { + $event->add( + $this->render( + 'delivery-address.html', [ + 'day' => $selectedDay, + 'begin_time' => $beginTime, + 'end_time' => $endTime + ]) + ); + } } } } diff --git a/local/modules/PointRetrait/Hook/AdminHook.php b/local/modules/PointRetrait/Hook/AdminHook.php index eede815b..fa55b106 100644 --- a/local/modules/PointRetrait/Hook/AdminHook.php +++ b/local/modules/PointRetrait/Hook/AdminHook.php @@ -61,20 +61,21 @@ class AdminHook extends BaseHook if ((null !== $orderId) && ($moduleId == PointRetrait::getModuleId())) { $sessionData = $this->getSession()->get('pdrData'); - $selectedDay = $sessionData->getDeliveryDate(); - $beginTime = $sessionData->getDeliveryStartTime(); - $endTime = $sessionData->getDeliveryEndTime(); + if (null !== $sessionData) { + $selectedDay = $sessionData->getDeliveryDate(); + $beginTime = $sessionData->getDeliveryStartTime(); + $endTime = $sessionData->getDeliveryEndTime(); - if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) ) - { - $event->add( - $this->render( - 'delivery-address.html', [ - 'day' => $selectedDay, - 'begin_time' => $beginTime, - 'end_time' => $endTime - ]) - ); + if ((null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime)) { + $event->add( + $this->render( + 'delivery-address.html', [ + 'day' => $selectedDay, + 'begin_time' => $beginTime, + 'end_time' => $endTime + ]) + ); + } } } } diff --git a/templates/frontOffice/custom/Gruntfile.js b/templates/frontOffice/custom/Gruntfile.js index a9db3ed9..ce897e20 100644 --- a/templates/frontOffice/custom/Gruntfile.js +++ b/templates/frontOffice/custom/Gruntfile.js @@ -37,9 +37,14 @@ module.exports = function (grunt) { }, cssmin: { target: { - files: { + files: [ + { 'assets/dist/css/thelia.min.css': 'assets/src/css/thelia.css' - } + }, + { + 'assets/dist/css/custom.min.css': 'assets/src/css/custom.css' + } + ] } }, imagemin: { @@ -143,6 +148,19 @@ module.exports = function (grunt) { dest: 'assets/dist/fonts/fontawesome', src: ['bower_components/fontawesome/fonts/*.*'] } + , + { + expand: true, + flatten: true, + dest: 'assets/src/fonts/sofiapro', + src: ['bower_components/sofiapro/fonts/*.*'] + }, + { + expand: true, + flatten: true, + dest: 'assets/dist/fonts/sofiapro', + src: ['bower_components/sofiapro/fonts/*.*'] + } ] }, less: { diff --git a/templates/frontOffice/custom/assets/dist/css/custom.min.css b/templates/frontOffice/custom/assets/dist/css/custom.min.css new file mode 100644 index 00000000..9aa1308e --- /dev/null +++ b/templates/frontOffice/custom/assets/dist/css/custom.min.css @@ -0,0 +1 @@ +@font-face{font-family:sofia_prolight;src:url(../fonts/sofiapro/sofiapro-light-webfont.woff2) format('woff2'),url(../../fonts/sofiapro/sofiapro-light-webfont.woff) format('woff');font-weight:400;font-style:normal}html{font-family:sofia_prolight,sans-serif!important}#products-new .overlay:after,#products-offer .overlay:after,#products-upsell .overlay:after,body{font-family:sofia_prolight,'Open Sans',sans-serif!important}s @media (min-width:1200px){.container{width:1170px}}@media (min-width:992px){.header__main{width:95%}}@media (min-width:768px){.header__content{flex-direction:column}}.header__content{display:flex}.header__main{align-items:center;display:flex;flex-direction:row;justify-content:space-between}.navbar-default{background-color:transparent}.navbar li>a.home:before{display:none}.nav>li{text-transform:uppercase}.header__content .container-fluid{padding-left:0;padding-right:0}.navbar-form .form-control{width:50px}.navbar-form .form-control.large{width:auto}.logo-boutique{width:200px} \ No newline at end of file diff --git a/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light-webfont.woff b/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light-webfont.woff new file mode 100644 index 00000000..33a4e721 Binary files /dev/null and b/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light-webfont.woff differ diff --git a/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light-webfont.woff2 b/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light-webfont.woff2 new file mode 100644 index 00000000..ce6007e6 Binary files /dev/null and b/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light-webfont.woff2 differ diff --git a/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light.otf b/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light.otf new file mode 100644 index 00000000..9316c9aa Binary files /dev/null and b/templates/frontOffice/custom/assets/dist/fonts/SofiaPro/sofiapro-light.otf differ diff --git a/templates/frontOffice/custom/assets/src/css/custom.css b/templates/frontOffice/custom/assets/src/css/custom.css index e7f7b08a..833c428a 100644 --- a/templates/frontOffice/custom/assets/src/css/custom.css +++ b/templates/frontOffice/custom/assets/src/css/custom.css @@ -1,3 +1,24 @@ +@font-face { + font-family: 'sofia_prolight'; + src: url('../fonts/sofiapro/sofiapro-light-webfont.woff2') format('woff2'), + url('../../fonts/sofiapro/sofiapro-light-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} + +html { + font-family: 'sofia_prolight', sans-serif !important; +} + +#products-offer .overlay:after, +#products-new .overlay:after, +#products-upsell .overlay:after, +#products-offer .overlay:after, +body { + font-family: 'sofia_prolight', 'Open Sans', sans-serif !important; +}s + + @media (min-width: 1200px) { .container { width: 1170px; diff --git a/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light-webfont.woff b/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light-webfont.woff new file mode 100644 index 00000000..33a4e721 Binary files /dev/null and b/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light-webfont.woff differ diff --git a/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light-webfont.woff2 b/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light-webfont.woff2 new file mode 100644 index 00000000..ce6007e6 Binary files /dev/null and b/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light-webfont.woff2 differ diff --git a/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light.otf b/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light.otf new file mode 100644 index 00000000..9316c9aa Binary files /dev/null and b/templates/frontOffice/custom/assets/src/fonts/SofiaPro/sofiapro-light.otf differ diff --git a/templates/frontOffice/custom/layout.tpl b/templates/frontOffice/custom/layout.tpl index 3100f1dd..47ded4a4 100644 --- a/templates/frontOffice/custom/layout.tpl +++ b/templates/frontOffice/custom/layout.tpl @@ -72,7 +72,7 @@ GNU General Public License : http://www.gnu.org/licenses/ {/stylesheets} *} - {stylesheets file='assets/src/css/custom.css'} + {stylesheets file='assets/dist/css/custom.min.css'} {/stylesheets}