Просмотр исходного кода

UNA Market like on Boonex site: Store.

AntonLV 10 лет назад
Родитель
Сommit
3f9a2f8d0a

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

@@ -1247,7 +1247,6 @@
     <string name="_adm_str_txt_per_month_short"><![CDATA[mo]]></string>
     <string name="_adm_str_txt_per_year"><![CDATA[year]]></string>
     <string name="_adm_str_txt_per_year_short"><![CDATA[yr]]></string>
-	<string name="_adm_str_txt_price_csign"><![CDATA[{0}{1}]]></string>
 	<string name="_adm_str_txt_price_free"><![CDATA[Free]]></string>
 	<string name="_adm_str_txt_price_recurring"><![CDATA[{0}{1}/{2}]]></string>
 	<string name="_adm_str_txt_price_single"><![CDATA[{0}{1}]]></string>
@@ -1257,6 +1256,7 @@
 	<string name="_adm_str_txt_pv_discount"><![CDATA[Discount]]></string>
 	<string name="_adm_str_txt_pv_discount_off_csign"><![CDATA[{0}% ({1}{2}) off for Premium]]></string>
 	<string name="_adm_str_txt_pv_price"><![CDATA[Price]]></string>
+	<string name="_adm_str_txt_pv_rent"><![CDATA[Rent]]></string>
 	<string name="_adm_str_txt_pv_stats"><![CDATA[Stats]]></string>
 	<string name="_adm_str_txt_pv_stats_votes"><![CDATA[{0} votes]]></string>
 	<string name="_adm_str_txt_pv_stats_reviews"><![CDATA[{0} reviews]]></string>

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

@@ -1247,7 +1247,6 @@
     <string name="_adm_str_txt_per_month_short"><![CDATA[мес]]></string>
     <string name="_adm_str_txt_per_year"><![CDATA[год]]></string>
     <string name="_adm_str_txt_per_year_short"><![CDATA[год]]></string>
-	<string name="_adm_str_txt_price_csign"><![CDATA[{0}{1}]]></string>
 	<string name="_adm_str_txt_price_free"><![CDATA[Бесплатно]]></string>
 	<string name="_adm_str_txt_price_recurring"><![CDATA[{0}{1}/{2}]]></string>
 	<string name="_adm_str_txt_price_single"><![CDATA[{0}{1}]]></string>
@@ -1257,6 +1256,7 @@
 	<string name="_adm_str_txt_pv_discount"><![CDATA[Скидка]]></string>
 	<string name="_adm_str_txt_pv_discount_off_csign"><![CDATA[{0}% ({1}{2}) скидка для Премиум]]></string>
 	<string name="_adm_str_txt_pv_price"><![CDATA[Цена]]></string>
+	<string name="_adm_str_txt_pv_rent"><![CDATA[Рента]]></string>
 	<string name="_adm_str_txt_pv_stats"><![CDATA[Статистика]]></string>
 	<string name="_adm_str_txt_pv_stats_votes"><![CDATA[{0} лайков]]></string>
 	<string name="_adm_str_txt_pv_stats_reviews"><![CDATA[{0} обзоров]]></string>

+ 3 - 65
studio/template/css/store.css

@@ -1,74 +1,12 @@
 /*--- General style ---*/
