AntonLV 9 лет назад
Родитель
Сommit
25ee8514ca

+ 10 - 11
modules/boonex/english/data/langs/system/en.xml

@@ -408,10 +408,7 @@
 	<string name="_adm_act_err_failed_page_loading"><![CDATA[Cannot load the page]]></string>
 	<string name="_adm_action_cpt_checkout"><![CDATA[Checkout]]></string>
 	<string name="_adm_action_cpt_delete_all"><![CDATA[Delete All]]></string>
-	<string name="_adm_action_cpt_see_all_featured"><![CDATA[See All Featured]]></string>
-	<string name="_adm_action_cpt_see_all_translations"><![CDATA[See All Languages]]></string>
-	<string name="_adm_action_cpt_see_all_extensions"><![CDATA[See All Modules]]></string>
-	<string name="_adm_action_cpt_see_all_templates"><![CDATA[See All Templates]]></string>
+	<string name="_adm_action_cpt_see_all"><![CDATA[See All]]></string>
 	<string name="_adm_admtools_Audit"><![CDATA[Audit]]></string>
 	<string name="_adm_admtools_Current_level"><![CDATA[Current status]]></string>
 	<string name="_adm_admtools_Desired_level"><![CDATA[Desired status]]></string>
@@ -423,6 +420,8 @@
 	<string name="_adm_admtools_Permissions"><![CDATA[Permissions]]></string>
 	<string name="_adm_admtools_Writable"><![CDATA[Writable]]></string>
 	<string name="_adm_admtools_title"><![CDATA[Admin Tools]]></string>
+	<string name="_adm_block_cpt_categories"><![CDATA[Categories]]></string>
+	<string name="_adm_block_cpt_category"><![CDATA[Category: {0}]]></string>
 	<string name="_adm_block_cpt_checkout"><![CDATA[Checkout]]></string>
 	<string name="_adm_block_cpt_checkout_by_vendor_ccode"><![CDATA[Products from {0} ({1} {2})]]></string>
 	<string name="_adm_block_cpt_checkout_by_vendor_csign"><![CDATA[Products from {0} ({1}{2})]]></string>
@@ -430,17 +429,14 @@
 	<string name="_adm_block_cpt_downloaded_updates"><![CDATA[Updates]]></string>
 	<string name="_adm_block_cpt_featured"><![CDATA[Featured]]></string>
 	<string name="_adm_block_cpt_goodies"><![CDATA[Storefront]]></string>
-	<string name="_adm_block_cpt_translations"><![CDATA[Languages]]></string>
-	<string name="_adm_block_cpt_last_featured"><![CDATA[Latest Featured]]></string>
-	<string name="_adm_block_cpt_last_translations"><![CDATA[Latest Languages]]></string>
-	<string name="_adm_block_cpt_last_extensions"><![CDATA[Latest Modules]]></string>
-	<string name="_adm_block_cpt_last_templates"><![CDATA[Latest Templates]]></string>
-	<string name="_adm_block_cpt_extensions"><![CDATA[Modules]]></string>
+	<string name="_adm_block_cpt_latest"><![CDATA[Latest]]></string>
 	<string name="_adm_block_cpt_modules_upload"><![CDATA[Add New Module]]></string>
+	<string name="_adm_block_cpt_popular"><![CDATA[Popular]]></string>
 	<string name="_adm_block_cpt_purchases"><![CDATA[Purchases]]></string>
 	<string name="_adm_block_cpt_search"><![CDATA[Search]]></string>
 	<string name="_adm_block_cpt_space"><![CDATA[Space Usage]]></string>
-	<string name="_adm_block_cpt_templates"><![CDATA[Templates]]></string>
+	<string name="_adm_block_cpt_tag"><![CDATA[Tag: {0}]]></string>
+	<string name="_adm_block_cpt_tags"><![CDATA[Tags]]></string>
 	<string name="_adm_block_cpt_updates"><![CDATA[Updates]]></string>
 	<string name="_adm_block_cpt_versions"><![CDATA[Versions]]></string>
 	<string name="_adm_bp_btn_add_block"><![CDATA[Add Blocks]]></string>
@@ -898,6 +894,7 @@
 	<string name="_adm_ipbl_sample"><![CDATA[sample]]></string>
     <string name="_adm_lang_cnf_uninstall"><![CDATA[<h3>Uninstall "{0}" language?</h3><p>Uninstalling "{0}" language will also delete all of its data. Do you want to continue?</p>]]></string>
 	<string name="_adm_lmi_cpt_actions"><![CDATA[Actions]]></string>
+	<string name="_adm_lmi_cpt_categories"><![CDATA[Categories]]></string>
 	<string name="_adm_lmi_cpt_checkout"><![CDATA[Checkout {checkout_counter}]]></string>
 	<string name="_adm_lmi_cpt_cover"><![CDATA[Cover]]></string>
 	<string name="_adm_lmi_cpt_search"><![CDATA[Search]]></string>
@@ -919,11 +916,13 @@
 	<string name="_adm_lmi_cpt_images"><![CDATA[Images]]></string>
 	<string name="_adm_lmi_cpt_items"><![CDATA[Items]]></string>
 	<string name="_adm_lmi_cpt_keys"><![CDATA[Keys]]></string>
