Add testimonials to product details
This commit is contained in:
@@ -140,6 +140,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
||||
*/
|
||||
protected $ratingVotesCount = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $testimonials = '';
|
||||
|
||||
/**
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
|
||||
*/
|
||||
@@ -595,6 +600,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
||||
$this->ratingVotesCount = $ratingVotesCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTestimonials()
|
||||
{
|
||||
return $this->testimonials;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $testimonials
|
||||
*/
|
||||
public function setTestimonials($testimonials)
|
||||
{
|
||||
$this->testimonials = $testimonials;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference $images>
|
||||
*/
|
||||
|
||||
+18
-5
@@ -30,18 +30,18 @@ return [
|
||||
concept_description, board_description, additional_services, programme_description, ski_pass_description,
|
||||
rating_average, rating_votes_count, teaser_images, header_images, images, concept, country, region, city,
|
||||
journey, facts, officetip, hotels, calendar_hotel, faqs,header_title,header_subtitle, alt_product, alt_label,
|
||||
video, banner, additional_regions, badge, daytrip',
|
||||
video, banner, additional_regions, badge, daytrip, testimonials',
|
||||
],
|
||||
'types' => [
|
||||
'1' => [
|
||||
'showitem' => '--palette--;;top, name_internal, --palette--;;name, --palette--;;header,
|
||||
--palette--;;destinations, --palette--;;rating, keywords, feature,
|
||||
--palette--;Alternative;alternative,
|
||||
--palette--;;destinations, keywords, feature, --palette--;Alternative;alternative,
|
||||
--div--;Texte, teaser, teaser_long, concept_description, board_description, additional_services,
|
||||
programme_description, ski_pass_description,
|
||||
programme_description, ski_pass_description,
|
||||
--div--;Verknüpfungen, journey, --palette--;;concept, hotels, facts, faqs, officetip,
|
||||
additional_regions, badge,
|
||||
--div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images, banner, video',
|
||||
--div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images, banner, video,
|
||||
--div--;Bewertung, --palette--;;rating, testimonials',
|
||||
'columnsOverrides' => [
|
||||
'teaser' => [
|
||||
'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]',
|
||||
@@ -64,6 +64,9 @@ return [
|
||||
'ski_pass_description' => [
|
||||
'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]',
|
||||
],
|
||||
'testimonials' => [
|
||||
'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
@@ -384,6 +387,16 @@ return [
|
||||
'eval' => 'int'
|
||||
],
|
||||
],
|
||||
'testimonials' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product.testimonials',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 5,
|
||||
'eval' => 'trim',
|
||||
],
|
||||
],
|
||||
'teaser_images' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product.teaser_images',
|
||||
|
||||
@@ -75,6 +75,9 @@
|
||||
<trans-unit id="tx_epproducts_domain_model_product.rating_votes_count">
|
||||
<source>Abgebene Stimmen</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_epproducts_domain_model_product.testimonials">
|
||||
<source>Testimonials</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_epproducts_domain_model_product.teaser_images">
|
||||
<source>Teaserbild(er)</source>
|
||||
</trans-unit>
|
||||
|
||||
@@ -31,6 +31,7 @@ CREATE TABLE tx_epproducts_domain_model_product (
|
||||
ski_pass_description text NOT NULL,
|
||||
rating_average varchar(255) DEFAULT '' NOT NULL,
|
||||
rating_votes_count int(11) unsigned NOT NULL default '0',
|
||||
testimonials text NOT NULL,
|
||||
teaser_images int(11) unsigned NOT NULL default '0',
|
||||
header_images int(11) unsigned NOT NULL default '0',
|
||||
images int(11) unsigned NOT NULL default '0',
|
||||
|
||||
@@ -7,3 +7,9 @@
|
||||
</div>
|
||||
</a>
|
||||
</f:if>
|
||||
<f:if condition="{product.testimonials}">
|
||||
<div class="ep-sidebar ep-rating">
|
||||
<p><strong>Kundenstimmen</strong></p>
|
||||
{product.testimonials -> f:format.html()}
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
Reference in New Issue
Block a user