-div.bx-std-block div.bx-std-block-panel-bottom ul.bx-menu-btns-hor {
+div.bx-std-block-panel-bottom .bx-menu-btns-hor {
 	text-align: left;
 }
-
-/*--- OLD: Product's Snippet style ---*/
-div.bx-std-products {
-	position: relative;
-}
-div.bx-std-products div.bx-paginate div.bx-paginate-btns {
+div.bx-std-block-panel-bottom .bx-menu-btns-hor .bx-btn u {
 	margin-left: 0px;
 }
-div.bx-std-product {
-	position: relative;
-    float: left;
-	width: 100%;
-}
-div.bx-std-product-cnt {
-	position: relative;
-}
-div.bx-stdp-icon {
-	position: absolute;
-	top: 0px;
-	left: 0px;
-	overflow: hidden;
-	line-height: 8rem;
-}
-div.bx-stdp-icon i.sys-icon {
-	position: absolute;
-	z-index: 2;
-	left: 0px;
-	width: 128px;
-
-    font-size: 96px;
-    text-align: center;
-    text-shadow: none;
-    color: white;
-}
-div.bx-stdp-content {
-	overflow: hidden;
-}
-div.bx-std-pc-title {
-	white-space: nowrap;	
-}
-div.bx-std-pc-vendor,
-div.bx-std-pc-count {
-	white-space: nowrap;
-}
-span.bx-std-pc-price,
-span.bx-std-pc-version,
-span.bx-std-pc-versions {
-	font-weight: bold;
-}
-div.bx-std-pc-action div.bx-std-pc-buttons {
-	margin-top: -2px;
-	margin-top: -0.125rem;
-	margin-bottom: -2px;
-	margin-bottom: -0.125rem;
-}
-div.bx-std-pc-action div.bx-std-pc-buttons .bx-btn {
-	margin-top: 2px;
-	margin-top: 0.125rem;
-	margin-bottom: 2px;
-	margin-bottom: 0.125rem;
-}
-div.bx-std-pc-action div.bx-std-pc-buttons .bx-btn:first-child {
-	margin-left: 5px;
-	margin-left: 0.625rem;
-}
 
-/*--- NEW: Product's Snippet style ---*/
+/*--- Product's Snippet style ---*/
 .bx-std-products {
     display: -webkit-box;
     display: -webkit-flex;

+ 22 - 12
studio/template/scripts/BxBaseStudioStore.php

@@ -111,7 +111,7 @@ class BxBaseStudioStore extends BxDolStudioStore
         else 
         	$sContent = $this->getBlockCode(array(
                 'caption' => '_adm_block_cpt_goodies',
-                'items' => $mixedResult,
+                'items' => MsgBox($mixedResult),
             ));
 
         return $oTemplate->parseHtmlByName('store.html', array(
@@ -147,7 +147,7 @@ class BxBaseStudioStore extends BxDolStudioStore
 	        ));
         }
         else 
-        	$sContent = $mixedResult;
+        	$sContent = MsgBox($mixedResult);
 
 		if(!$bWrapInBlock)
 			return $sContent;
@@ -298,7 +298,7 @@ class BxBaseStudioStore extends BxDolStudioStore
                 array('id' => 'checkout-' . $iVendor, 'name' => 'checkout-' . $iVendor, 'link' => 'javascript:void(0)', 'onclick' => $sJsObject . ".checkoutCart(" . $iVendor . ", this);", 'target' => '_self', 'title' => '_adm_action_cpt_checkout', 'active' => 1),
                 array('id' => 'delete-all-' . $iVendor, 'name' => 'delete-all-' . $iVendor, 'link' => 'javascript:void(0)', 'onclick' => $sJsObject . ".deleteAllFromCart(" . $iVendor . ", this)", 'target' => '_self', 'title' => '_adm_action_cpt_delete_all', 'active' => 1)
             );
-	        $oMenu = new BxTemplMenu(array('template' => 'menu_buttons_hor.html', 'menu_id'=> 'timeline-view-all', 'menu_items' => $aMenu));
+	        $oMenu = new BxTemplMenu(array('object'=> 'adm-std-checkout', 'template' => 'menu_buttons_hor.html', 'menu_items' => $aMenu));
 
 	        $sContent .= $this->getBlockCode(array(
                 'caption' => _t('_adm_block_cpt_checkout_by_vendor_csign', $sVendor, $sCurrency, $fTotal),
@@ -479,13 +479,24 @@ class BxBaseStudioStore extends BxDolStudioStore
             'author_name' => $aProduct['author_name'],
             'author_url' => $aProduct['author_url'],
             'version' => $sVersion,
-            'price_single' => !$bFree ? _t('_adm_str_txt_price_csign', $aProduct['author_currency_sign'], $aProduct['price_single']) : _t('_adm_str_txt_price_free'),
-            'bx_if:show_discount' => array(
-                'condition' => !$bFree && $bDiscount,
-                'content' => array(
-                    'discount_single' => $bDiscount ? _t('_adm_str_txt_pv_discount_off_csign', $aProduct['discount_single']['percent'], $aProduct['author_currency_sign'], $aProduct['discount_single']['save']) : ''
-                )
-            ),
+        	'bx_if:show_price_single' => array(
+        		'condition' => $bFree || (float)$aProduct['price_single'] != 0,
+        		'content' => array(
+        			'price_single' => !$bFree ? _t('_adm_str_txt_price_single', $aProduct['author_currency_sign'], $aProduct['price_single']) : _t('_adm_str_txt_price_free'),
+		        	'bx_if:show_discount' => array(
+		                'condition' => !$bFree && $bDiscount,
+		                'content' => array(
+		                    'discount_single' => $bDiscount ? _t('_adm_str_txt_pv_discount_off_csign', $aProduct['discount_single']['percent'], $aProduct['author_currency_sign'], $aProduct['discount_single']['save']) : ''
+		                )
+		            )
+        		)
+        	),
+        	'bx_if:show_price_recurring' => array(
+				'condition' => (float)$aProduct['price_recurring'] != 0,
+        		'content' => array(
+					'price_recurring' => _t('_adm_str_txt_price_recurring', $aProduct['author_currency_sign'], $aProduct['price_recurring'], _t('_adm_str_txt_per_' . $aProduct['duration_recurring']))
+        		)
+        	),
             'category' => $aProduct['category'],
             'category_url' => $aProduct['category_url'],
             'tags' => implode(', ', explode(',', $aProduct['tags'])),
@@ -606,7 +617,7 @@ class BxBaseStudioStore extends BxDolStudioStore
             $bDownload = !$bShoppingCart && ($bFree || $bPurchased) && $bDownloadable;
             $bQueued = $this->oDb->isQueued('download', $aItem['name']);
 
-            $sPrice = !$bFree ? _t('_adm_str_txt_price_csign', $aItem['author_currency_sign'], $aItem['price_single']) : _t('_adm_str_txt_price_free');
+            $sPrice = !$bFree ? _t('_adm_str_txt_price_single', $aItem['author_currency_sign'], $aItem['price_single']) : _t('_adm_str_txt_price_free');
             $sDiscount = !$bFree && !empty($aItem['discount_single']) ? _t('_adm_str_txt_discount_csign', $aItem['author_currency_sign'], $aItem['discount_single']['price']) : '';
 
             $sImage = !empty($aItem['thumbnail']['big']) ? $aItem['thumbnail']['big'] : BxDolStudioUtils::getIconDefault(BX_DOL_MODULE_TYPE_MODULE);
@@ -671,7 +682,6 @@ class BxBaseStudioStore extends BxDolStudioStore
                 		)
                     )
                 ),
