This commit is contained in:
2025-11-19 20:38:07 +01:00
10 changed files with 12705 additions and 3930 deletions

View File

@@ -447,6 +447,11 @@ class ProductControllerCore extends ProductPresentingFrontControllerCore
$this->setQuickViewMode();
}
$id_product = (int)$product['id_product'];
$id_product_attribute = (int)$product['id_product_attribute'];
$quantity = StockAvailable::getQuantityAvailableByProduct($id_product, $id_product_attribute);
ob_end_clean();
header('Content-Type: application/json');
$this->ajaxRender(Tools::jsonEncode([
@@ -486,6 +491,12 @@ class ProductControllerCore extends ProductPresentingFrontControllerCore
$this->getTemplateVarPage()['meta'] ?? []
),
'is_quick_view' => $isQuickView,
'product_delivery_time' => $this->render('catalog/_partials/product-delivery-time',
[
'quantity' => $quantity,
'product' => $product,
]
),
]));
}

View File

@@ -18,9 +18,7 @@
*}
<div class="blockreassurance_product" t="1">
{if $product.delivery_in_stock}
{* {if $product.delivery_in_stock}
<div class="item-999 item-custom">
<span class="item-product">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" data-img-url="/modules/blockreassurance/views/img/img_perso/Package.svg" class="svg replaced-svg">
@@ -41,8 +39,9 @@
<span class="block-title" style="color:#000000;">Darmowa wysyłka w:</span>
<p class="block-description" style="color:#000000;">{$product.delivery_in_stock}</p>
<p class="block-description" style="color:#000000; display:none;">{$product.delivery_out_stock}</p>
</div>
{/if}
{/if} *}
{foreach from=$blocks item=$block key=$key}

View File

