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:
@@ -8,7 +8,7 @@ class Articles
|
||||
*/
|
||||
public static function fullArticle( $article )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->article = $article;
|
||||
return $tpl->render( 'articles/article' );
|
||||
}
|
||||
@@ -22,14 +22,14 @@ class Articles
|
||||
|
||||
if ( is_array( $articles ) ) foreach ( $articles as $article )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->article = $article;
|
||||
$out .= $tpl->render( 'articles/article-miniature' );
|
||||
}
|
||||
|
||||
if ( $ls > 1 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->ls = $ls;
|
||||
$tpl->bs = $bs ? $bs : 1;
|
||||
$tpl->page = $page;
|
||||
@@ -44,14 +44,14 @@ class Articles
|
||||
*/
|
||||
public static function entryArticlesList( $articles, $ls, $bs, $page )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->page_id = $page['id'];
|
||||
$tpl->articles = $articles;
|
||||
$out = $tpl->render( 'articles/articles-entries' );
|
||||
|
||||
if ( $ls > 1 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->ls = $ls;
|
||||
$tpl->bs = $bs ? $bs : 1;
|
||||
$tpl->page = $page;
|
||||
@@ -70,14 +70,14 @@ class Articles
|
||||
|
||||
if ( is_array( $articles ) ) foreach ( $articles as $article )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->article = $article;
|
||||
$out .= $tpl->render( 'articles/article-full' );
|
||||
}
|
||||
|
||||
if ( $ls > 1 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->ls = $ls;
|
||||
$tpl->bs = $bs ? $bs : 1;
|
||||
$tpl->page = $page;
|
||||
@@ -92,7 +92,7 @@ class Articles
|
||||
*/
|
||||
public static function news( $page_id, $articles )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->page_id = $page_id;
|
||||
$tpl->articles = $articles;
|
||||
return $tpl->render( 'articles/news' );
|
||||
@@ -103,7 +103,7 @@ class Articles
|
||||
*/
|
||||
public static function newsList( $articles )
|
||||
{
|
||||
return \Tpl::view( 'articles/news-list', [
|
||||
return \Shared\Tpl\Tpl::view( 'articles/news-list', [
|
||||
'articles' => $articles
|
||||
] );
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class Banners
|
||||
{
|
||||
public static function banners($banners)
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->banners = $banners;
|
||||
return $tpl->render('banner/banners');
|
||||
}
|
||||
@@ -13,7 +13,7 @@ class Banners
|
||||
public static function mainBanner($banner)
|
||||
{
|
||||
if (!\Shared\Helpers\Helpers::get_session('banner_close') && is_array($banner)) {
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->banner = $banner;
|
||||
return $tpl->render('banner/main-banner');
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class Languages
|
||||
{
|
||||
public static function render( $languages )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> languages = $languages;
|
||||
return $tpl -> render( 'site/languages' );
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class Newsletter
|
||||
{
|
||||
public static function render()
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
return $tpl -> render( 'newsletter/newsletter' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class ShopBasket
|
||||
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
|
||||
|
||||
echo json_encode( [
|
||||
'basket' => \Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => $basket,
|
||||
'lang_id' => $lang_id,
|
||||
'coupon' => $coupon
|
||||
@@ -40,7 +40,7 @@ class ShopBasket
|
||||
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
|
||||
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
|
||||
'products_count' => count( $basket ),
|
||||
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
|
||||
'transport_id' => $basket_transport_method_id
|
||||
] )
|
||||
@@ -67,7 +67,7 @@ class ShopBasket
|
||||
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
|
||||
|
||||
echo json_encode( [
|
||||
'basket' => \Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => $basket,
|
||||
'lang_id' => $lang_id,
|
||||
'coupon' => $coupon
|
||||
@@ -75,7 +75,7 @@ class ShopBasket
|
||||
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
|
||||
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
|
||||
'products_count' => count( $basket ),
|
||||
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
|
||||
'transport_id' => $basket_transport_method_id
|
||||
] )
|
||||
@@ -103,7 +103,7 @@ class ShopBasket
|
||||
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
|
||||
|
||||
echo json_encode( [
|
||||
'basket' => \Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => $basket,
|
||||
'lang_id' => $lang_id,
|
||||
'coupon' => $coupon
|
||||
@@ -111,7 +111,7 @@ class ShopBasket
|
||||
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
|
||||
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
|
||||
'products_count' => count( $basket ),
|
||||
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
|
||||
'transport_id' => $basket_transport_method_id
|
||||
] )
|
||||
@@ -140,7 +140,7 @@ class ShopBasket
|
||||
$basket = \Shared\Helpers\Helpers::get_session( 'basket' );
|
||||
|
||||
echo json_encode( [
|
||||
'basket' => \Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => $basket,
|
||||
'lang_id' => $lang_id,
|
||||
'coupon' => $coupon
|
||||
@@ -148,7 +148,7 @@ class ShopBasket
|
||||
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
|
||||
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
|
||||
'products_count' => count( $basket ),
|
||||
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
|
||||
'transport_id' => $basket_transport_method_id
|
||||
] )
|
||||
@@ -339,7 +339,7 @@ class ShopBasket
|
||||
|
||||
$client = \Shared\Helpers\Helpers::get_session( 'client' );
|
||||
|
||||
return \Tpl::view( 'shop-basket/summary-view', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-basket/summary-view', [
|
||||
'lang_id' => $lang_id,
|
||||
'client' => \Shared\Helpers\Helpers::get_session( 'client' ),
|
||||
'basket' => \Shared\Helpers\Helpers::get_session( 'basket' ),
|
||||
@@ -437,16 +437,16 @@ class ShopBasket
|
||||
|
||||
$basket = \shop\Promotion::find_promotion( $basket );
|
||||
|
||||
return \Tpl::view( 'shop-basket/basket', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-basket/basket', [
|
||||
'basket' => $basket,
|
||||
'coupon' => $coupon,
|
||||
'transport_id' => \Shared\Helpers\Helpers::get_session( 'basket-transport-method-id' ),
|
||||
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
|
||||
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
|
||||
'transport_id' => $basket_transport_method_id
|
||||
] ),
|
||||
'payment_method_id' => $payment_method_id,
|
||||
'basket_details' => \Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket_details' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
|
||||
'basket' => $basket,
|
||||
'lang_id' => $lang_id,
|
||||
'coupon' => $coupon,
|
||||
|
||||
@@ -8,7 +8,7 @@ class ShopOrder
|
||||
|
||||
$order = \front\factory\ShopOrder::order_details( null, \Shared\Helpers\Helpers::get( 'order_hash' ) );
|
||||
|
||||
return \Tpl::view( 'shop-order/payment-confirmation', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-order/payment-confirmation', [
|
||||
'order' => $order,
|
||||
'settings' => $settings
|
||||
] );
|
||||
@@ -143,7 +143,7 @@ class ShopOrder
|
||||
);
|
||||
$coupon = (int)$order['coupon_id'] ? new \shop\Coupon( (int)$order['coupon_id'] ) : null;
|
||||
|
||||
return \Tpl::view( 'shop-order/order-details', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-order/order-details', [
|
||||
'order' => $order,
|
||||
'coupon' => $coupon,
|
||||
'client' => \Shared\Helpers\Helpers::get_session( 'client' ),
|
||||
|
||||
@@ -15,7 +15,7 @@ class ShopProducer
|
||||
|
||||
if ( $results['ls'] > 1 )
|
||||
{
|
||||
$pager = \Tpl::view( 'site/pager', [
|
||||
$pager = \Shared\Tpl\Tpl::view( 'site/pager', [
|
||||
'ls' => $results['ls'],
|
||||
'bs' => (int) \Shared\Helpers\Helpers::get( 'bs' ) ? (int) \Shared\Helpers\Helpers::get( 'bs' ) : 1,
|
||||
'page' => $page,
|
||||
@@ -23,7 +23,7 @@ class ShopProducer
|
||||
] );
|
||||
}
|
||||
|
||||
return \Tpl::view( 'shop-producer/products', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-producer/products', [
|
||||
'producer' => $producer,
|
||||
'products' => $results['products'],
|
||||
'pager' => $pager
|
||||
@@ -41,7 +41,7 @@ class ShopProducer
|
||||
if ( \Shared\Helpers\Helpers::is_array_fix( $rows ) ) foreach ( $rows as $row )
|
||||
$producers[] = new \shop\Producer( $row );
|
||||
|
||||
return \Tpl::view( 'shop-producer/list', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-producer/list', [
|
||||
'producers' => $producers
|
||||
] );
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ class ShopProduct
|
||||
$products_ids = \front\factory\ShopCategory::products_id( \Shared\Helpers\Helpers::get( 'category_id' ), \front\factory\ShopCategory::get_category_sort( (int)\Shared\Helpers\Helpers::get( 'category_id' ) ), $lang_id, 8, \Shared\Helpers\Helpers::get( 'offset' ) );
|
||||
|
||||
if ( is_array( $products_ids ) ): foreach ( $products_ids as $product_id ):
|
||||
$output .= \Tpl::view('shop-product/product-mini', [
|
||||
$output .= \Shared\Tpl\Tpl::view('shop-product/product-mini', [
|
||||
'product' => Product::getFromCache( $product_id, $lang_id )
|
||||
] );
|
||||
endforeach;
|
||||
|
||||
@@ -44,7 +44,7 @@ class Site
|
||||
if ( $product )
|
||||
{
|
||||
\shop\Product::add_visit( $product -> id );
|
||||
return \Tpl::view( 'shop-product/product', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-product/product', [
|
||||
'product' => $product,
|
||||
'settings' => $settings,
|
||||
'lang_id' => $lang_id,
|
||||
|
||||
@@ -216,7 +216,7 @@ class ShopOrder
|
||||
|
||||
$order = \front\factory\ShopOrder::order_details( $order_id );
|
||||
|
||||
$mail_order = \Tpl::view( 'shop-order/mail-summary', [
|
||||
$mail_order = \Shared\Tpl\Tpl::view( 'shop-order/mail-summary', [
|
||||
'settings' => $settings,
|
||||
'order' => $order,
|
||||
'coupon' => $coupon,
|
||||
|
||||
@@ -5,7 +5,7 @@ class Menu
|
||||
{
|
||||
public static function pages( $pages, $level = 0, $current_page = 0 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> pages = $pages;
|
||||
$tpl -> level = $level;
|
||||
$tpl -> current_page = $current_page;
|
||||
@@ -14,7 +14,7 @@ class Menu
|
||||
|
||||
public static function menu( $menu, $current_page )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> menu = $menu;
|
||||
$tpl -> current_page = $current_page;
|
||||
return $tpl -> render( 'menu/menu' );
|
||||
|
||||
@@ -5,7 +5,7 @@ class Scontainers
|
||||
{
|
||||
public static function scontainer( $id )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> scontainer = \front\factory\Scontainers::scontainer_details( $id );
|
||||
return $tpl -> render( 'scontainers/scontainer' );
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ class ShopCategory
|
||||
{
|
||||
static public function category_description( $category )
|
||||
{
|
||||
return \Tpl::view( 'shop-category/category-description', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-category/category-description', [
|
||||
'category' => $category
|
||||
] );
|
||||
}
|
||||
@@ -19,7 +19,7 @@ class ShopCategory
|
||||
|
||||
if ( $results['ls'] > 1 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> ls = $results['ls'];
|
||||
$tpl -> bs = $bs ? $bs : 1;
|
||||
$tpl -> page = $page;
|
||||
@@ -27,7 +27,7 @@ class ShopCategory
|
||||
$pager = $tpl -> render( 'site/pager' );
|
||||
}
|
||||
|
||||
return \Tpl::view( 'shop-category/category', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-category/category', [
|
||||
'category' => $category,
|
||||
'products' => $results['products'],
|
||||
'pager' => $pager,
|
||||
@@ -37,7 +37,7 @@ class ShopCategory
|
||||
}
|
||||
|
||||
$products_count = \front\factory\ShopCategory::category_products_count( $category, $lang_id );
|
||||
return \Tpl::view( 'shop-category/category-infinitescroll', [
|
||||
return \Shared\Tpl\Tpl::view( 'shop-category/category-infinitescroll', [
|
||||
'category' => $category,
|
||||
'products_count' => $products_count,
|
||||
'category_description' => (int)$bs <= 1 ? true : false,
|
||||
@@ -47,7 +47,7 @@ class ShopCategory
|
||||
|
||||
public static function categories( $categories, $current_category = 0, $level = 0 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> level = $level;
|
||||
$tpl -> current_category = $current_category;
|
||||
$tpl -> categories = $categories;
|
||||
|
||||
@@ -4,7 +4,7 @@ class ShopClient
|
||||
{
|
||||
public static function address_edit( $values )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
if ( is_array( $values ) ) foreach ( $values as $key => $val )
|
||||
$tpl -> $key = $val;
|
||||
return $tpl -> render( 'shop-client/address-edit' );
|
||||
@@ -12,7 +12,7 @@ class ShopClient
|
||||
|
||||
public static function client_addresses( $values )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
if ( is_array( $values ) ) foreach ( $values as $key => $val )
|
||||
$tpl -> $key = $val;
|
||||
return $tpl -> render( 'shop-client/client-addresses' );
|
||||
@@ -21,7 +21,7 @@ class ShopClient
|
||||
|
||||
public static function client_menu( $values )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
if ( is_array( $values ) ) foreach ( $values as $key => $val )
|
||||
$tpl -> $key = $val;
|
||||
return $tpl -> render( 'shop-client/client-menu' );
|
||||
@@ -29,7 +29,7 @@ class ShopClient
|
||||
|
||||
public static function client_orders( $values )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
if ( is_array( $values ) ) foreach ( $values as $key => $val )
|
||||
$tpl -> $key = $val;
|
||||
return $tpl -> render( 'shop-client/client-orders' );
|
||||
@@ -37,21 +37,21 @@ class ShopClient
|
||||
|
||||
public static function recover_password()
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
return $tpl -> render( 'shop-client/recover-password' );
|
||||
}
|
||||
|
||||
public static function mini_login()
|
||||
{
|
||||
global $client;
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> client = $client;
|
||||
return $tpl -> render( 'shop-client/mini-login' );
|
||||
}
|
||||
|
||||
public static function login_form( $values = '' )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
if ( is_array( $values ) ) foreach ( $values as $key => $val )
|
||||
$tpl -> $key = $val;
|
||||
return $tpl -> render( 'shop-client/login-form' );
|
||||
@@ -59,7 +59,7 @@ class ShopClient
|
||||
|
||||
public static function register_form()
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
return $tpl -> render( 'shop-client/register-form' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ class ShopOrder
|
||||
{
|
||||
public static function order_details( $values )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
if ( is_array( $values ) ) foreach ( $values as $key => $val )
|
||||
$tpl -> $key = $val;
|
||||
return $tpl -> render( 'shop-order/order-details' );
|
||||
|
||||
@@ -4,7 +4,7 @@ class ShopPaymentMethod
|
||||
{
|
||||
public static function basket_payment_methods( $payment_methods, $payment_id )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> payment_methods = $payment_methods;
|
||||
$tpl -> payment_id = $payment_id;
|
||||
return $tpl -> render( 'shop-basket/basket-payments-methods' );
|
||||
|
||||
@@ -60,7 +60,7 @@ class Site
|
||||
$html = str_replace( '[BANER_STRONA_GLOWNA]', \front\Views\Banners::mainBanner( $bannerRepo->mainBanner( $lang_id ) ), $html );
|
||||
$html = str_replace( '[BANERY]', \front\Views\Banners::banners( $bannerRepo->banners( $lang_id ) ), $html );
|
||||
|
||||
$html = str_replace( '[KATEGORIE]', \Tpl::view( 'shop-category/categories', [
|
||||
$html = str_replace( '[KATEGORIE]', \Shared\Tpl\Tpl::view( 'shop-category/categories', [
|
||||
'level' => $level,
|
||||
'current_category' => \Shared\Helpers\Helpers::get( 'category' ),
|
||||
'categories' => \front\factory\ShopCategory::categories_details()
|
||||
@@ -76,7 +76,7 @@ class Site
|
||||
$products_promoted_tmp[1] ? $pattern = '[PROMOWANE_PRODUKTY:' . $products_promoted_tmp[1] . ']' : $pattern = '[PROMOWANE_PRODUKTY]';
|
||||
|
||||
$html = str_replace( $pattern,
|
||||
\Tpl::view( 'shop-product/promoted-products', [
|
||||
\Shared\Tpl\Tpl::view( 'shop-product/promoted-products', [
|
||||
'products' => \front\factory\ShopProduct::promoted_products( $limit )
|
||||
] ),
|
||||
$html
|
||||
@@ -99,7 +99,7 @@ class Site
|
||||
}
|
||||
|
||||
$html = str_replace( '[KOSZYK]',
|
||||
\Tpl::view( 'shop-basket/basket-mini', [
|
||||
\Shared\Tpl\Tpl::view( 'shop-basket/basket-mini', [
|
||||
'basket' => \Shared\Helpers\Helpers::get_session( 'basket' ),
|
||||
'lang_id' => $lang_id,
|
||||
'coupon' => \Shared\Helpers\Helpers::get_session( 'coupon' )
|
||||
@@ -129,7 +129,7 @@ class Site
|
||||
$menu_tmp = explode( ':', $menu_tmp );
|
||||
$html = str_replace(
|
||||
'[MENU_GLOWNE:' . $menu_tmp[1] . ']',
|
||||
\Tpl::view( 'menu/main-menu', [
|
||||
\Shared\Tpl\Tpl::view( 'menu/main-menu', [
|
||||
'menu' => \front\factory\Menu::menu_details( $menu_tmp[1] )
|
||||
] ),
|
||||
$html );
|
||||
@@ -237,7 +237,7 @@ class Site
|
||||
$single_product = explode( ':', $single_product );
|
||||
$html = str_replace(
|
||||
'[PRODUKT:' . $single_product[1] . ']',
|
||||
\Tpl::view( 'shop-product/product-mini', [
|
||||
\Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => \shop\Product::getFromCache( (int)$single_product[1], $lang_id )
|
||||
] ),
|
||||
$html
|
||||
@@ -259,7 +259,7 @@ class Site
|
||||
|
||||
$html = str_replace(
|
||||
'[PRODUKTY_BOX:' . $products_box[1] . ']',
|
||||
\Tpl::view( 'shop-product/products-box', [
|
||||
\Shared\Tpl\Tpl::view( 'shop-product/products-box', [
|
||||
'products' => $products
|
||||
] ),
|
||||
$html
|
||||
@@ -287,7 +287,7 @@ class Site
|
||||
}
|
||||
|
||||
$html = str_replace( $pattern,
|
||||
\Tpl::view( 'shop-product/products-top', [
|
||||
\Shared\Tpl\Tpl::view( 'shop-product/products-top', [
|
||||
'products' => $top_products_arr,
|
||||
] ),
|
||||
$html
|
||||
@@ -316,7 +316,7 @@ class Site
|
||||
}
|
||||
|
||||
$html = str_replace( $pattern,
|
||||
\Tpl::view( 'shop-product/products-new', [
|
||||
\Shared\Tpl\Tpl::view( 'shop-product/products-new', [
|
||||
'products' => $top_products_arr,
|
||||
] ),
|
||||
$html
|
||||
@@ -377,7 +377,7 @@ class Site
|
||||
|
||||
$html = str_replace(
|
||||
$pattern,
|
||||
\Tpl::view( 'shop-category/blog-category-products', [
|
||||
\Shared\Tpl\Tpl::view( 'shop-category/blog-category-products', [
|
||||
'products' => \front\factory\ShopCategory::blog_category_products( $category_list_tmp[1], $lang_id, $products_limit )
|
||||
] ),
|
||||
$html );
|
||||
@@ -421,14 +421,14 @@ class Site
|
||||
|
||||
public static function facebook( $facebook_link )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> facebook_link = $facebook_link;
|
||||
return $tpl -> render( 'site/facebook' );
|
||||
}
|
||||
|
||||
static public function title( $title, $show_title, $page_title )
|
||||
{
|
||||
return \Tpl::view( 'site/title', [
|
||||
return \Shared\Tpl\Tpl::view( 'site/title', [
|
||||
'title' => $title,
|
||||
'page_title' => $page_title,
|
||||
'show_title' => $show_title
|
||||
@@ -441,7 +441,7 @@ class Site
|
||||
{
|
||||
\Shared\Helpers\Helpers::delete_session( 'alert' );
|
||||
|
||||
return $tpl = \Tpl::view( 'site/alert', [
|
||||
return $tpl = \Shared\Tpl\Tpl::view( 'site/alert', [
|
||||
'alert' => $alert
|
||||
] );
|
||||
}
|
||||
@@ -450,7 +450,7 @@ class Site
|
||||
{
|
||||
\Shared\Helpers\Helpers::delete_session( 'error' );
|
||||
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> error = $error;
|
||||
return $tpl -> render( 'site/error' );
|
||||
}
|
||||
@@ -458,19 +458,19 @@ class Site
|
||||
|
||||
public static function copyright()
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
return $tpl -> render( 'site/copyright' );
|
||||
}
|
||||
|
||||
public static function contact()
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
return $tpl -> render( 'site/contact' );
|
||||
}
|
||||
|
||||
public static function cookie_information()
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
return $tpl -> render( 'site/cookie-information' );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user