Add buy-by-phone-form

This commit is contained in:
Roman Pyrih
2026-01-14 09:35:45 +01:00
parent 0751588e2e
commit b71ee93e55
77 changed files with 10442 additions and 27 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1070,7 +1070,7 @@ body#product {
display: flex;
flex-direction: column;
row-gap: 20px;
margin: 40px 0 0 0;
margin: 30px 0 0 0;
> div,
.product-delivery-tile {
@@ -4538,6 +4538,25 @@ section#checkout-payment-step {
}
}
#buy_by_phone_btn {
position: relative;
margin-top: 30px;
> .btn {
text-transform: initial;
font-size: 14px;
font-family: 'Inter', sans-serif;
font-weight: 500;
width: 100%;
margin: 0;
display: block;
&:hover {
background: #110e0c;
}
}
}
#buy-by-phone-popup {
position: fixed;
inset: 0;
@@ -4646,11 +4665,6 @@ section#checkout-payment-step {
display: flex;
align-items: center;
gap: 5px;
input[type='radio'] {
width: 20px;
height: 20px;
}
}
}
@@ -4662,6 +4676,7 @@ section#checkout-payment-step {
input#polityka {
width: fit-content;
padding: 0;
}
label {
@@ -4681,8 +4696,9 @@ section#checkout-payment-step {
.popup-body-top {
> p {
color: #e79332;
&.p1 {
color: #e79332;
}
> a {
color: #e79332;
text-decoration: underline;
@@ -4749,5 +4765,18 @@ section#checkout-payment-step {
}
}
}
input[type='text'],
input[type='tel'] {
border-radius: 3px;
background-color: #fff;
border: 1px solid #e6e5e5;
font-size: 14px;
&::placeholder {
font-size: 14px !important;
color: #262626 !important;
}
}
}
}

View File

@@ -606,12 +606,15 @@ $(document).ready(function () {
url: '/buy-by-phone.php',
data: formData,
success: function (response) {
console.log('formData: ', formData)
popupAlert(response)
$('#buy-by-phone-form-btn').prop('disabled', false)
setTimeout(function () {
buyByPhonePopup.removeClass('active')
}, 5000)
},
error: function () {
popupAlert('<p>Wystąpił błąd podczas wysyłania danych</p>')
$('#buy-by-phone-form-btn').prop('disabled', false)

View File

@@ -16,7 +16,7 @@
</div>
<div class="popup-body--right">
<div class="popup-body-top">
<p>ZADZWOŃ <a href="tel:172000035">172000035</a> lub uzupełnij i wyślij poniższy formularz, wówczas to my skontaktujemy się z Tobą.</p>
<p class="p1">ZADZWOŃ <a href="tel:+48 793 799 700">+48 793 799 700</a> lub uzupełnij i wyślij poniższy formularz, wówczas to my skontaktujemy się z Tobą.</p>
<form id="buy-by-phone-form" action="/buy-by-phone.php" method="post">
<input type="hidden" name="buy-by-phone-mail-from" value="masimmo">
<input type="hidden" name="buy-by-phone-product-name" value="{$product.name}">

View File

@@ -65,19 +65,6 @@
</div>
{/block}
{block name='product_buy_by_phone'}
{if $product_manufacturer->id == 3}
<div class="buy_by_phone" id="buy_by_phone_btn">
<button class="btn btn-primary add-to-cart" {if !$product.add_to_cart_url} disabled {/if}>
{l s='Buy by phone' d='Shop.Theme.Actions'}
</button>
</div>
{include file='catalog/_partials/buy-by-phone-popup.tpl' product=$product}
{/if}
{/block}
{block name='product_availability'}
<span id="product-availability" class="js-product-availability">
{if $product.show_availability && $product.availability_message}

View File

@@ -134,6 +134,18 @@
{block name='product_refresh'}{/block}
</form>
{/block}
{block name='product_buy_by_phone'}
{if $product_manufacturer->id == 3}
<div class="buy_by_phone" id="buy_by_phone_btn">
<button class="btn btn-primary add-to-cart" {if !$product.add_to_cart_url} disabled {/if}>
{l s='Kup przez telefon' d='Shop.Theme.Actions'}
</button>
</div>
{include file='catalog/_partials/buy-by-phone-popup.tpl' product=$product}
{/if}
{/block}
</div>
{if $product.is_customizable && count($product.customizations.fields)}