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;
|
protected $ratingVotesCount = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $testimonials = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
|
* @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;
|
$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>
|
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference $images>
|
||||||
*/
|
*/
|
||||||
|
|||||||
+17
-4
@@ -30,18 +30,18 @@ return [
|
|||||||
concept_description, board_description, additional_services, programme_description, ski_pass_description,
|
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,
|
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,
|
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' => [
|
'types' => [
|
||||||
'1' => [
|
'1' => [
|
||||||
'showitem' => '--palette--;;top, name_internal, --palette--;;name, --palette--;;header,
|
'showitem' => '--palette--;;top, name_internal, --palette--;;name, --palette--;;header,
|
||||||
--palette--;;destinations, --palette--;;rating, keywords, feature,
|
--palette--;;destinations, keywords, feature, --palette--;Alternative;alternative,
|
||||||
--palette--;Alternative;alternative,
|
|
||||||
--div--;Texte, teaser, teaser_long, concept_description, board_description, additional_services,
|
--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,
|
--div--;Verknüpfungen, journey, --palette--;;concept, hotels, facts, faqs, officetip,
|
||||||
additional_regions, badge,
|
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' => [
|
'columnsOverrides' => [
|
||||||
'teaser' => [
|
'teaser' => [
|
||||||
'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]',
|
'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]',
|
||||||
@@ -64,6 +64,9 @@ return [
|
|||||||
'ski_pass_description' => [
|
'ski_pass_description' => [
|
||||||
'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]',
|
'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]',
|
||||||
],
|
],
|
||||||
|
'testimonials' => [
|
||||||
|
'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -384,6 +387,16 @@ return [
|
|||||||
'eval' => 'int'
|
'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' => [
|
'teaser_images' => [
|
||||||
'exclude' => 0,
|
'exclude' => 0,
|
||||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product.teaser_images',
|
'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">
|
<trans-unit id="tx_epproducts_domain_model_product.rating_votes_count">
|
||||||
<source>Abgebene Stimmen</source>
|
<source>Abgebene Stimmen</source>
|
||||||
</trans-unit>
|
</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">
|
<trans-unit id="tx_epproducts_domain_model_product.teaser_images">
|
||||||
<source>Teaserbild(er)</source>
|
<source>Teaserbild(er)</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ CREATE TABLE tx_epproducts_domain_model_product (
|
|||||||
ski_pass_description text NOT NULL,
|
ski_pass_description text NOT NULL,
|
||||||
rating_average varchar(255) DEFAULT '' NOT NULL,
|
rating_average varchar(255) DEFAULT '' NOT NULL,
|
||||||
rating_votes_count int(11) unsigned NOT NULL default '0',
|
rating_votes_count int(11) unsigned NOT NULL default '0',
|
||||||
|
testimonials text NOT NULL,
|
||||||
teaser_images int(11) unsigned NOT NULL default '0',
|
teaser_images int(11) unsigned NOT NULL default '0',
|
||||||
header_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',
|
images int(11) unsigned NOT NULL default '0',
|
||||||
|
|||||||
@@ -7,3 +7,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</f:if>
|
</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