@@ -461,9 +461,15 @@ class ProductLazyArray extends AbstractLazyArray
if ($show_price && $this->product['reduction']) {
if ($this->product['discount_type'] === 'percentage') {
$discountLabel = $this->product['discount_percentage'];
$num = floatval(str_replace(',', '.', preg_replace('/[^0-9,.-]/', '', $discountLabel)));
$rounded = round($num);
$discountLabel = sprintf('-%d%%', abs($rounded));
$flags['discount'] = [
'type' => 'discount',
'label' => $this->product['discount_percentage'],
// 'label' => $this->product['discount_percentage'],
'label' => $discountLabel,
];
} elseif ($this->product['discount_type'] === 'amount') {
$flags['discount'] = [

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,10 +5,9 @@ $cGoldDark: #d3ba67;
$cBgAccent: #eff6f7;
$cBone: #f6f6f6;
$fInter: 'Inter',
sans-serif;
$fInter: 'Inter', sans-serif;
body>main {
body > main {
overflow-x: hidden;
}
@@ -212,10 +211,12 @@ a {
background: #ffffff;
a {
img {}
img {
}
}
.highlighted-informations {}
.highlighted-informations {
}
.product-add-to-basket {
display: flex;
@@ -288,7 +289,8 @@ a {
font-weight: 700;
}
.discount-product {}
.discount-product {
}
&.product-price-discount {
display: flex;
@@ -384,8 +386,8 @@ a {
}
}
.product-images>li.thumb-container>.thumb.selected,
.product-images>li.thumb-container>.thumb:hover {
.product-images > li.thumb-container > .thumb.selected,
.product-images > li.thumb-container > .thumb:hover {
border-color: $cGold;
}
@@ -403,7 +405,7 @@ a {
body#product {
overflow-x: hidden;
>main {
> main {
overflow: initial;
}
@@ -718,7 +720,7 @@ body#product {
input {
display: none;
&:checked+span {
&:checked + span {
border: 0 !important;
&::before {
@@ -938,7 +940,7 @@ body#product {
}
}
>.control-label {
> .control-label {
display: none;
}
@@ -949,7 +951,7 @@ body#product {
margin-bottom: 0;
margin-right: 16px;
>.input-group {
> .input-group {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
@@ -1070,7 +1072,8 @@ body#product {
row-gap: 20px;
margin: 40px 0 0 0;
>div {
> div,
.product-delivery-tile {
display: flex;
flex-direction: row;
align-items: center;
@@ -1169,7 +1172,7 @@ body#product {
}
.product-customization {
>.card {
> .card {
padding: 24px;
background: #ece9e2;
@@ -1356,7 +1359,6 @@ body#product {
}
#product-details {
.product-reference,
.product-quantities {
display: none !important;
@@ -1400,7 +1402,8 @@ body#product {
#blockcart-modal {
.modal-content {
.modal-header {}
.modal-header {
}
.modal-body {
.product-name {
@@ -1558,7 +1561,7 @@ body#cart {
}
.product-card-qty {
>.input-group {
> .input-group {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
@@ -1729,7 +1732,7 @@ body#cart {
}
}
>div {
> div {
padding-top: 0 !important;
}
}
@@ -1776,7 +1779,8 @@ body#cart {
}
}
.card-block {}
.card-block {
}
.cart-overview {
.cart-items {
@@ -2183,7 +2187,7 @@ body#checkout {
margin-bottom: 16px;
background-color: #ece9e2;
>.card-block {
> .card-block {
padding: 24px 24px 0 24px;
}
@@ -2337,7 +2341,6 @@ body#order-confirmation {
}
section {
&#content,
&#content-hook_payment_return,
&#content-hook-order-confirmation-footer {
@@ -2394,7 +2397,6 @@ body#order-confirmation {
}
footer#footer {
.footer-box-newsletter,
.footer-box-services,
.footer-box-other-info {
@@ -2421,7 +2423,7 @@ body {
&:not(#ets_blog_page) {
main {
#left-column {
>div.block {
> div.block {
display: none !important;
}
}
@@ -2452,7 +2454,7 @@ body {
}
ul.ets-blog-list {
>li {
> li {
.post-wrapper {
border-radius: 10px;
overflow: hidden;
@@ -2501,7 +2503,7 @@ body {
}
.ets_blog_sidebar {
>.block {
> .block {
box-shadow: none !important;
border-radius: 10px;
}
@@ -2537,7 +2539,7 @@ body {
body#category {
#left-column {
>div {
> div {
border-radius: 10px;
}
}
@@ -2580,7 +2582,6 @@ body#category {
}
.data-sheet {
dd,
dt {
font-weight: 400 !important;
@@ -2609,7 +2610,7 @@ body#category {
}
form.elementor-search {
>ul.elementor-search__products {
> ul.elementor-search__products {
background: #f9f7f2;
border-radius: 0;
border: 1px solid rgba(17, 14, 12, 0.1);
@@ -2657,7 +2658,7 @@ body#category {
#header-menu {
.elementor-nav-menu {
>ul {
> ul {
justify-content: space-between;
align-items: center;
width: 100%;
@@ -2798,15 +2799,15 @@ body#category {
}
.home-box-1 {
>.elementor-column-wrap {
>.elementor-widget-wrap {
> .elementor-column-wrap {
> .elementor-widget-wrap {
display: grid;
grid-template-columns: 7fr 5fr;
grid-template-rows: 1fr 1fr;
grid-template-areas: 'item1 item2''item1 item3';
grid-template-areas: 'item1 item2' 'item1 item3';
gap: 20px;
>.elementor-element {
> .elementor-element {
&:nth-child(1) {
grid-area: item1;
}
@@ -2842,10 +2843,10 @@ body#category {
}
}
>.elementor-widget-container {
> .elementor-widget-container {
height: 100%;
>.elementor-cta {
> .elementor-cta {
height: 100%;
}
}
@@ -2899,8 +2900,8 @@ body#category {
background: rgba(#aa8a5e, 0.25);
}
>.elementor-container {
>.elementor-row {
> .elementor-container {
> .elementor-row {
align-items: center;
}
}
@@ -2933,8 +2934,8 @@ body#category {
}
.footer-box-other-info {
>.elementor-container {
>.elementor-row {
> .elementor-container {
> .elementor-row {
column-gap: 80px;
position: relative;
@@ -2959,7 +2960,8 @@ article {
&.product-card {
.product-description {
.product-title {
a {}
a {
}
}
}
}
@@ -3148,7 +3150,6 @@ nav.breadcrumb {
}
body#cms {
// Disable custom footer elements
&.cms-id-5,
&.cms-id-6,
@@ -3202,7 +3203,7 @@ body#cms {
}
#js-product-list {
>.products {
> .products {
row-gap: 40px;
}
}
@@ -3254,7 +3255,7 @@ body#cms {
.elementor-cart__summary {
border: none;
>span {
> span {
margin-bottom: 5px;
}
}
@@ -3441,7 +3442,7 @@ body#authentication {
}
.register-form {
>p {
> p {
display: none;
}
@@ -3532,7 +3533,7 @@ body#authentication {
.leo-top-menu {
ul.nav.navbar-nav {
>li {
> li {
&:last-child {
padding-right: 0;
@@ -3555,7 +3556,7 @@ body#authentication {
align-items: center;
width: 100%;
>li {
> li {
position: relative;
// padding: 0 23.5px;
padding: 0;
@@ -3565,7 +3566,8 @@ body#authentication {
}
&.promo-item {
>a[href="https://masimmo.pl/promocje/"] {
>a[href="https://masimmo.pl/promocje/"]
{
span {
color: #e79332 !important;
}
@@ -3579,7 +3581,7 @@ body#authentication {
}
&:not(:first-child) {
>a {
> a {
padding-left: 23.5px;
@media (max-width: 1200px) {
@@ -3593,7 +3595,7 @@ body#authentication {
}
&:not(:last-child) {
>a {
> a {
position: relative;
padding-right: 23.5px;
@@ -3619,7 +3621,7 @@ body#authentication {
}
}
>a {
> a {
text-transform: uppercase;
font-weight: 600;
// padding-left: 23.5px;
@@ -3801,8 +3803,8 @@ body#authentication {
}
.faceted-slider {
>li {
>p {
> li {
> p {
color: #462d26;
font-family: 'Inter', sans-serif;
font-size: 14px;
@@ -3837,7 +3839,7 @@ body#authentication {
#contact {
main {
.container {
>.row:nth-child(2) {
> .row:nth-child(2) {
display: grid;
grid-template-columns: 310px 1fr;
gap: 32px;
@@ -4045,8 +4047,8 @@ body#authentication {
margin-bottom: 15px;
}
>div {
>.elementor-row {
> div {
> .elementor-row {
flex-wrap: nowrap;
align-items: center;
}
@@ -4055,24 +4057,24 @@ body#authentication {
.header-panel-box-row-2 {
.header-panel-box-row-2-col-1 {
>div {
>.elementor-widget-wrap {
> div {
> .elementor-widget-wrap {
flex-wrap: nowrap;
align-items: center;
>.elementor-widget-ps-widget-module {
> .elementor-widget-ps-widget-module {
margin-bottom: 0;
width: fit-content;
}
>.elementor-widget-ajax-search {
>.elementor-widget-container {
> .elementor-widget-ajax-search {
> .elementor-widget-container {
border: 1px solid #e9e3d7;
min-height: 44px;
}
form.elementor-search {
>.elementor-search__container {
> .elementor-search__container {
button.elementor-search__submit {
order: 1;
}
@@ -4110,7 +4112,7 @@ section.off-canvas-nav-megamenu {
flex-direction: row;
justify-content: space-between;
>a {
> a {
img {
width: 100%;
max-width: 200px;
@@ -4154,7 +4156,7 @@ section.off-canvas-nav-megamenu {
li.nav-item {
&.open-sub {
>a {
> a {
border: none !important;
.menu-title {
@@ -4222,8 +4224,8 @@ section.off-canvas-nav-megamenu {
}
&.promo-item {
>a {
>.menu-title {
> a {
> .menu-title {
color: #c40000;
}
}
@@ -4240,7 +4242,6 @@ section.off-canvas-nav-megamenu {
.dropdown-menu-inner {
.mega-col {
// &:not(:first-child) {
.menu-title {
// padding-top: 20px;
@@ -4316,9 +4317,9 @@ form {
.scroll-brn-box {
position: fixed;
bottom: 40px;
right: 40px;
z-index: 100000000000;
bottom: 38px;
right: 100px;
z-index: 10000000;
opacity: 0;
visibility: hidden;
transition: all 250ms ease-in-out;
@@ -4329,8 +4330,8 @@ form {
}
a {
width: 50px;
height: 50px;
width: 56px;
height: 56px;
background: #e79332;
border-radius: 100%;
display: flex;
@@ -4360,7 +4361,7 @@ form {
flex-direction: row;
justify-content: space-between;
>.label {
> .label {
text-align: left;
}
@@ -4377,7 +4378,7 @@ form {
#moved-category-structure {
.elementor-cta-content {
>div {
> div {
width: 100%;
}
}
@@ -4417,8 +4418,8 @@ section#checkout-payment-step {
row-gap: 10px;
margin-bottom: 20px;
>.js-payment-option-form,
>.js-additional-information {
> .js-payment-option-form,
> .js-additional-information {
display: none !important;
}
@@ -4478,11 +4479,11 @@ section#checkout-payment-step {
order: 103;
}
>.payment-option {
> .payment-option {
height: 100%;
margin: 0 !important;
>label {
> label {
display: flex;
flex-direction: column;
align-items: center;
@@ -4531,8 +4532,8 @@ section#checkout-payment-step {
.navbar-nav.megamenu {
li:nth-child(7) {
>a {
color: #E79332 !important;
> a {
color: #e79332 !important;
}
}
}

View File

@@ -447,3 +447,50 @@ if (isEditing()) return;
window.addEventListener('popstate', onNav);
})();
})();
$(document).ready(function () {
function toggleChatWidget(isOpen) {
var $widget = $('div[data-testid="widgetButtonFrame"]');
var $scrollBox = $('.scroll-brn-box')
if ($widget.length) {
if (isOpen) {
$widget.hide();
$scrollBox.hide();
} else {
$widget.show();
$scrollBox.show();
}
}
}
function checkCartState() {
var $cart = $('.elementor-cart__container');
var isOpen = $cart.hasClass('elementor-cart--shown');
toggleChatWidget(isOpen);
}
$('a[href*="koszyk"][class*="elementor-button"]').on('click', function () {
setTimeout(checkCartState, 300);
});
$(document).on('click', '.elementor-cart__close-button', function () {
setTimeout(checkCartState, 300);
});
$(document).on('click', '.elementor-cart__container.elementor-lightbox.elementor-cart--shown', function (e) {
if (e.target === this) {
setTimeout(checkCartState, 300);
}
});
const cartContainer = document.querySelector('.elementor-cart__container');
if (cartContainer) {
const observer = new MutationObserver(() => checkCartState());
observer.observe(cartContainer, { attributes: true, attributeFilter: ['class'] });
}
checkCartState();
});

View File

@@ -94,18 +94,19 @@
var _smartsupp = _smartsupp || {};
_smartsupp.key = '0d334d3fee8a20124724fb0e40e42cb00d98a537';
_smartsupp.color = '#e78c32';
_smartsupp.offsetX = 100; // move along the X axis by 100 pixels
_smartsupp.offsetX = 40; // move along the X axis by 100 pixels
_smartsupp.offsetY = 38;
window.smartsupp || (function(d) {
var s, c, o = smartsupp = function() { o._.push(arguments) };
o._ = [];
s = d.getElementsByTagName('script')[0];
c = d.createElement('script');
c.type = 'text/javascript';
c.charset = 'utf-8';
c.async = true;
c.src = 'https://www.smartsuppchat.com/loader.js?';
s.parentNode.insertBefore(c, s);
window.smartsupp||(function(d) {
var s,c,o=smartsupp=function(){ o._.push(arguments) };
o._=[];
s=d.getElementsByTagName('script')[0];
c=d.createElement('script');
c.type='text/javascript';
c.charset='utf-8';
c.async=true;
c.src='https://www.smartsuppchat.com/loader.js?';
s.parentNode.insertBefore(c,s);
})(document);
</script>
{/literal}

View File

@@ -0,0 +1,25 @@
<div class="product-delivery-tile">
<span class="item-product">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" data-img-url="/modules/blockreassurance/views/img/img_perso/Package.svg" class="svg replaced-svg">
<g clip-path="url(#clip0_6241_8999)">
<path d="M12 12.1016V21.7466" stroke="#462D26" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="fill: rgb(241, 157, 118);"></path>
<path d="M3.06641 7.21094L12.0008 12.1009L20.9352 7.21094" stroke="#462D26" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="fill: rgb(241, 157, 118);"></path>
<path d="M20.61 17.1415L12.36 21.6584C12.2496 21.7188 12.1258 21.7504 12 21.7504C11.8742 21.7504 11.7504 21.7188 11.64 21.6584L3.39 17.1415C3.2722 17.077 3.17386 16.9821 3.10526 16.8667C3.03666 16.7513 3.0003 16.6195 3 16.4853V7.51713C3.0003 7.38284 3.03666 7.25111 3.10526 7.13567C3.17386 7.02023 3.2722 6.92533 3.39 6.86088L11.64 2.344C11.7504 2.28361 11.8742 2.25195 12 2.25195C12.1258 2.25195 12.2496 2.28361 12.36 2.344L20.61 6.86088C20.7278 6.92533 20.8261 7.02023 20.8947 7.13567C20.9633 7.25111 20.9997 7.38284 21 7.51713V16.4834C21 16.618 20.9638 16.7501 20.8952 16.8659C20.8266 16.9817 20.7281 17.0769 20.61 17.1415Z" stroke="#462D26" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="fill: rgb(241, 157, 118);"></path>
<path d="M7.64648 4.5293L16.5002 9.37523V14.2502" stroke="#462D26" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="fill: rgb(241, 157, 118);"></path>
</g>
<defs>
<clipPath id="clip0_6241_8999">
<rect width="24" height="24" fill="white"></rect>
</clipPath>
</defs>
</svg>
&nbsp;
</span>
<span class="block-title" style="color:#000000;">Darmowa wysyłka w:</span>
{if $quantity > 0}
<p class="block-description" style="color:#000000;">{$product.delivery_in_stock}</p>
{else}
<p class="block-description" style="color:#000000;">{$product.delivery_out_stock}</p>
{/if}
</div>

File diff suppressed because one or more lines are too long