Merge branch 'main' of http://91.189.216.43:3000/jacek.pyziak/masimmo.pl
This commit is contained in:
@@ -447,6 +447,11 @@ class ProductControllerCore extends ProductPresentingFrontControllerCore
|
|||||||
$this->setQuickViewMode();
|
$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();
|
ob_end_clean();
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
$this->ajaxRender(Tools::jsonEncode([
|
$this->ajaxRender(Tools::jsonEncode([
|
||||||
@@ -486,6 +491,12 @@ class ProductControllerCore extends ProductPresentingFrontControllerCore
|
|||||||
$this->getTemplateVarPage()['meta'] ?? []
|
$this->getTemplateVarPage()['meta'] ?? []
|
||||||
),
|
),
|
||||||
'is_quick_view' => $isQuickView,
|
'is_quick_view' => $isQuickView,
|
||||||
|
'product_delivery_time' => $this->render('catalog/_partials/product-delivery-time',
|
||||||
|
[
|
||||||
|
'quantity' => $quantity,
|
||||||
|
'product' => $product,
|
||||||
|
]
|
||||||
|
),
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,7 @@
|
|||||||
*}
|
*}
|
||||||
|
|
||||||
<div class="blockreassurance_product" t="1">
|
<div class="blockreassurance_product" t="1">
|
||||||
|
{* {if $product.delivery_in_stock}
|
||||||
|
|
||||||
{if $product.delivery_in_stock}
|
|
||||||
<div class="item-999 item-custom">
|
<div class="item-999 item-custom">
|
||||||
<span class="item-product">
|
<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">
|
<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>
|
<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;">{$product.delivery_in_stock}</p>
|
||||||
|
<p class="block-description" style="color:#000000; display:none;">{$product.delivery_out_stock}</p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if} *}
|
||||||
|
|
||||||
|
|
||||||
{foreach from=$blocks item=$block key=$key}
|
{foreach from=$blocks item=$block key=$key}
|
||||||
|
|||||||
@@ -461,9 +461,15 @@ class ProductLazyArray extends AbstractLazyArray
|
|||||||
|
|
||||||
if ($show_price && $this->product['reduction']) {
|
if ($show_price && $this->product['reduction']) {
|
||||||
if ($this->product['discount_type'] === 'percentage') {
|
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'] = [
|
$flags['discount'] = [
|
||||||
'type' => 'discount',
|
'type' => 'discount',
|
||||||
'label' => $this->product['discount_percentage'],
|
// 'label' => $this->product['discount_percentage'],
|
||||||
|
'label' => $discountLabel,
|
||||||
];
|
];
|
||||||
} elseif ($this->product['discount_type'] === 'amount') {
|
} elseif ($this->product['discount_type'] === 'amount') {
|
||||||
$flags['discount'] = [
|
$flags['discount'] = [
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,8 +5,7 @@ $cGoldDark: #d3ba67;
|
|||||||
$cBgAccent: #eff6f7;
|
$cBgAccent: #eff6f7;
|
||||||
$cBone: #f6f6f6;
|
$cBone: #f6f6f6;
|
||||||
|
|
||||||
$fInter: 'Inter',
|
$fInter: 'Inter', sans-serif;
|
||||||
sans-serif;
|
|
||||||
|
|
||||||
body > main {
|
body > main {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
@@ -212,10 +211,12 @@ a {
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
img {}
|
img {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlighted-informations {}
|
.highlighted-informations {
|
||||||
|
}
|
||||||
|
|
||||||
.product-add-to-basket {
|
.product-add-to-basket {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -288,7 +289,8 @@ a {
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.discount-product {}
|
.discount-product {
|
||||||
|
}
|
||||||
|
|
||||||
&.product-price-discount {
|
&.product-price-discount {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1070,7 +1072,8 @@ body#product {
|
|||||||
row-gap: 20px;
|
row-gap: 20px;
|
||||||
margin: 40px 0 0 0;
|
margin: 40px 0 0 0;
|
||||||
|
|
||||||
>div {
|
> div,
|
||||||
|
.product-delivery-tile {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -1356,7 +1359,6 @@ body#product {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#product-details {
|
#product-details {
|
||||||
|
|
||||||
.product-reference,
|
.product-reference,
|
||||||
.product-quantities {
|
.product-quantities {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
@@ -1400,7 +1402,8 @@ body#product {
|
|||||||
|
|
||||||
#blockcart-modal {
|
#blockcart-modal {
|
||||||
.modal-content {
|
.modal-content {
|
||||||
.modal-header {}
|
.modal-header {
|
||||||
|
}
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
.product-name {
|
.product-name {
|
||||||
@@ -1776,7 +1779,8 @@ body#cart {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-block {}
|
.card-block {
|
||||||
|
}
|
||||||
|
|
||||||
.cart-overview {
|
.cart-overview {
|
||||||
.cart-items {
|
.cart-items {
|
||||||
@@ -2337,7 +2341,6 @@ body#order-confirmation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
|
|
||||||
&#content,
|
&#content,
|
||||||
&#content-hook_payment_return,
|
&#content-hook_payment_return,
|
||||||
&#content-hook-order-confirmation-footer {
|
&#content-hook-order-confirmation-footer {
|
||||||
@@ -2394,7 +2397,6 @@ body#order-confirmation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer#footer {
|
footer#footer {
|
||||||
|
|
||||||
.footer-box-newsletter,
|
.footer-box-newsletter,
|
||||||
.footer-box-services,
|
.footer-box-services,
|
||||||
.footer-box-other-info {
|
.footer-box-other-info {
|
||||||
@@ -2580,7 +2582,6 @@ body#category {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.data-sheet {
|
.data-sheet {
|
||||||
|
|
||||||
dd,
|
dd,
|
||||||
dt {
|
dt {
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
@@ -2959,7 +2960,8 @@ article {
|
|||||||
&.product-card {
|
&.product-card {
|
||||||
.product-description {
|
.product-description {
|
||||||
.product-title {
|
.product-title {
|
||||||
a {}
|
a {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3148,7 +3150,6 @@ nav.breadcrumb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body#cms {
|
body#cms {
|
||||||
|
|
||||||
// Disable custom footer elements
|
// Disable custom footer elements
|
||||||
&.cms-id-5,
|
&.cms-id-5,
|
||||||
&.cms-id-6,
|
&.cms-id-6,
|
||||||
@@ -3565,7 +3566,8 @@ body#authentication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.promo-item {
|
&.promo-item {
|
||||||
>a[href="https://masimmo.pl/promocje/"] {
|
>a[href="https://masimmo.pl/promocje/"]
|
||||||
|
{
|
||||||
span {
|
span {
|
||||||
color: #e79332 !important;
|
color: #e79332 !important;
|
||||||
}
|
}
|
||||||
@@ -4240,7 +4242,6 @@ section.off-canvas-nav-megamenu {
|
|||||||
|
|
||||||
.dropdown-menu-inner {
|
.dropdown-menu-inner {
|
||||||
.mega-col {
|
.mega-col {
|
||||||
|
|
||||||
// &:not(:first-child) {
|
// &:not(:first-child) {
|
||||||
.menu-title {
|
.menu-title {
|
||||||
// padding-top: 20px;
|
// padding-top: 20px;
|
||||||
@@ -4316,9 +4317,9 @@ form {
|
|||||||
|
|
||||||
.scroll-brn-box {
|
.scroll-brn-box {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 40px;
|
bottom: 38px;
|
||||||
right: 40px;
|
right: 100px;
|
||||||
z-index: 100000000000;
|
z-index: 10000000;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
transition: all 250ms ease-in-out;
|
transition: all 250ms ease-in-out;
|
||||||
@@ -4329,8 +4330,8 @@ form {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
width: 50px;
|
width: 56px;
|
||||||
height: 50px;
|
height: 56px;
|
||||||
background: #e79332;
|
background: #e79332;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -4532,7 +4533,7 @@ section#checkout-payment-step {
|
|||||||
.navbar-nav.megamenu {
|
.navbar-nav.megamenu {
|
||||||
li:nth-child(7) {
|
li:nth-child(7) {
|
||||||
> a {
|
> a {
|
||||||
color: #E79332 !important;
|
color: #e79332 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -447,3 +447,50 @@ if (isEditing()) return;
|
|||||||
window.addEventListener('popstate', onNav);
|
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();
|
||||||
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -94,8 +94,9 @@
|
|||||||
var _smartsupp = _smartsupp || {};
|
var _smartsupp = _smartsupp || {};
|
||||||
_smartsupp.key = '0d334d3fee8a20124724fb0e40e42cb00d98a537';
|
_smartsupp.key = '0d334d3fee8a20124724fb0e40e42cb00d98a537';
|
||||||
_smartsupp.color = '#e78c32';
|
_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;
|
_smartsupp.offsetY = 38;
|
||||||
|
|
||||||
window.smartsupp||(function(d) {
|
window.smartsupp||(function(d) {
|
||||||
var s,c,o=smartsupp=function(){ o._.push(arguments) };
|
var s,c,o=smartsupp=function(){ o._.push(arguments) };
|
||||||
o._=[];
|
o._=[];
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
</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>
|
||||||
8687
themes/core.js
8687
themes/core.js
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user