From 733acdac033a71bda6fbc283de7ee55329e87216 Mon Sep 17 00:00:00 2001 From: gerchek Date: Sat, 16 Mar 2024 12:54:37 +0500 Subject: [PATCH] locale update --- themes/berkarar/pages/home.htm | 1 + themes/berkarar/partials/home/shops.htm | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/themes/berkarar/pages/home.htm b/themes/berkarar/pages/home.htm index a58bdbb..54d1547 100644 --- a/themes/berkarar/pages/home.htm +++ b/themes/berkarar/pages/home.htm @@ -17,6 +17,7 @@ function onStart(){ $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(); + dd($this['shop_categories']); $this['shop_category_ids'] = $this['shop_categories']->lists('id'); $this['shop_all'] = Tps\Shops\Models\Shop::whereIn('category_id', $this['shop_category_ids'])->limit(6)->get(); } diff --git a/themes/berkarar/partials/home/shops.htm b/themes/berkarar/partials/home/shops.htm index a53698f..bd6ce6d 100644 --- a/themes/berkarar/partials/home/shops.htm +++ b/themes/berkarar/partials/home/shops.htm @@ -1,4 +1,3 @@ -==
@@ -16,15 +15,22 @@
- {% partial 'home/shop_item' shops=shops %} + + {% partial 'home/shop_item' shops=shop_all %} +
+ + {% for category in shop_categories %}
- {% partial 'home/shop_item' shops=shops %} + + {% partial 'home/shop_item' shops=category.getShops() %} +
{% endfor %} +