From b2a363e4d9d36e25d266c22dbe375366f13f94ca Mon Sep 17 00:00:00 2001 From: gerchek Date: Thu, 14 Mar 2024 13:57:46 +0500 Subject: [PATCH] locale update --- themes/berkarar/pages/home.htm | 8 ++--- themes/berkarar/pages/shop.htm | 9 +++-- themes/berkarar/partials/site/header.htm | 46 ++++++++++++++++++++++-- 3 files changed, 54 insertions(+), 9 deletions(-) diff --git a/themes/berkarar/pages/home.htm b/themes/berkarar/pages/home.htm index 43ccc48..a58bdbb 100644 --- a/themes/berkarar/pages/home.htm +++ b/themes/berkarar/pages/home.htm @@ -11,10 +11,10 @@ function onStart(){ $this['movies'] = Tps\Movies\Models\Movie::orderBy('created_at')->limit(15)->get(); $this['sales'] = Tps\Shops\Models\Sale::all(); - $this['sales_all'] = $this['sales']->slice(0, 9); - $this['sales_news'] = $this['sales']->where("type", "news")->slice(0, 9); - $this['sales_promo'] = $this['sales']->where("type", "promo")->slice(0, 9); - $this['sales_discount'] = $this['sales']->where("type", "discount")->slice(0, 9); + $this['sales_all'] = $this['sales']->slice(0, 6); + $this['sales_news'] = $this['sales']->where("type", "news")->slice(0, 6); + $this['sales_promo'] = $this['sales']->where("type", "promo")->slice(0, 6); + $this['sales_discount'] = $this['sales']->where("type", "discount")->slice(0, 6); $this['shop_categories'] = Tps\Shops\Models\Category::where("top_category_id", $this->theme->main_shops)->orderBy('sort_order')->limit(3)->get(); $this['shop_category_ids'] = $this['shop_categories']->lists('id'); diff --git a/themes/berkarar/pages/shop.htm b/themes/berkarar/pages/shop.htm index eb560e0..71b417c 100644 --- a/themes/berkarar/pages/shop.htm +++ b/themes/berkarar/pages/shop.htm @@ -47,12 +47,14 @@ function onStart(){

- + + {{shop.category.top_category.name}}

- + + {{shop.category.name}}

@@ -156,7 +158,8 @@ function onStart(){
- + + Посмотреть все activeLocale .'.png'; + + $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http"; + $host = $_SERVER['HTTP_HOST']; + $uri = $_SERVER['REQUEST_URI']; + + $url = $protocol . "://" . $host . $uri; + + $path = parse_url($url, PHP_URL_PATH); + + $segmentsToRemove = array("tk", "en", "ru"); + foreach ($segmentsToRemove as $segment) { + $path = str_replace("/$segment/", "/", $path); + } + + $this["pageLink"] = $path; + + //dd($this["pageLink"]); + + + } ?> == @@ -42,7 +62,7 @@ function onStart(){ -
- + \ No newline at end of file