From 3e5bbb4fb9af531314a26227a683adaa5197d4a2 Mon Sep 17 00:00:00 2001 From: Hamid Abbaszadeh Date: Fri, 7 Jun 2019 11:30:35 +0430 Subject: [PATCH] add vote --- src/languages/en/default.php | 1 + src/languages/fa/default.php | 3 + src/library/Frontend/Module/ModuleProduct.php | 2 + src/templates/product/product_full.html5 | 93 +++++++++---------- 4 files changed, 51 insertions(+), 48 deletions(-) diff --git a/src/languages/en/default.php b/src/languages/en/default.php index 5c529b5..5a4e3af 100644 --- a/src/languages/en/default.php +++ b/src/languages/en/default.php @@ -55,5 +55,6 @@ $GLOBALS['TL_LANG']['MSC']['brand_text'] = 'Brand'; $GLOBALS['TL_LANG']['MSC']['sku_text'] = 'SKU'; $GLOBALS['TL_LANG']['MSC']['status_text'] = 'Status'; +$GLOBALS['TL_LANG']['MSC']['vote_text'] = 'vote'; $GLOBALS['TL_LANG']['MSC']['relateds_headline'] = 'Related products'; diff --git a/src/languages/fa/default.php b/src/languages/fa/default.php index d04c1ef..a4ca4e9 100644 --- a/src/languages/fa/default.php +++ b/src/languages/fa/default.php @@ -41,3 +41,6 @@ $GLOBALS['TL_LANG']['MSC']['PreSale'] = 'پیش فروش'; $GLOBALS['TL_LANG']['MSC']['SoldOut'] = 'تمام'; +$GLOBALS['TL_LANG']['MSC']['vote_text'] = 'رای'; + + diff --git a/src/library/Frontend/Module/ModuleProduct.php b/src/library/Frontend/Module/ModuleProduct.php index 3c89803..43da099 100644 --- a/src/library/Frontend/Module/ModuleProduct.php +++ b/src/library/Frontend/Module/ModuleProduct.php @@ -125,6 +125,8 @@ public function parseProduct($objProduct, $blnAddCategory=false, $strClass='', $ $objTemplate->meta_sku_txt = $GLOBALS['TL_LANG']['MSC']['sku_text']; $objTemplate->meta_status_txt = $GLOBALS['TL_LANG']['MSC']['status_text']; + $objTemplate->meta_vote_txt = $GLOBALS['TL_LANG']['MSC']['vote_text']; + $objTemplate->hasMetaFields = !empty($arrMeta); $objTemplate->timestamp = $objProduct->date; $objTemplate->datetime = date('Y-m-d\TH:i:sP', $objProduct->date); diff --git a/src/templates/product/product_full.html5 b/src/templates/product/product_full.html5 index c454351..cd19f75 100644 --- a/src/templates/product/product_full.html5 +++ b/src/templates/product/product_full.html5 @@ -6,62 +6,59 @@ hasMetaFields): ?>
-
+
- - meta_brand): ?> - meta_brand_txt; ?>: meta_brand; ?> - - meta_model): ?> - meta_model_txt; ?>: meta_model; ?> - - meta_sku): ?> - meta_sku_txt; ?>: meta_sku; ?> - - meta_global_ID): ?> - meta_global_ID_txt; ?>: meta_global_ID[value]; ?> - -
+ + meta_brand): ?> + meta_brand_txt; ?>: meta_brand; ?> + + meta_model): ?> + meta_model_txt; ?>: meta_model; ?> + + meta_sku): ?> + meta_sku_txt; ?>: meta_sku; ?> + + meta_global_ID): ?> + meta_global_ID_txt; ?>: meta_global_ID[value]; ?> + +
-
- meta_price): ?> - meta_price_txt; ?>: - meta_price[value]); ?> - meta_price[symbol]; ?> - - meta_availability): ?> - (meta_availability_txt; ?>) - - meta_buy): ?> - - - - -
+
+ meta_price): ?> + meta_price_txt; ?>: + meta_price[value]); ?> + meta_price[symbol]; ?> + + meta_availability): ?> + (meta_availability_txt; ?>) + + meta_buy): ?> + + + + +
-
- - - -
+
+ + (rating_count; ?> meta_vote_txt; ?>) + + +
- url): ?> - - - text): ?> -
- text; ?> -
+
+ text; ?> +
enclosure): ?>