+	<string name="_adm_lmi_cpt_latest"><![CDATA[Latest]]></string>
 	<string name="_adm_lmi_cpt_levels"><![CDATA[Levels]]></string>
 	<string name="_adm_lmi_cpt_logo"><![CDATA[Logo]]></string>
 	<string name="_adm_lmi_cpt_menus"><![CDATA[Menus]]></string>
 	<string name="_adm_lmi_cpt_pre_lists"><![CDATA[Data Lists]]></string>
 	<string name="_adm_lmi_cpt_pre_values"><![CDATA[Data Items]]></string>
+	<string name="_adm_lmi_cpt_popular"><![CDATA[Popular]]></string>
 	<string name="_adm_lmi_cpt_purchases"><![CDATA[Purchases]]></string>
 	<string name="_adm_lmi_cpt_sets"><![CDATA[Sets]]></string>
 	<string name="_adm_lmi_cpt_settings"><![CDATA[Settings]]></string>

+ 10 - 11
modules/boonex/russian/data/langs/system/ru.xml

@@ -408,10 +408,7 @@
 	<string name="_adm_act_err_failed_page_loading"><![CDATA[Невозможно загрузить страницу]]></string>
 	<string name="_adm_action_cpt_checkout"><![CDATA[Оплата]]></string>
 	<string name="_adm_action_cpt_delete_all"><![CDATA[Удалить всё]]></string>
-	<string name="_adm_action_cpt_see_all_featured"><![CDATA[Смотреть всё избранное]]></string>
-	<string name="_adm_action_cpt_see_all_translations"><![CDATA[Смотреть все языки]]></string>
-	<string name="_adm_action_cpt_see_all_extensions"><![CDATA[Смотреть все модули]]></string>
-	<string name="_adm_action_cpt_see_all_templates"><![CDATA[Смотреть все темы]]></string>
+	<string name="_adm_action_cpt_see_all"><![CDATA[Смотреть все]]></string>
 	<string name="_adm_admtools_Audit"><![CDATA[Аудит]]></string>
 	<string name="_adm_admtools_Current_level"><![CDATA[Настоящий статус]]></string>
 	<string name="_adm_admtools_Desired_level"><![CDATA[Желательный статус]]></string>
@@ -423,6 +420,8 @@
 	<string name="_adm_admtools_Permissions"><![CDATA[Разрешения]]></string>
 	<string name="_adm_admtools_Writable"><![CDATA[Записываемый]]></string>
 	<string name="_adm_admtools_title"><![CDATA[Инструменты администратора]]></string>
+	<string name="_adm_block_cpt_categories"><![CDATA[Категории]]></string>
+	<string name="_adm_block_cpt_category"><![CDATA[Категория: {0}]]></string>
 	<string name="_adm_block_cpt_checkout"><![CDATA[Оплата]]></string>
 	<string name="_adm_block_cpt_checkout_by_vendor_ccode"><![CDATA[Товары от {0} ({1} {2})]]></string>
 	<string name="_adm_block_cpt_checkout_by_vendor_csign"><![CDATA[Товры от  {0} ({1}{2})]]></string>
@@ -430,17 +429,14 @@
 	<string name="_adm_block_cpt_downloaded_updates"><![CDATA[Обновления]]></string>
 	<string name="_adm_block_cpt_featured"><![CDATA[Избранные]]></string>
 	<string name="_adm_block_cpt_goodies"><![CDATA[Витрина]]></string>
-	<string name="_adm_block_cpt_languages"><![CDATA[Языки]]></string>
-	<string name="_adm_block_cpt_last_featured"><![CDATA[Последние избранные]]></string>
-	<string name="_adm_block_cpt_last_translations"><![CDATA[Последние языки]]></string>
-	<string name="_adm_block_cpt_last_extensions"><![CDATA[Последние модули]]></string>
-	<string name="_adm_block_cpt_last_templates"><![CDATA[Последние темы]]></string>
-	<string name="_adm_block_cpt_extensions"><![CDATA[Модули]]></string>
+	<string name="_adm_block_cpt_latest"><![CDATA[Новые]]></string>
 	<string name="_adm_block_cpt_modules_upload"><![CDATA[Добавить новый модуль]]></string>
+	<string name="_adm_block_cpt_popular"><![CDATA[Популярные]]></string>
 	<string name="_adm_block_cpt_purchases"><![CDATA[Покупки]]></string>
 	<string name="_adm_block_cpt_search"><![CDATA[Поиск]]></string>
 	<string name="_adm_block_cpt_space"><![CDATA[Использовано места]]></string>
-	<string name="_adm_block_cpt_templates"><![CDATA[Темы]]></string>
+	<string name="_adm_block_cpt_tag"><![CDATA[Таг: {0}]]></string>
+	<string name="_adm_block_cpt_tags"><![CDATA[Таги]]></string>
 	<string name="_adm_block_cpt_updates"><![CDATA[Обновления]]></string>
 	<string name="_adm_block_cpt_versions"><![CDATA[Версии]]></string>
 	<string name="_adm_bp_btn_add_block"><![CDATA[Добавить блоки]]></string>
