Add view classes for articles, banners, languages, menu, newsletter, containers, shop categories, clients, payment methods, products, and search
- Created `Articles` class for rendering article views including full articles, miniature lists, and news sections. - Added `Banners` class for handling banner displays. - Introduced `Languages` class for rendering language options. - Implemented `Menu` class for rendering page and menu structures. - Developed `Newsletter` class for newsletter rendering. - Created `Scontainers` class for rendering specific containers. - Added `ShopCategory` class for managing shop category views and pagination. - Implemented `ShopClient` class for client-related views including address management and login forms. - Created `ShopPaymentMethod` class for displaying payment methods in the basket. - Added `ShopProduct` class for generating product URLs. - Introduced `ShopSearch` class for rendering a simple search form. - Added `.htaccess` file in the plugins directory to enhance security by restricting access to sensitive files and directories.
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
<? global $config; $this -> settings['ssl'] ? $base = 'https' : $base = 'http';?>
|
||||
<? global $config; $this -> settings['ssl'] ? $base = 'https' : $base = 'http'; $base_secure = 'https'; $paymentRepo = new \Domain\PaymentMethod\PaymentMethodRepository( $GLOBALS['mdb'] );?>
|
||||
<div class="order-summary">
|
||||
<div class="box-title">
|
||||
<?= ucfirst( \S::lang( 'szczegoly-zamowienia' ) );?>: <?= $this -> order['number'];?>
|
||||
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'szczegoly-zamowienia' ) );?>: <?= $this -> order['number'];?>
|
||||
</div>
|
||||
<?= \Tpl::view( 'shop-order/order-simple', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-order/order-simple', [
|
||||
'order' => $this -> order,
|
||||
'coupon' => $this -> coupon,
|
||||
'statuses' => \shop\Order::order_statuses()
|
||||
'statuses' => ( new \Domain\Order\OrderRepository( $GLOBALS['mdb'] ) )->orderStatuses()
|
||||
] );?>
|
||||
<? if ( $this -> order['status'] == 0 or $this -> order['status'] == 2 ):?>
|
||||
<div class="order-bottom">
|
||||
<div class="left">
|
||||
<div class="content">
|
||||
<div class="box-title"><?= ucfirst( \S::lang( 'dane-do-przelewu' ) );?>:</div>
|
||||
<?= str_replace( [ '[KWOTA]', '[NR-ZAMOWIENIA]' ], [ \S::decimal( $this -> order['summary'] ) . ' zł', $this -> order['number'] ], $this -> settings['shop_bank_account_info'] );?>
|
||||
<div class="box-title"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'dane-do-przelewu' ) );?>:</div>
|
||||
<?= str_replace( [ '[KWOTA]', '[NR-ZAMOWIENIA]' ], [ \Shared\Helpers\Helpers::decimal( $this -> order['summary'] ) . ' zł', $this -> order['number'] ], $this -> settings['shop_bank_account_info'] );?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="content">
|
||||
<div class="box-title"><?= $this -> order['payment_method_id'] == 6 ? 'Zapłać za pomocą PAYPO' : ucfirst( \S::lang( 'platnosc-online' ) );?>:</div>
|
||||
<div class="box-title"><?= $this -> order['payment_method_id'] == 6 ? 'Zapłać za pomocą PAYPO' : ucfirst( \Shared\Helpers\Helpers::lang( 'platnosc-online' ) );?>:</div>
|
||||
<? if ( $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ):?>
|
||||
<div class="payment-info">Co prawda nie wybrałeś żadnej z dostępnych form "szybkich płatności", ale w każdej chwili możesz z nich skorzystać.</div>
|
||||
<? endif;?>
|
||||
<? if ( ( $this -> order['payment_method_id'] == 2 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 2 ) ):?>
|
||||
<? if ( ( $this -> order['payment_method_id'] == 2 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and $paymentRepo->isActive( 2 ) ):?>
|
||||
<form id="order" action="https://platnosc.hotpay.pl/" method="post">
|
||||
<input required name="SEKRET" value="<?= $this -> settings['hotpay_api'];?>" type="hidden">
|
||||
<input required name="KWOTA" value="<?= round( $this -> order['summary'], 2 );?>" type="hidden">
|
||||
@@ -33,17 +33,17 @@
|
||||
<input name="DANE_OSOBOWE" value="" type="hidden">
|
||||
<div class="form-group row agreement">
|
||||
<div class="col-12">
|
||||
<input type="checkbox" required id="agreement"> <?= \S::lang( 'akceptuje-regulamin-sklepu' );?>
|
||||
<input type="checkbox" required id="agreement"> <?= \Shared\Helpers\Helpers::lang( 'akceptuje-regulamin-sklepu' );?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row agreement">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-success"><?= \S::lang( 'zaplac-online' );?> <b><?= \S::decimal( $this -> order['summary'] );?> zł</b></button>
|
||||
<button type="submit" class="btn btn-success"><?= \Shared\Helpers\Helpers::lang( 'zaplac-online' );?> <b><?= \Shared\Helpers\Helpers::decimal( $this -> order['summary'] );?> zł</b></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<? endif;?>
|
||||
<? if ( $this -> order['payment_method_id'] == 6 and \front\factory\ShopPaymentMethod::is_payment_active( 6 ) ):?>
|
||||
<? if ( $this -> order['payment_method_id'] == 6 and $paymentRepo->isActive( 6 ) ):?>
|
||||
<?
|
||||
global $mdb;
|
||||
$przelewy24_hash = md5( time() );
|
||||
@@ -69,13 +69,13 @@
|
||||
<input type="hidden" name="p24_wait_for_result" value="1">
|
||||
<input type="hidden" name="p24_method" value="227">
|
||||
<input type="hidden" name="p24_sign" value="<?= md5( $przelewy24_hash . '|' . $this -> settings['przelewy24_merchant_id'] . '|' . ( $this -> order['summary'] * 100 ) . '|PLN|' . $this -> settings['przelewy24_crc_key'] );?>" />
|
||||
<button type="submit" name="submit_send" class="btn btn-success">Zapłać za pomocą PAYPO <b><?= \S::decimal( $this -> order['summary'] );?> zł</b></button>
|
||||
<button type="submit" name="submit_send" class="btn btn-success">Zapłać za pomocą PAYPO <b><?= \Shared\Helpers\Helpers::decimal( $this -> order['summary'] );?> zł</b></button>
|
||||
</form>
|
||||
<? endif;?>
|
||||
<? if ( $this -> order['payment_method_id'] == 6 ):?>
|
||||
<div class="box-title">lub skorzystaj z płatności online</div>
|
||||
<? endif;?>
|
||||
<? if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 4 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 4 ) ):?>
|
||||
<? if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 4 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and $paymentRepo->isActive( 4 ) ):?>
|
||||
<?
|
||||
global $mdb;
|
||||
$przelewy24_hash = md5( time() );
|
||||
@@ -100,11 +100,11 @@
|
||||
<input type="hidden" name="p24_api_version" value="3.2" />
|
||||
<input type="hidden" name="p24_wait_for_result" value="1">
|
||||
<input type="hidden" name="p24_sign" value="<?= md5( $przelewy24_hash . '|' . $this -> settings['przelewy24_merchant_id'] . '|' . ( $this -> order['summary'] * 100 ) . '|PLN|' . $this -> settings['przelewy24_crc_key'] );?>" />
|
||||
<button type="submit" name="submit_send" class="btn btn-success"><?= \S::lang( 'zaplac-online' );?> <b><?= \S::decimal( $this -> order['summary'] );?> zł</b></button>
|
||||
<button type="submit" name="submit_send" class="btn btn-success"><?= \Shared\Helpers\Helpers::lang( 'zaplac-online' );?> <b><?= \Shared\Helpers\Helpers::decimal( $this -> order['summary'] );?> zł</b></button>
|
||||
</form>
|
||||
<? endif;?>
|
||||
<?
|
||||
if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 5 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 5 ) ):
|
||||
if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 5 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and $paymentRepo->isActive( 5 ) ):
|
||||
|
||||
$url = 'https://secure.tpay.com';
|
||||
|
||||
@@ -119,12 +119,12 @@
|
||||
$url .= '&email=' . urlencode( $this -> order['client_email'] );
|
||||
$url .= '&nazwisko=' . urlencode( $this -> order['client_name'] . ' ' . $this -> order['client_surname'] );
|
||||
$url .= '&crc=' . $this -> order['hash'];
|
||||
$url .= '&result_url=' . urlencode( $base . "://" . $_SERVER['SERVER_NAME'] . '/tpay-status' );
|
||||
$url .= '&return_url=' . urlencode( $base . "://" . $_SERVER['SERVER_NAME'] . '/potwierdzenie-platnosci/' . $this -> order['hash'] );
|
||||
$url .= '&return_error_url=' . urlencode( $base . "://" . $_SERVER['SERVER_NAME'] . '/zamowienie/' . $this -> order['hash'] );
|
||||
$url .= '&result_url=' . urlencode( $base_secure . "://" . $_SERVER['SERVER_NAME'] . '/tpay-status' );
|
||||
$url .= '&return_url=' . urlencode( $base_secure . "://" . $_SERVER['SERVER_NAME'] . '/potwierdzenie-platnosci/' . $this -> order['hash'] );
|
||||
$url .= '&return_error_url=' . urlencode( $base_secure . "://" . $_SERVER['SERVER_NAME'] . '/zamowienie/' . $this -> order['hash'] );
|
||||
$url .= '&md5sum=' . md5( $id . '&' . str_replace( ',', '.', round( $this -> order['summary'], 2 ) ) . '&' . $this -> order['hash'] . '&' . $code );
|
||||
?>
|
||||
<button type="button" onclick="document.location.href='<?= $url;?>'" class="btn btn-success"><?= \S::lang( 'zaplac-online' );?> <?= \S::decimal( $this -> order['summary'] );?> zł</b></button>
|
||||
<button type="button" onclick="document.location.href='<?= $url;?>'" class="btn btn-success"><?= \Shared\Helpers\Helpers::lang( 'zaplac-online' );?> <?= \Shared\Helpers\Helpers::decimal( $this -> order['summary'] );?> zł</b></button>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -141,7 +141,7 @@
|
||||
radioClass: 'iradio_minimal-blue'
|
||||
});
|
||||
|
||||
<? if ( \S::get_session( 'piksel_purchase' ) and $this -> settings[ 'piksel' ] ):?>
|
||||
<? if ( \Shared\Helpers\Helpers::get_session( 'piksel_purchase' ) and $this -> settings[ 'piksel' ] ):?>
|
||||
<? unset( $_SESSION['piksel_purchase'] );?>
|
||||
fbq(
|
||||
'track',
|
||||
@@ -157,15 +157,15 @@
|
||||
} );
|
||||
<? endif;?>
|
||||
|
||||
<? if ( \S::get_session('google-analytics-purchase') ):?>
|
||||
<? if ( \Shared\Helpers\Helpers::get_session('google-analytics-purchase') ):?>
|
||||
<? if ( $this -> settings['google_tag_manager_id'] ):?>
|
||||
dataLayer.push({
|
||||
event: "purchase",
|
||||
ecommerce: {
|
||||
transaction_id: "<?= $this -> order['id'];?>",
|
||||
currency: "PLN",
|
||||
value: <?= \S::normalize_decimal( round( $this -> order['summary'], 2 ) ) - str_replace( ',', '.', round( $this -> order['transport_cost'], 2 ) );?>,
|
||||
shipping: <?= \S::normalize_decimal( $this -> order['transport_cost'] );?>,
|
||||
value: <?= \Shared\Helpers\Helpers::normalize_decimal( round( $this -> order['summary'], 2 ) ) - str_replace( ',', '.', round( $this -> order['transport_cost'], 2 ) );?>,
|
||||
shipping: <?= \Shared\Helpers\Helpers::normalize_decimal( $this -> order['transport_cost'] );?>,
|
||||
user_email: "<?= $this -> order['client_email'] ?>",
|
||||
user_phone: "<?= $this -> order['client_phone'] ?>",
|
||||
user_name: "<?= $this -> order['client_name'] ?>",
|
||||
@@ -191,4 +191,4 @@
|
||||
<? unset( $_SESSION['google-adwords-purchase'] );?>
|
||||
<? endif;?>
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user