From 72b614ba9a4f0b51cefd680d38f440acdf9a81eb Mon Sep 17 00:00:00 2001 From: Hamid Abbaszadeh Date: Fri, 7 Jun 2019 19:06:15 +0430 Subject: [PATCH] add description and image to detail page --- src/dca/tl_module.php | 2 +- src/library/Frontend/Module/ModuleProduct.php | 10 +++++----- src/templates/product/product_full.html5 | 10 ++++------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/dca/tl_module.php b/src/dca/tl_module.php index bdc951d..50aec6b 100644 --- a/src/dca/tl_module.php +++ b/src/dca/tl_module.php @@ -16,7 +16,7 @@ */ $GLOBALS['TL_DCA']['tl_module']['palettes']['product_list'] = '{title_legend},name,headline,type;{catalog_legend},product_catalogs,product_categories,product_featured,product_detailModule,product_sortBy,numberOfItems,perPage,skipFirst;{template_legend},product_metaFields,customTpl;{product_legend},product_template,imgSize,product_list_Class,product_Class;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; -$GLOBALS['TL_DCA']['tl_module']['palettes']['product_detail'] = '{title_legend},name,headline,type;{catalog_legend},product_catalogs;{template_legend},product_metaFields,customTpl;{product_legend},product_template,imgSize;{related_legend},related_show,related_template,related_imgSize,product_list_Class,related_Class;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; +$GLOBALS['TL_DCA']['tl_module']['palettes']['product_detail'] = '{title_legend},name,headline,type;{catalog_legend},product_catalogs;{template_legend},product_metaFields,customTpl;{product_legend},product_template,imgSize,fullsize;{related_legend},related_show,related_template,related_imgSize,product_list_Class,related_Class;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; /** * Add fields to tl_module diff --git a/src/library/Frontend/Module/ModuleProduct.php b/src/library/Frontend/Module/ModuleProduct.php index 43da099..07e9932 100644 --- a/src/library/Frontend/Module/ModuleProduct.php +++ b/src/library/Frontend/Module/ModuleProduct.php @@ -165,11 +165,9 @@ public function parseProduct($objProduct, $blnAddCategory=false, $strClass='', $ $arrProduct['size'] = $this->imgSize; } } - - $arrProduct['singleSRC'] = $objModel->path; - - $this->addImageToTemplate($objTemplate, $arrProduct, null, null, $objModel); - + + $arrProduct['singleSRC'] = $objModel->path; + // Link to the product detail if no image link has been defined $picture = $objTemplate->picture; unset($picture['title']); @@ -178,6 +176,8 @@ public function parseProduct($objProduct, $blnAddCategory=false, $strClass='', $ $objTemplate->href = $objTemplate->link; $objTemplate->linkTitle = \StringUtil::specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['moreDetail'], $objProduct->title), true); + $this->addImageToTemplate($objTemplate, $arrProduct, null, null, $objModel); + } } diff --git a/src/templates/product/product_full.html5 b/src/templates/product/product_full.html5 index 711152a..65934f7 100644 --- a/src/templates/product/product_full.html5 +++ b/src/templates/product/product_full.html5 @@ -48,8 +48,7 @@
(rating_count; ?> meta_vote_txt; ?>) - - +
@@ -57,16 +56,15 @@
- summary; ?> + summary; ?>
addImage): ?> insert('image', $this->arrData); ?> - +
- text): ?> -
+
text; ?>