@@ -896,6 +892,7 @@
 	<string name="_adm_ipbl_sample"><![CDATA[образец]]></string>
     <string name="_adm_lang_cnf_uninstall"><![CDATA[<h3>Удалить "{0}" язык?</h3><p>Удаление "{0}" языка также удалит все его данные. Вы хотите продолжить?</p>]]></string>
 	<string name="_adm_lmi_cpt_actions"><![CDATA[Действия]]></string>
+	<string name="_adm_lmi_cpt_categories"><![CDATA[Категории]]></string>
 	<string name="_adm_lmi_cpt_checkout"><![CDATA[Оплата {checkout_counter}]]></string>
 	<string name="_adm_lmi_cpt_cover"><![CDATA[Обложка]]></string>
 	<string name="_adm_lmi_cpt_search"><![CDATA[Поиск]]></string>
@@ -917,11 +914,13 @@
 	<string name="_adm_lmi_cpt_images"><![CDATA[Изображения]]></string>
 	<string name="_adm_lmi_cpt_items"><![CDATA[Элементы]]></string>
 	<string name="_adm_lmi_cpt_keys"><![CDATA[Ключи]]></string>
+	<string name="_adm_lmi_cpt_latest"><![CDATA[Новые]]></string>
 	<string name="_adm_lmi_cpt_levels"><![CDATA[Уровни]]></string>
 	<string name="_adm_lmi_cpt_logo"><![CDATA[Лого]]></string>
 	<string name="_adm_lmi_cpt_menus"><![CDATA[Меню]]></string>
 	<string name="_adm_lmi_cpt_pre_lists"><![CDATA[Списки данных]]></string>
 	<string name="_adm_lmi_cpt_pre_values"><![CDATA[Элементы данных]]></string>
+	<string name="_adm_lmi_cpt_popular"><![CDATA[Популярные]]></string>
 	<string name="_adm_lmi_cpt_purchases"><![CDATA[Покупки]]></string>
 	<string name="_adm_lmi_cpt_sets"><![CDATA[Наборы]]></string>
 	<string name="_adm_lmi_cpt_settings"><![CDATA[Настройки]]></string>

+ 44 - 23
studio/classes/BxDolStudioStore.php

@@ -15,6 +15,7 @@ class BxDolStudioStore extends BxTemplStudioPage
 {
     protected $sPage;
     protected $aContent;
+    protected $sBaseUrl;
 
     protected $iClient;
     protected $sClientKey; 
@@ -28,6 +29,8 @@ class BxDolStudioStore extends BxTemplStudioPage
 
         $this->oDb = new BxDolStudioStoreQuery();
 
+        $this->sBaseUrl = BX_DOL_URL_STUDIO . 'store.php';
+
         $this->sStoreDataUrlPublic = BxDolStudioInstallerUtils::getInstance()->getStoreDataUrl();
         $this->bAuthAccessUpdates = false;
 
@@ -188,57 +191,67 @@ class BxDolStudioStore extends BxTemplStudioPage
     {
         $iPerPage = 6;
         $aProducts = array();
-        $sJsObject = $this->getPageJsObject();
 
         $oJson = BxDolStudioJson::getInstance();
 
-        // Load featured
+        // Load Featured
         $aProducts[] = array(
-            'caption' => '_adm_block_cpt_last_featured',
+            'caption' => '_adm_block_cpt_featured',
             'actions' => array(
-                array('name' => 'featured', 'caption' => '_adm_action_cpt_see_all_featured', 'url' => 'javascript:void(0)', 'onclick' => $sJsObject . ".changePage('featured', this)")
+                array('name' => 'featured', 'caption' => '_adm_action_cpt_see_all', 'url' => $this->getBaseUrl('featured'))
             ),
             'items' => $oJson->load($this->sStoreDataUrlPublic . 'json_browse_featured', array('start' => 0, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey))
         );
 
-        // Load modules
-        $aProducts[] = array(
-            'caption' => '_adm_block_cpt_last_extensions',
-            'actions' => array(
-                array('name' => 'modules', 'caption' => '_adm_action_cpt_see_all_extensions', 'url' => 'javascript:void(0)', 'onclick' => $sJsObject . ".changePage('extensions', this)")
-            ),
-            'items' => $oJson->load($this->sStoreDataUrlPublic . 'json_browse_by_category', array('value' => 'extensions', 'start' => 0, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey))
-        );
-
-        // Load templates
+        // Load Latest
         $aProducts[] = array(
-            'caption' => '_adm_block_cpt_last_templates',
+            'caption' => '_adm_block_cpt_latest',
             'actions' => array(
-                array('name' => 'templates', 'caption' => '_adm_action_cpt_see_all_templates', 'url' => 'javascript:void(0)', 'onclick' => $sJsObject . ".changePage('templates', this)")
+                array('name' => 'latest', 'caption' => '_adm_action_cpt_see_all', 'url' => $this->getBaseUrl('latest'))
             ),
-            'items' => $oJson->load($this->sStoreDataUrlPublic . 'json_browse_by_category', array('value' => 'templates', 'start' => 0, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey))
+            'items' => $oJson->load($this->sStoreDataUrlPublic . 'json_browse_latest', array('start' => 0, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey))
         );
 
-        // Load languages
+        // Load Popular
         $aProducts[] = array(
-            'caption' => '_adm_block_cpt_last_translations',
+            'caption' => '_adm_block_cpt_popular',
             'actions' => array(
-                array('name' => 'languages', 'caption' => '_adm_action_cpt_see_all_translations', 'url' => 'javascript:void(0)', 'onclick' => $sJsObject . ".changePage('translations', this)")
+                array('name' => 'popular', 'caption' => '_adm_action_cpt_see_all', 'url' => $this->getBaseUrl('popular'))
             ),
-            'items' => $oJson->load($this->sStoreDataUrlPublic . 'json_browse_by_category', array('value' => 'translations', 'start' => 0, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey))
+            'items' => $oJson->load($this->sStoreDataUrlPublic . 'json_browse_popular', array('start' => 0, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey))
         );
 
         return $aProducts;
     }
 
+    protected function loadLatest($iStart, $iPerPage)
+    {
+        return BxDolStudioJson::getInstance()->load($this->sStoreDataUrlPublic . 'json_browse_latest', array('start' => $iStart, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey));
+    }
+
     protected function loadFeatured($iStart, $iPerPage)
     {
         return BxDolStudioJson::getInstance()->load($this->sStoreDataUrlPublic . 'json_browse_featured', array('start' => $iStart, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey));
     }
 
-	protected function loadCategory($sCategory, $iStart, $iPerPage)
+    protected function loadPopular($iStart, $iPerPage)
     {
-        return BxDolStudioJson::getInstance()->load($this->sStoreDataUrlPublic . 'json_browse_by_category', array('value' => $sCategory, 'start' => $iStart, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey));
+        return BxDolStudioJson::getInstance()->load($this->sStoreDataUrlPublic . 'json_browse_popular', array('start' => $iStart, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey));
+    }
+
+    protected function loadCategories()
+    {
+        return BxDolStudioJson::getInstance()->load($this->sStoreDataUrlPublic . 'json_browse_categories', array('client' => $this->iClient, 'key' => $this->sClientKey));
+    }
+
+	protected function loadCategory($iCategory, $iStart, $iPerPage)
+    {
+        return BxDolStudioJson::getInstance()->load($this->sStoreDataUrlPublic . 'json_browse_by_category', array('value' => $iCategory, 'start' => $iStart, 'per_page' => $iPerPage, 'client' => $this->iClient, 'key' => $this->sClientKey));
+    }
+
+    protected function loadTags()
+    {
+        return BxDolStudioJson::getInstance()->load($this->sStoreDataUrlPublic . 'json_browse_tags', array('client' => $this->iClient, 'key' => $this->sClientKey));
     }
 
     protected function loadTag($sTag, $iStart, $iPerPage)
@@ -320,6 +333,14 @@ class BxDolStudioStore extends BxTemplStudioPage
         return BxDolStudioInstallerUtils::getInstance()->downloadUpdatePublic($sModuleName, $bAutoUpdate);
     }
 
