ver. 0.285: Tpl → Shared\Tpl namespace, CurlServer removal, thumb.php fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,7 @@ $text = \front\Views\Articles::generateHeadersIds( $text );
|
||||
if ( strpos( $this -> article['language']['text'], '[GALERIA]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['images'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
$gallery = $tpl -> render( 'articles/article-gallery' );
|
||||
@@ -92,7 +92,7 @@ $text = \front\Views\Articles::generateHeadersIds( $text );
|
||||
if ( strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['files'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> files = $this -> article['files'];
|
||||
$files = $tpl -> render( 'articles/article-files' );
|
||||
@@ -121,7 +121,7 @@ $text = \front\Views\Articles::generateHeadersIds( $text );
|
||||
$images[] = $image;
|
||||
}
|
||||
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> images = $images;
|
||||
$tpl -> article_id = $this -> article['id'];
|
||||
$tpl -> i = $i;
|
||||
@@ -161,14 +161,14 @@ $text = \front\Views\Articles::generateHeadersIds( $text );
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $this -> article['images'] ) and strpos( $this -> article['language']['text'], '[GALERIA]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
echo $tpl -> render( 'articles/article-gallery' );
|
||||
endif;
|
||||
|
||||
if ( is_array( $this -> article['files'] ) and strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> files = $this -> article['files'];
|
||||
echo $tpl -> render( 'articles/article-files' );
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="row">
|
||||
<? if ( is_array( $this -> articles ) ): foreach ( $this -> articles as $article ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> page_id = $this -> page_id;
|
||||
$tpl -> article = $article;
|
||||
echo $tpl -> render( 'articles/article-entry' );
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<? endforeach; ?>
|
||||
<hr>
|
||||
<? endif; ?>
|
||||
<?= \Tpl::view( 'shop-basket/_partials/product-custom-fields', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-basket/_partials/product-custom-fields', [
|
||||
'custom_fields' => $position['custom_fields']
|
||||
] ); ?>
|
||||
<? if ( $product -> additional_message ):?>
|
||||
@@ -117,7 +117,7 @@
|
||||
<textarea name="basket-message" class="form-control" id="basket-message" placeholder="Dodatkowe informacje..."><?= htmlspecialchars($this->basket_message); ?></textarea>
|
||||
</div>
|
||||
<div class="coupon">
|
||||
<?= \Tpl::view( 'shop-coupon/form', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-coupon/form', [
|
||||
'coupon' => \Shared\Helpers\Helpers::get_session('coupon')
|
||||
] );
|
||||
?>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<? endforeach; ?>
|
||||
<hr>
|
||||
<? endif;?>
|
||||
<?= \Tpl::view( 'shop-basket/_partials/product-custom-fields', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-basket/_partials/product-custom-fields', [
|
||||
'custom_fields' => $position['custom_fields']
|
||||
] ); ?>
|
||||
<div class="product-message">
|
||||
@@ -138,12 +138,12 @@
|
||||
?>
|
||||
</div>
|
||||
<div class="right">
|
||||
<?= \Tpl::view( 'shop-basket/address-form', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-basket/address-form', [
|
||||
'transport_method' => $this -> transport
|
||||
] );?>
|
||||
</div>
|
||||
<? else:?>
|
||||
<?= \Tpl::view( 'shop-basket/address-form', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-basket/address-form', [
|
||||
'client' => $this -> client,
|
||||
'addresses' => $this -> addresses,
|
||||
'transport_method' => $this -> transport
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<? global $lang_id;?>
|
||||
<div class="row">
|
||||
<? if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):?>
|
||||
<?= \Tpl::view( 'shop-product/product-mini', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => \shop\Product::getFromCache( $product_id, $lang_id ),
|
||||
'class' => 'col-12 col-sm-6 col-lg-3'
|
||||
] );?>
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<? endif; ?>
|
||||
<?
|
||||
if ($this->category_additional_text) :
|
||||
echo \Tpl::view('shop-category/_partials/category-additional-text', [
|
||||
echo \Shared\Tpl\Tpl::view('shop-category/_partials/category-additional-text', [
|
||||
'category' => $this->category
|
||||
]);
|
||||
endif;
|
||||
?>
|
||||
<div class="category-content">
|
||||
<? if (is_array($this->products)) : foreach ($this->products as $product_id) :
|
||||
echo \Tpl::view('shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view('shop-product/product-mini', [
|
||||
'product' => \shop\Product::getFromCache( $product_id, $lang_id )
|
||||
]);
|
||||
endforeach;
|
||||
@@ -21,7 +21,7 @@ endif;
|
||||
</div>
|
||||
<?
|
||||
if ($this->category_description) :
|
||||
echo \Tpl::view('shop-category/category-description', [
|
||||
echo \Shared\Tpl\Tpl::view('shop-category/category-description', [
|
||||
'category' => $this->category
|
||||
]);
|
||||
endif;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<? endif;?>
|
||||
<?
|
||||
if ( $this -> category_additional_text ):
|
||||
echo \Tpl::view( 'shop-category/_partials/category-additional-text', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-category/_partials/category-additional-text', [
|
||||
'category' => $this -> category
|
||||
] );
|
||||
endif;
|
||||
@@ -15,7 +15,7 @@ endif;
|
||||
<?php
|
||||
|
||||
if ( $this -> category['view_subcategories'] ):
|
||||
echo \Tpl::view( 'shop-category/_partials/category-subcategory-tiles', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-category/_partials/category-subcategory-tiles', [
|
||||
'categories' => \shop\Category::get_subcategory_by_category( $this -> category['id'] ),
|
||||
] );
|
||||
|
||||
@@ -24,7 +24,7 @@ endif;
|
||||
|
||||
<div class="category-content" t='2'>
|
||||
<? if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => \shop\Product::getFromCache( $product_id, $lang_id )
|
||||
] );
|
||||
endforeach; endif;?>
|
||||
@@ -32,7 +32,7 @@ endif;
|
||||
<?= $this -> pager;?>
|
||||
<?
|
||||
if ( $this -> category_description ):
|
||||
echo \Tpl::view( 'shop-category/category-description', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-category/category-description', [
|
||||
'category' => $this -> category
|
||||
] );
|
||||
endif;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="category-content">
|
||||
<? if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
|
||||
$product = new \shop\Product( $product_id );
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => new \shop\Product( $product_id, $lang_id )
|
||||
] );
|
||||
endforeach; endif;?>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'historia-zamowien' ) );?>
|
||||
</div>
|
||||
<? if ( is_array( $this -> orders ) ): foreach ( $this -> orders as $order ):?>
|
||||
<?= \Tpl::view( 'shop-order/order-simple', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-order/order-simple', [
|
||||
'order' => $order,
|
||||
'statuses' => \shop\Order::order_statuses()
|
||||
] );?>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="box-title">
|
||||
<?= 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()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<? global $lang_id;?>
|
||||
<div class="category-content">
|
||||
<? if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => $product = \shop\Product::getFromCache( $product_id, $lang_id )
|
||||
] );
|
||||
endforeach; endif;?>
|
||||
@@ -9,7 +9,7 @@
|
||||
<?= $this -> pager;?>
|
||||
<?
|
||||
if ( $this -> producer['languages'][$lang_id]['description'] ):
|
||||
echo \Tpl::view( 'shop-producer/description', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-producer/description', [
|
||||
'description' => $this -> producer['languages'][$lang_id]['description']
|
||||
] );
|
||||
endif;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<div class="product-options" id="product-options">
|
||||
<?= \Tpl::view( 'shop-product/_partial/product-warehouse-message', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-product/_partial/product-warehouse-message', [
|
||||
'product' => $this -> product,
|
||||
'lang_id' => $this -> lang_id,
|
||||
'settings' => $this -> settings
|
||||
@@ -79,7 +79,7 @@
|
||||
<div id="attributes">
|
||||
<div class="title">Opcje produktu</div>
|
||||
<? foreach ( $attributes as $key => $val )
|
||||
echo \Tpl::view( 'shop-product/_partial/product-attribute', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/_partial/product-attribute', [
|
||||
'attribute' => $val,
|
||||
'order' => $key,
|
||||
'level' => ++$level,
|
||||
@@ -92,7 +92,7 @@
|
||||
<textarea class="form-control" name="product-message" <? if ( $this -> product['additional_message_required'] ):?>required="required"<? endif;?> placeholder="<?= $this -> product['additional_message_text'] ? $this -> product['additional_message_text'] : 'Miejsce na dodatkową wiadomość';?>"></textarea>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<?= \Tpl::view( 'shop-product/_partial/product-custom-fields', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-product/_partial/product-custom-fields', [
|
||||
'custom_fields' => $this -> product['custom_fields']
|
||||
] );?>
|
||||
<div class="add-to-basket">
|
||||
@@ -127,7 +127,7 @@
|
||||
</div>
|
||||
<? endif;?>
|
||||
|
||||
<?= \Tpl::view( 'shop-product/_partial/product-meta', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-product/_partial/product-meta', [
|
||||
'product_id' => $this->product['id']
|
||||
]);?>
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
foreach ( $this -> product['products_sets'] as $product_sets_id ):
|
||||
$product = \shop\Product::getFromCache( $product_sets_id, $lang_id );
|
||||
if ( $product and $product -> status ):
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => $product,
|
||||
'class' => 'item'
|
||||
] );
|
||||
@@ -245,7 +245,7 @@
|
||||
foreach ( $this -> product['products_related'] as $product_related_id ):
|
||||
$product = \shop\Product::getFromCache( $product_related_id, $lang_id );
|
||||
if ( $product and $product -> status ):
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => $product,
|
||||
'class' => 'item'
|
||||
] );
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<?
|
||||
foreach ( $this -> products as $product ):
|
||||
if ( $product -> status ):
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => $product,
|
||||
'class' => 'item',
|
||||
'product_mini_class' => 'swiper-slide'
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<?
|
||||
foreach ( $this -> products as $product ):
|
||||
if ( $product -> status ):
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => $product,
|
||||
'class' => 'item',
|
||||
'product_mini_class' => 'swiper-slide'
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<?
|
||||
foreach ( $this -> products as $product ):
|
||||
if ( $product -> status ):
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => $product,
|
||||
'class' => 'item',
|
||||
'product_mini_class' => 'swiper-slide'
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if ( \Shared\Helpers\Helpers::get_session( 'current-lang' ) != ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() and $url != '#' )
|
||||
$url = '/' . \Shared\Helpers\Helpers::get_session( 'current-lang' ) . $url;
|
||||
?>
|
||||
<?= \Tpl::view( 'shop-product/product-mini', [
|
||||
<?= \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => $product,
|
||||
'class' => 'col-12 col-sm-4 col-md-4 col-lg-3'
|
||||
] );?>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<? endif;?>
|
||||
<div class="search-content">
|
||||
<? if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
|
||||
echo \Tpl::view( 'shop-product/product-mini', [
|
||||
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => \shop\Product::getFromCache( $product_id, $lang_id )
|
||||
] );
|
||||
endforeach; endif;?>
|
||||
|
||||
Reference in New Issue
Block a user