Adjust catalog image dimensions, add external product url for catalog

This commit is contained in:
Björn Fromme
2019-01-16 21:17:37 +01:00
parent 67c8d7d4f4
commit 084e2aa13b
6 changed files with 58 additions and 5 deletions
+16
View File
@@ -50,5 +50,21 @@ task('assets', [
'upload:eptheme', 'upload:eptheme',
]); ]);
task('caches:flush', function () {
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms cache:flush');
});
task('languages:update', function () {
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms language:update');
});
task('database:update', function () {
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms database:updateschema');
});
before('deploy:symlink', 'assets'); before('deploy:symlink', 'assets');
before('deploy:symlink', 'database:update');
before('cleanup', 'caches:flush');
before('cleanup', 'languages:update');
after('deploy:failed', 'deploy:unlock'); after('deploy:failed', 'deploy:unlock');
@@ -119,7 +119,7 @@ class ResellerController extends ActionController
*/ */
public function csvAction(Reseller $reseller) public function csvAction(Reseller $reseller)
{ {
$data = $this->resellerDataService->preprocessAll($reseller, [ 'width' => '1200', 'maxHeight' => '630', 'cropVariant' => 'facebook' ]); $data = $this->resellerDataService->preprocessAll($reseller, [ 'width' => '1080', 'maxHeight' => '1080', 'cropVariant' => 'facebook' ]);
$filename = 'export_' . $reseller->getCode() . '_' . date('Y-m-d') . '.csv'; $filename = 'export_' . $reseller->getCode() . '_' . date('Y-m-d') . '.csv';
@@ -60,6 +60,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
*/ */
protected $detailPage; protected $detailPage;
/**
* @var string
*/
protected $externalLink = '';
/** /**
* @var string * @var string
*/ */
@@ -367,6 +372,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
$this->detailPage = $detailPage; $this->detailPage = $detailPage;
} }
/**
* @return string
*/
public function getExternalLink()
{
return $this->externalLink;
}
/**
* @param string $externalLink
*/
public function setExternalLink($externalLink)
{
$this->externalLink = $externalLink;
}
/** /**
* @return string $name * @return string $name
*/ */
@@ -73,7 +73,9 @@ class Product
$product['description'] = SerializationUtility::sanitizeText($entity->getConceptDescription()); $product['description'] = SerializationUtility::sanitizeText($entity->getConceptDescription());
$product['images']['image'] = SerializationUtility::preprocessImages($entity->getResellerImages(), $imageProcessingInstructions); $product['images']['image'] = SerializationUtility::preprocessImages($entity->getResellerImages(), $imageProcessingInstructions);
$product['video'] = $entity->getVideo(); $product['video'] = $entity->getVideo();
$product['link'] = SerializationUtility::generateLink($entity->getDetailPage());
$link = $entity->getExternalLink() ?: $entity->getDetailPage();
$product['link'] = SerializationUtility::generateLink($link);
$product['region'] = Region::fromEntity($entity->getRegion()); $product['region'] = Region::fromEntity($entity->getRegion());
$product['city'] = City::fromEntity($entity->getCity()); $product['city'] = City::fromEntity($entity->getCity());
@@ -28,7 +28,7 @@ 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, testimonials', video, banner, additional_regions, badge, daytrip, testimonials, external_link',
], ],
'types' => [ 'types' => [
'1' => [ '1' => [
@@ -44,7 +44,8 @@ return [
], ],
'palettes' => [ 'palettes' => [
'destinations' => ['showitem' => 'country,region,city'], 'destinations' => ['showitem' => 'country,region,city'],
'top' => ['showitem' => 'searchable, bookable, daytrip, important, skipass_included, detail_page'], 'top' => ['showitem' => 'searchable, bookable, daytrip, important, skipass_included, detail_page,
external_link'],
'name' => ['showitem' => 'name,code'], 'name' => ['showitem' => 'name,code'],
'alternative' => ['showitem' => 'alt_product, alt_label'], 'alternative' => ['showitem' => 'alt_product, alt_label'],
'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'], 'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'],
@@ -529,7 +530,11 @@ return [
'ad' => [ 'ad' => [
'title' => 'Single product ad', 'title' => 'Single product ad',
'value' => 1.91, 'value' => 1.91,
] ],
'carousel' => [
'title' => 'Carousel',
'value' => 1,
],
] ]
] ]
], ],
@@ -785,5 +790,13 @@ return [
'maxitems' => 1, 'maxitems' => 1,
], ],
], ],
'external_link' => [
'exclude' => false,
'label' => 'Externer Link',
'config' => [
'type' => 'input',
'eval' => 'trim',
]
]
], ],
]; ];
@@ -20,6 +20,7 @@ CREATE TABLE tx_epproducts_domain_model_product (
feature varchar(255) DEFAULT '' NOT NULL, feature varchar(255) DEFAULT '' NOT NULL,
bus_pro_id int(11) unsigned NOT NULL default '0', bus_pro_id int(11) unsigned NOT NULL default '0',
detail_page varchar(255) DEFAULT '' NOT NULL, detail_page varchar(255) DEFAULT '' NOT NULL,
external_link varchar(255) DEFAULT '' NOT NULL,
description text NOT NULL, description text NOT NULL,
teaser text NOT NULL, teaser text NOT NULL,
teaser_long text NOT NULL, teaser_long text NOT NULL,