+    protected function getBaseUrl($mixedParams = array())
+    {
+        if(is_string($mixedParams))
+            $mixedParams = array('page' => $mixedParams);
+
+        return bx_append_url_params($this->sBaseUrl, $mixedParams);
+    } 
+
     private function checkoutCart($iVendor)
     {
         $oCart = BxDolStudioCart::getInstance();

+ 2 - 1
studio/js/store.js

@@ -394,7 +394,7 @@ BxDolStudioStore.prototype.changePage = function(sType) {
 	return true;
 };
 
-BxDolStudioStore.prototype.changePagePaginate = function(oButton, sType, iStart, iPerPage) {
+BxDolStudioStore.prototype.changePagePaginate = function(oButton, sType, mixedValue, iStart, iPerPage) {
 	var oDate = new Date();
 	var $this = this;
 
@@ -403,6 +403,7 @@ BxDolStudioStore.prototype.changePagePaginate = function(oButton, sType, iStart,
 		{
 			str_action: 'get-products-by-page',
 			str_type: sType,
+			str_value: mixedValue,
 			str_start: iStart,
 			str_per_page: iPerPage,
 			_t:oDate.getTime()

+ 0 - 35
studio/template/css/general.css

@@ -148,41 +148,6 @@ div.bx-menu-tab-active:hover a {
     text-decoration:none;
 }
 
-/**
- * Page Blocks
- */
-div.bx-std-block {}
-div.bx-std-block-caption {
-    position: relative;
-    margin: 0px 0px 10px 0px;
-    border-style: solid;
-    border-width: 0px 0px 1px 0px;
-}
-div.bx-std-bcap-text {
-    line-height: 25px;
-    color: #666666;
-}
-div.bx-std-bcap-actions {
-    position: absolute;
-    top: 0px;
-    right: 0px;
-}
-div.bx-std-bcap-action,
-div.bx-std-bcap-action-div {
-	position: relative;
-	float: left;
-    line-height: 25px;
-}
-div.bx-std-bcap-action-div:first-child {
-	display: none;
-}
-div.bx-std-block-panel-top {}
-div.bx-std-block-content {}
-div.bx-std-block-content div.bx-grid-header {
-	margin-top: 0px;
-}
-div.bx-std-block-panel-bottom {}
-
 /**
  * Footer
  */

+ 16 - 0
studio/template/css/page-media-desktop.css

@@ -0,0 +1,16 @@
+@media (min-width: 1024px) {
+	div.bx-std-blocks-line.bx-std-bl-2-per-line .bx-std-block-wrp {
+	    width: 49.9%;
+		margin-top: 0px;
+	}
+
+	div.bx-std-blocks-line.bx-std-bl-3-per-line .bx-std-block-wrp {
+	    width: 33.3%;
+		margin-top: 0px;
+	}
+
+	div.bx-std-blocks-line.bx-std-bl-4-per-line .bx-std-block-wrp {
+	    width: 24.9%;
+		margin-top: 0px;
+	}
+}

+ 8 - 0
studio/template/css/page-media-tablet.css

@@ -0,0 +1,8 @@
+@media (min-width:720px) and (max-width:1024px) {
+	div.bx-std-blocks-line.bx-std-bl-2-per-line .bx-std-block-wrp,
+	div.bx-std-blocks-line.bx-std-bl-3-per-line .bx-std-block-wrp,
+	div.bx-std-blocks-line.bx-std-bl-4-per-line .bx-std-block-wrp {
+	    width: 49.9%;
+		margin-top: 0px;
+	}
+}

+ 47 - 0
studio/template/css/page.css

@@ -0,0 +1,47 @@
+/**
+ * Inlined Blocks Styles
+ */
+div.bx-std-blocks-line {
+    position: relative;
+}
+div.bx-std-blocks-line .bx-std-block-wrp {
+    display: block;
+	float: left;
+	width: 100%;
+}
+
+
+/**
+ * Block Styles
+ */
+div.bx-std-block {}
+div.bx-std-block-caption {
+    position: relative;
+    margin: 0px 0px 10px 0px;
+    border-style: solid;
+    border-width: 0px 0px 1px 0px;
+}
+div.bx-std-bcap-text {
+    line-height: 25px;
+    color: #666666;
+}
+div.bx-std-bcap-actions {
+    position: absolute;
+    top: 0px;
+    right: 0px;
+}
+div.bx-std-bcap-action,
+div.bx-std-bcap-action-div {
+    position: relative;
+    float: left;
+    line-height: 25px;
+}
+div.bx-std-bcap-action-div:first-child {
+    display: none;
+}
+div.bx-std-block-panel-top {}
+div.bx-std-block-content {}
+div.bx-std-block-content div.bx-grid-header {
+    margin-top: 0px;
+}
+div.bx-std-block-panel-bottom {}

+ 69 - 24
studio/template/css/store.css

@@ -6,6 +6,35 @@ div.bx-std-block-panel-bottom .bx-menu-btns-hor .bx-btn u {
 	margin-left: 0px;
 }
 
+/*--- Categories ---*/
+.bx-std-categories {
+	position: relative;
+	width: 100%;
+}
+.bx-std-category {
+	display: inline-block;
+	width: 100%;
+
+    line-height: 24px;
+    line-height: 1.5rem;
+
+    white-space: nowrap;
+}
+
+/*--- Tags ---*/
+.bx-std-tags {
+	position: relative;
+    text-align: center;
+
+    text-overflow: ellipsis;
+    overflow: hidden;
+}
+
+.bx-std-tag {
+    line-height: 2rem;
+    margin: 0 0.25rem 0 0;
+}
+
 /*--- Product's Snippet style ---*/
 .bx-std-products {
     display: -webkit-box;
@@ -50,30 +79,6 @@ div.bx-std-block-panel-bottom .bx-menu-btns-hor .bx-btn u {
     overflow:hidden;
 }
 
-@media (min-width:533px) and (max-width:1024px) {
-	.bx-std-products .bx-std-product-gallery {
-        -webkit-flex: 0 0 49.8%;
-        -ms-flex: 0 0 49.8%;
-        flex: 0 0 49.8%;
-    }
-}
-
-@media (min-width:1024px) and (max-width:1280px) {
-	.bx-std-products .bx-std-product-gallery {
-        -webkit-flex: 0 0 33.25%;
-        -ms-flex: 0 0 33.25%;
-        flex: 0 0 33.25%;
-    }
-}
-
-@media (min-width:1280px) {
-    .bx-std-products .bx-std-product-gallery {
-        -webkit-flex: 0 0 24.9%;
-        -ms-flex: 0 0 24.9%;
-        flex: 0 0 24.9%;
-    }
-}
-
 .bx-std-product h2,
 .bx-std-product h1 {
     margin: 0;
@@ -336,4 +341,44 @@ div.bx-std-pvs-item {
 	line-height: 240px;
 	text-align: center;
 	overflow: hidden;
+}
+
+
+/*--- Mobile Optimization style ---*/
+@media (min-width:533px) and (max-width:720px) {
+    .bx-std-categories .bx-std-category {
+       width: 49.8%;
+    }
+}
+
+@media (min-width:533px) and (max-width:1024px) {
+    .bx-std-products .bx-std-product-gallery {
+        -webkit-flex: 0 0 49.8%;
+        -ms-flex: 0 0 49.8%;
+        flex: 0 0 49.8%;
+    }
+}
+
+@media (min-width:1024px) and (max-width:1280px) {
+    .bx-std-products .bx-std-product-gallery {
+        -webkit-flex: 0 0 33.25%;
+        -ms-flex: 0 0 33.25%;
+        flex: 0 0 33.25%;
+    }
+
+    .bx-std-categories .bx-std-category {
+       width: 49.8%;
+    }
+}
+
+@media (min-width:1280px) {
+    .bx-std-products .bx-std-product-gallery {
+        -webkit-flex: 0 0 24.9%;
+        -ms-flex: 0 0 24.9%;
+        flex: 0 0 24.9%;
+    }
+
+    .bx-std-categories .bx-std-category {
+       width: 33%;
+    }
 }

+ 9 - 0
studio/template/page_blocks_line.html

@@ -0,0 +1,9 @@
+<div class="bx-std-blocks-line bx-std-bl-__count__-per-line bx-def-margin-top-auto">
+    <div class="bx-std-blocks-line-cnt bx-def-margin-sec-leftright-neg bx-clearfix">
+	    <bx_repeat:blocks>
+	        <div class="bx-std-block-wrp bx-def-margin-top-auto">
+	            <div class="bx-std-block-cnt bx-def-padding-sec-leftright">__content__</div>
+	        </div>
+	    </bx_repeat:blocks>
+    </div>
+</div>

+ 22 - 7
studio/template/scripts/BxBaseStudioPage.php

@@ -61,7 +61,7 @@ class BxBaseStudioPage extends BxDolStudioPage
 
     public function getPageCss()
     {
-        $aCss = array('page.css', 'menu_top.css');
+        $aCss = array('page.css', 'page-media-tablet.css', 'page-media-desktop.css', 'menu_top.css');
         if((int)$this->aPage['index'] == 3)
             $aCss[] = 'page_columns.css';
 
@@ -230,6 +230,20 @@ class BxBaseStudioPage extends BxDolStudioPage
      * Block Methods
      *
      */
+    public function getBlocksLine($aBlocks)
+    {
+        $aTmplVarsBlocks = array();
+        foreach ($aBlocks as $aBlock) {
+            $aTmplVarsBlocks[] = array(
+                'content' => $this->getBlockCode($aBlock)
+            ); 
+        }
+
+    	return BxDolStudioTemplate::getInstance()->parseHtmlByName('page_blocks_line.html', array(
+    	    'count' => count($aTmplVarsBlocks),
+    		'bx_repeat:blocks' => $aTmplVarsBlocks
+    	));
+    }
     public function getBlockCode($aBlock)
     {
     	return BxDolStudioTemplate::getInstance()->parseHtmlByName('page_block.html', array(
@@ -248,24 +262,25 @@ class BxBaseStudioPage extends BxDolStudioPage
         $aTmplActions = array();
         if(!empty($aBlock['actions']) && is_array($aBlock['actions']))
             foreach($aBlock['actions'] as $aAction) {
-                $sCaption = _t($aAction['caption']);
+                $sCaption = is_array($aAction['caption']) ? call_user_func_array('_t', $aAction['caption']) : _t($aAction['caption']);
+
+                $bOnClick = !empty($aAction['onclick']);
+                $aOnClick = $bOnClick ? array('onclick' => $aAction['onclick']) : array();
 
                 $aTmplActions[] = array(
                     'name' => $aAction['name'],
                     'url' => $aAction['url'],
                     'title' => $sCaption,
                     'bx_if:show_onclick' => array(
-                        'condition' => $aAction['onclick'] != '',
-                        'content' => array(
-                            'onclick' => $aAction['onclick']
-                        )
+                        'condition' => $bOnClick,
+                        'content' => $aOnClick
                     ),
                     'caption' => $sCaption
                 );
             }
 
         return BxDolStudioTemplate::getInstance()->parseHtmlByName('block_caption.html', array(
-            'caption' => _t($aBlock['caption']),
+            'caption' => is_array($aBlock['caption']) ? call_user_func_array('_t', $aBlock['caption']) : _t($aBlock['caption']),
             'bx_if:show_actions' => array(
                 'condition' => !empty($aTmplActions),
                 'content' => array(

+ 138 - 57
studio/template/scripts/BxBaseStudioStore.php

@@ -41,7 +41,10 @@ class BxBaseStudioStore extends BxDolStudioStore
         $aMenu = array();
         $aMenuItems = array(
 	        'goodies' => array('icon' => 'home'),
+        	'latest' => array('icon' => 'th-large'),
 	        'featured' => array('icon' => 'thumbs-up'),
+        	'popular' => array('icon' => 'star'),
+        	'categories' => array('icon' => 'tag'),
         	'search' => array('icon' => 'search'),
 	        'purchases' => array('icon' => 'shopping-cart'), 
 	        'updates' => array('icon' => 'refresh'), 
@@ -52,7 +55,7 @@ class BxBaseStudioStore extends BxDolStudioStore
             $aMenu[] = array(
                 'name' => $sMenuItem,
                 'icon' => $aItem['icon'],
-                'link' => BX_DOL_URL_STUDIO . 'store.php?page=' . $sMenuItem,
+                'link' => $this->getBaseUrl($sMenuItem),
                 'title' => _t('_adm_lmi_cpt_' . $sMenuItem),
                 'selected' => $sMenuItem == $this->sPage
             );
@@ -100,6 +103,19 @@ class BxBaseStudioStore extends BxDolStudioStore
 	        $aProducts = $this->loadGoodies();
 
 	        $sContent = "";
+	        $sContent .= $this->getBlocksLine(array(
+                array(
+    	            'caption' => '_adm_block_cpt_categories',
+                	'actions' => array(),
+                    'items' => $this->getCategoriesList(false)
+                ),
+                array(
+    	            'caption' => '_adm_block_cpt_tags',
+                	'actions' => array(),
+                    'items' => $this->getTagsList(false)
+                )
+            ));        
+
 	        foreach($aProducts as $aBlock) {
 	            $aBlock['items'] = $oTemplate->parseHtmlByName('str_products.html', array(
 	                'list' => $this->displayProducts($aBlock['items']),
@@ -121,7 +137,22 @@ class BxBaseStudioStore extends BxDolStudioStore
         ));
     }
 
+    protected function getLatestList($bWrapInBlock = true)
+    {
+        return $this->getBrowsingList('latest', $bWrapInBlock);
+    }
+
     protected function getFeaturedList($bWrapInBlock = true)
+    {
+        return $this->getBrowsingList('featured', $bWrapInBlock);
+    }
+
+    protected function getPopularList($bWrapInBlock = true)
+    {
+        return $this->getBrowsingList('popular', $bWrapInBlock);
+    }
+
+    protected function getBrowsingList($sType, $bWrapInBlock = true)
     {
         $sJsObject = $this->getPageJsObject();
         $oTemplate = BxDolStudioTemplate::getInstance();
@@ -133,12 +164,12 @@ class BxBaseStudioStore extends BxDolStudioStore
 	        if(empty($iPerPage))
 	            $iPerPage = $this->iPerPageDefault;
 
-	        $aProducts = $this->loadFeatured($iStart, $iPerPage + 1);
+	        $aProducts = $this->{'load' . bx_gen_method_name($sType)}($iStart, $iPerPage + 1);
 
 	        $oPaginate = new BxTemplPaginate(array(
 	            'start' => $iStart,
 	            'per_page' => $iPerPage,
-	            'on_change_page' => $sJsObject . ".changePagePaginate(this, 'featured', {start}, {per_page})"
+	            'on_change_page' => $sJsObject . ".changePagePaginate(this, '" . $sType . "', null, {start}, {per_page})"
 	        ));
 	        $oPaginate->setNumFromDataArray($aProducts);
 
@@ -156,25 +187,106 @@ class BxBaseStudioStore extends BxDolStudioStore
         return $oTemplate->parseHtmlByName('store.html', array(
             'js_object' => $sJsObject,
             'content' => $this->getBlockCode(array(
-				'caption' => '_adm_block_cpt_featured',
+				'caption' => '_adm_block_cpt_' . $sType,
 				'items' => $sContent
 			))
         ));
     }
 
-    protected function getExtensionsList($bWrapInBlock = true)
+    protected function getCategoriesList($bWrapInBlock = true)
     {
-        return $this->getCategory('extensions', $bWrapInBlock);
+        return $this->getLabelsList('categories', $bWrapInBlock);
     }
 
-    protected function getTemplatesList($bWrapInBlock = true)
+    protected function getCategoryList($bWrapInBlock = true)
     {
-        return $this->getCategory('templates', $bWrapInBlock);
+        $sKey = 'value';
+        if(bx_get($sKey) === false)
+            $sKey = 'str_value';
+
+        $aValue = array();
+        $aValue['value'] = (int)bx_get($sKey);
+        if(bx_get('title') !== false)
+            $aValue['title'] = bx_process_input(urldecode(bx_get('title')));
+
+        return $this->getLabelList('category', $aValue, $bWrapInBlock);
+    }
+
+    protected function getTagsList($bWrapInBlock = true)
+    {
+        return $this->getLabelsList('tags', $bWrapInBlock);
+    }
+
+    protected function getTagList($bWrapInBlock = true)
+    {
+        $sKey = 'value';
+        if(bx_get($sKey) === false)
+            $sKey = 'str_value';
+
+        return $this->getLabelList('tag', bx_process_input(bx_get($sKey)), $bWrapInBlock);
+    }
+
+    protected function getLabelsList($sType, $bWrapInBlock = true)
+    {
+        $mixedResult = BxDolStudioInstallerUtils::getInstance()->getAccessObject(true)->doAuthorize();
+        if($mixedResult === true) {
+            $aLabels = $this->{'load' . bx_gen_method_name($sType)}();
+            $sContent = $this->{'display' . bx_gen_method_name($sType)}($aLabels);
+        }
+        else 
+            $sContent = $mixedResult;
+
+    	if(!$bWrapInBlock)
+			return $sContent;
+
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('store.html', array(
+            'js_object' => $this->getPageJsObject(),
+            'content' => $this->getBlockCode(array(
+				'caption' => '_adm_block_cpt_' . $sType,
+				'items' => $sContent
+			))
+        ));
     }
 
-    protected function getTranslationsList($bWrapInBlock = true)
+    protected function getLabelList($sType, $mixedValue, $bWrapInBlock = true)
     {
-        return $this->getCategory('translations', $bWrapInBlock);
+        $sJsObject = $this->getPageJsObject();
+        $oTemplate = BxDolStudioTemplate::getInstance();
+
+        $iStart = (int)bx_get('str_start');
+        $iPerPage = (int)bx_get('str_per_page');
+        if(empty($iPerPage))
+            $iPerPage = $this->iPerPageDefault;
+
+        $bArray = is_array($mixedValue);
+        $sValue = $bArray ? $mixedValue['value'] : $mixedValue;
+        $sTitle = $bArray && !empty($mixedValue['title']) ? $mixedValue['title'] : $sValue;
+
+		$sMethod = 'load' . bx_gen_method_name($sType);
+        $aProducts = $this->$sMethod($sValue, $iStart, $iPerPage + 1);
+
+        $oPaginate = new BxTemplPaginate(array(
+            'start' => $iStart,
+            'per_page' => $iPerPage,
+            'on_change_page' => $sJsObject . ".changePagePaginate(this, '" . $sType . "', '" . $sValue . "', {start}, {per_page})"
+        ));
+        $oPaginate->setNumFromDataArray($aProducts);
+
+        $sContent = $oTemplate->parseHtmlByName('str_products.html', array(
+            'list' => $this->displayProducts($aProducts),
+            'paginate' => $oPaginate->getSimplePaginate()
+        ));
+
+        if(!$bWrapInBlock)
+            return $sContent;
+
+        return $oTemplate->parseHtmlByName('store.html', array(
+            'js_object' => $sJsObject,
+            'content' => $this->getBlockCode(array(
+				'caption' => array('_adm_block_cpt_' . $sType, $sTitle),
+				'items' => $sContent,
+			))
+        ));
     }
 
     protected function getSearchList($bWrapInBlock = true)
@@ -271,53 +383,6 @@ class BxBaseStudioStore extends BxDolStudioStore
         ));
     }
 
-    protected function getTag($sLabel, $bWrapInBlock = true)
-    {
-    	return $this->getLabel('tag', $sLabel, $bWrapInBlock);
-    }
-
-	protected function getCategory($sLabel, $bWrapInBlock = true)
-    {
-    	return $this->getLabel('category', $sLabel, $bWrapInBlock);
-    }
-
-    protected function getLabel($sType, $sLabel, $bWrapInBlock = true)
-    {
-        $sJsObject = $this->getPageJsObject();
-        $oTemplate = BxDolStudioTemplate::getInstance();
-
-        $iStart = (int)bx_get('str_start');
-        $iPerPage = (int)bx_get('str_per_page');
-        if(empty($iPerPage))
-            $iPerPage = $this->iPerPageDefault;
-
-		$sMethod = 'load' . bx_gen_method_name($sType);
-        $aProducts = $this->$sMethod($sLabel, $iStart, $iPerPage + 1);
-
-        $oPaginate = new BxTemplPaginate(array(
-            'start' => $iStart,
-            'per_page' => $iPerPage,
-            'on_change_page' => $sJsObject . ".changePagePaginate(this, '" . $sLabel . "', {start}, {per_page})"
-        ));
-        $oPaginate->setNumFromDataArray($aProducts);
-
-        $sContent = $oTemplate->parseHtmlByName('str_products.html', array(
-            'list' => $this->displayProducts($aProducts),
-            'paginate' => $oPaginate->getSimplePaginate()
-        ));
-
-        if(!$bWrapInBlock)
-            return $sContent;
-
-        return $oTemplate->parseHtmlByName('store.html', array(
-            'js_object' => $sJsObject,
-            'content' => $this->getBlockCode(array(
-				'caption' => '_adm_block_cpt_' . $sLabel,
-				'items' => $sContent,
-			))
-        ));
-    }
-
     protected function getPurchasesList()
     {
     	$oTemplate = BxDolStudioTemplate::getInstance();
@@ -943,6 +1008,22 @@ class BxBaseStudioStore extends BxDolStudioStore
         return $sResult;
     }
 
+    protected function displayCategories($aCategories)
+    {
+        foreach($aCategories['bx_repeat:cats'] as $iKey => $aItem)
+            $aCategories['bx_repeat:cats'][$iKey]['url'] = $this->getBaseUrl(array('page' => 'category', 'value' => $aItem['value'], 'title' => urlencode($aItem['name'])));
+
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('str_lbl_categories.html', $aCategories);
+    }
+
+    protected function displayTags($aTags)
+    {
+        foreach($aTags['bx_repeat:units'] as $iKey => $aItem)
+            $aTags['bx_repeat:units'][$iKey]['href'] = $this->getBaseUrl(array('page' => 'tag', 'value' => $aItem['keyword']));
+
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('str_lbl_tags.html', $aTags);
+    }
+
     private function getDownloadedModules($bNamesOnly = true)
     {
 		$aModules = BxDolStudioInstallerUtils::getInstance()->getModules(false);

+ 3 - 0
studio/template/str_lbl_categories.html

@@ -0,0 +1,3 @@
+<div class="bx-std-categories">
+    <bx_repeat:cats><div class="bx-std-category bx-def-padding-sec-right bx-def-box-sizing"><a href="__url__">__name__</a> (__num__)</div></bx_repeat:cats>
+</div>

+ 5 - 0
studio/template/str_lbl_tags.html

@@ -0,0 +1,5 @@
+<div class="bx-std-tags">
+	<bx_repeat:units>
+	    <a class="bx-std-tag" href="__href__" style="font-size:__size__px;" title="<bx_text_attribute:_Count />: __count__">__keyword__</a>
+	</bx_repeat:units>
+</div>