Initial commit
This commit is contained in:
141
playarea/templates/pages/checkout.php
Normal file
141
playarea/templates/pages/checkout.php
Normal file
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
|
||||
global $cart;
|
||||
$count = $cart->get_count();
|
||||
//if($count == 0) { $b->router_redirect("/cart/"); exit(); }
|
||||
|
||||
?>
|
||||
<?php $this->template_load("head.php"); ?>
|
||||
<?php $this->template_load("header.php"); ?>
|
||||
<?php $person = $_GET["person"] ?? 2; ?>
|
||||
|
||||
<main class="main">
|
||||
<div class="basket delivery">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 position-relative">
|
||||
<a href="/" class="back-home">główna</a>
|
||||
<h1 class="title-text"><span>Dane</span></h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="delivery-info">
|
||||
<div class="d-flex">
|
||||
<p class="info-name">Dane odbiorcy przesyłki </p>
|
||||
<button class="edit-btn">zmień</button>
|
||||
</div>
|
||||
<div class="info-text">
|
||||
<p>ASDASD aSDDAD</p>
|
||||
<p>Abramowich 12</p>
|
||||
<p>03-523 Warszawa</p>
|
||||
<p>telefon: <span>778855441</span></p>
|
||||
<p>e-mail: <span>Asdadad@gmail.com</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<table class="basket-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="product-info">
|
||||
<div class="product-img">
|
||||
<img src="<?= $b->pa_get_assets_dir() ?>main/img/png/landshaft.png" alt="product">
|
||||
</div>
|
||||
<div class="product-text">
|
||||
<p class="product-name">Kuweta dla psa</p>
|
||||
<p class="product_text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="product-formate">subskybucja - 1 tydzień</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="product-amount d-flex align-items-center justify-content-center">
|
||||
<span class="amount-val">1</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<P class="product-price text-center">$<span>1024.21</span></P>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="delivery-info">
|
||||
<div class="d-flex">
|
||||
<p class="info-name">Sposób dostawy</p>
|
||||
<button class="edit-btn">zmień</button>
|
||||
</div>
|
||||
<div class="info-text">
|
||||
<p>Kurier</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="delivery-info">
|
||||
<div class="d-flex">
|
||||
<p class="info-name">Sposób płatności</p>
|
||||
<button class="edit-btn">zmień</button>
|
||||
</div>
|
||||
<div class="info-text">
|
||||
<p>Przelew błyskawiczny</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="basket-order d-flex justify-content-between flex-wrap">
|
||||
<div class="toBe-paid">
|
||||
<div class="paid-title d-flex align-items-center justify-content-between">
|
||||
<span>Do zapłaty</span>
|
||||
<span>$4046.21</span>
|
||||
</div>
|
||||
<div class="paid-list d-flex align-items-center justify-content-between">
|
||||
<span>dobra 5 szt</span>
|
||||
<span>$4046.21</span>
|
||||
</div>
|
||||
<div class="paid-list d-flex align-items-center justify-content-between">
|
||||
<span>rabat</span>
|
||||
<span>-$321</span>
|
||||
</div>
|
||||
<div class="check-box">
|
||||
<input type="checkbox" id="check-paid" class="form__check">
|
||||
<label for="check-paid">Akceptuję regulamin sklepu (zgoda wymagana)</label>
|
||||
</div>
|
||||
<button class="paid-btn form-submit">Zamawiam i płacę</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
bind_cart_buttons();
|
||||
})
|
||||
|
||||
function bind_cart_buttons(){
|
||||
$(".input-track").each((index, el) => {
|
||||
$(el).off("change");
|
||||
$(el).on("change", function (el) {
|
||||
var input = $(this);
|
||||
var value = input.val();
|
||||
var name = input.attr("name");
|
||||
console.log(value, name)
|
||||
|
||||
$.post( "/checkout/update/", { name, value })
|
||||
.done(function( data ) {
|
||||
update_checkout();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function update_checkout(){
|
||||
$.get( "/checkout/frame/?person=<?= $b->get_view($person); ?>")
|
||||
.done(function( data ) {
|
||||
$(".checkout-wrapper").html(data);
|
||||
bind_cart_buttons();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php $this->template_load("footer.php"); ?>
|
||||
Reference in New Issue
Block a user