-                //TODO: Continue from here.
                 'bx_if:show_purchase_recurring' => array(
                 	'condition' => $bPurchaseRecurring,
                 	'content' => array(

+ 19 - 9
studio/template/str_product_view.html

@@ -34,24 +34,34 @@
 			<bx_text:_adm_str_txt_pv_version />:
 		</span> __version__
 	</div>
-	<div class="bx-std-pv-line">
-		<span class="bx-std-pv-cpt bx-def-font-grayed">
-			<bx_text:_adm_str_txt_pv_price />:
-		</span> __price_single__ 
-	</div>
-	<bx_if:show_discount>
+	<bx_if:show_price_single>
+		<div class="bx-std-pv-line">
+			<span class="bx-std-pv-cpt bx-def-font-grayed">
+				<bx_text:_adm_str_txt_pv_price />:
+			</span> __price_single__ 
+		</div>
+		<bx_if:show_discount>
+			<div class="bx-std-pv-line">
+				<span class="bx-std-pv-cpt bx-def-font-grayed">
+					<bx_text:_adm_str_txt_pv_discount />:
+				</span> __discount_single__
+			</div>
+		</bx_if:show_discount>
+	</bx_if:show_price_single>
+	<bx_if:show_price_recurring>
 		<div class="bx-std-pv-line">
 			<span class="bx-std-pv-cpt bx-def-font-grayed">
-				<bx_text:_adm_str_txt_pv_discount />:
-			</span> __discount_single__
+				<bx_text:_adm_str_txt_pv_rent />:
+			</span> __price_recurring__ 
 		</div>
-	</bx_if:show_discount>
+	</bx_if:show_price_recurring>
 	<div class="bx-std-pv-line">
 		<span class="bx-std-pv-cpt bx-def-font-grayed">
 			<bx_text:_adm_str_txt_pv_category />:
 		</span> <a href="__category_url__">__category__</a>
 	</div>
 	<!--
+	//TODO: There is no tags in current version.
 	<div class="bx-std-pv-line">
 		<span class="bx-std-pv-cpt bx-def-font-grayed">
 			<bx_text:_adm_str_txt_pv_tags />: