diff --git a/deploy.php b/deploy.php index b34a2f4e..7f0afcce 100644 --- a/deploy.php +++ b/deploy.php @@ -50,5 +50,21 @@ task('assets', [ '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', 'database:update'); +before('cleanup', 'caches:flush'); +before('cleanup', 'languages:update'); + after('deploy:failed', 'deploy:unlock'); diff --git a/web/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php b/web/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php index d94cda41..ae86090d 100644 --- a/web/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php +++ b/web/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php @@ -119,7 +119,7 @@ class ResellerController extends ActionController */ 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'; diff --git a/web/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php b/web/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php index 7d5ec7a4..515b7b41 100644 --- a/web/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php +++ b/web/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php @@ -60,6 +60,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements */ protected $detailPage; + /** + * @var string + */ + protected $externalLink = ''; + /** * @var string */ @@ -367,6 +372,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements $this->detailPage = $detailPage; } + /** + * @return string + */ + public function getExternalLink() + { + return $this->externalLink; + } + + /** + * @param string $externalLink + */ + public function setExternalLink($externalLink) + { + $this->externalLink = $externalLink; + } + /** * @return string $name */ diff --git a/web/typo3conf/ext/ep_products/Classes/Domain/Serialization/Product.php b/web/typo3conf/ext/ep_products/Classes/Domain/Serialization/Product.php index 3c8975b6..c586564b 100644 --- a/web/typo3conf/ext/ep_products/Classes/Domain/Serialization/Product.php +++ b/web/typo3conf/ext/ep_products/Classes/Domain/Serialization/Product.php @@ -73,7 +73,9 @@ class Product $product['description'] = SerializationUtility::sanitizeText($entity->getConceptDescription()); $product['images']['image'] = SerializationUtility::preprocessImages($entity->getResellerImages(), $imageProcessingInstructions); $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['city'] = City::fromEntity($entity->getCity()); diff --git a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php index 0ea25983..28092933 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php +++ b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php @@ -28,7 +28,7 @@ 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, testimonials', + video, banner, additional_regions, badge, daytrip, testimonials, external_link', ], 'types' => [ '1' => [ @@ -44,7 +44,8 @@ return [ ], 'palettes' => [ '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'], 'alternative' => ['showitem' => 'alt_product, alt_label'], 'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'], @@ -529,7 +530,11 @@ return [ 'ad' => [ 'title' => 'Single product ad', 'value' => 1.91, - ] + ], + 'carousel' => [ + 'title' => 'Carousel', + 'value' => 1, + ], ] ] ], @@ -785,5 +790,13 @@ return [ 'maxitems' => 1, ], ], + 'external_link' => [ + 'exclude' => false, + 'label' => 'Externer Link', + 'config' => [ + 'type' => 'input', + 'eval' => 'trim', + ] + ] ], ]; diff --git a/web/typo3conf/ext/ep_products/ext_tables.sql b/web/typo3conf/ext/ep_products/ext_tables.sql index eba2e568..e332f0bf 100644 --- a/web/typo3conf/ext/ep_products/ext_tables.sql +++ b/web/typo3conf/ext/ep_products/ext_tables.sql @@ -20,6 +20,7 @@ CREATE TABLE tx_epproducts_domain_model_product ( feature varchar(255) DEFAULT '' NOT NULL, bus_pro_id int(11) unsigned NOT NULL default '0', detail_page varchar(255) DEFAULT '' NOT NULL, + external_link varchar(255) DEFAULT '' NOT NULL, description text NOT NULL, teaser text NOT NULL, teaser_long text NOT NULL,