diff --git a/src/Model/LandingPage.php b/src/Model/LandingPage.php index c775485..0925d46 100644 --- a/src/Model/LandingPage.php +++ b/src/Model/LandingPage.php @@ -599,8 +599,6 @@ public function getLandingPageDataWithoutStore(): array LandingPageInterface::NAME, LandingPageInterface::CREATED_AT, LandingPageInterface::UPDATED_AT, - LandingPageInterface::OVERVIEW_PAGE_ID, - LandingPageInterface::OVERVIEW_PAGE_IMAGE, LandingPageInterface::URL_PATH, LandingPageInterface::STORE_ID, ]; @@ -635,6 +633,8 @@ public function getLandingPageDataForStore(): array LandingPageInterface::FILTER_LINK_ALLOWED, LandingPageInterface::HIDE_SELECTED_FILTERS, LandingPageInterface::CANONICAL_URL, + LandingPageInterface::OVERVIEW_PAGE_ID, + LandingPageInterface::OVERVIEW_PAGE_IMAGE, ]; return array_combine( diff --git a/src/Model/LandingPageRepository.php b/src/Model/LandingPageRepository.php index a080cca..73a6645 100644 --- a/src/Model/LandingPageRepository.php +++ b/src/Model/LandingPageRepository.php @@ -284,8 +284,11 @@ public function findAllActive(): array */ public function findAllByOverviewPage(OverviewPageInterface $overviewPage): array { + $storeId = $this->storeManager->getStore()->getId(); + $searchCriteria = $this->searchCriteriaBuilder - ->addFilter(LandingPageInterface::OVERVIEW_PAGE_ID, $overviewPage->getPageId()) + ->addFilter('emico_attributelanding_page_store.' . LandingPageInterface::OVERVIEW_PAGE_ID, $overviewPage->getPageId()) + ->addFilter('emico_attributelanding_page_store.' . LandingPageInterface::STORE_ID, $storeId, 'in') ->addFilter('emico_attributelanding_page_store.' . LandingPageInterface::ACTIVE, 1) ->create(); diff --git a/src/Setup/Patch/Data/ConvertLandingpageEntries.php b/src/Setup/Patch/Data/ConvertLandingpageEntries.php index 9d4f0df..633faef 100644 --- a/src/Setup/Patch/Data/ConvertLandingpageEntries.php +++ b/src/Setup/Patch/Data/ConvertLandingpageEntries.php @@ -80,7 +80,9 @@ private function insertLandingPageStore( LandingPageInterface::CANONICAL_URL, LandingPageInterface::HIDE_SELECTED_FILTERS, LandingPageInterface::TWEAKWISE_SORT_TEMPLATE, - LandingPageInterface::TWEAKWISE_BUILDER_TEMPLATE + LandingPageInterface::TWEAKWISE_BUILDER_TEMPLATE, + LandingPageInterface::OVERVIEW_PAGE_ID, + LandingPageInterface::OVERVIEW_PAGE_IMAGE, ]; foreach ($fields as $field) { diff --git a/src/etc/db_schema.xml b/src/etc/db_schema.xml index b4342b7..268c8a9 100644 --- a/src/etc/db_schema.xml +++ b/src/etc/db_schema.xml @@ -5,14 +5,9 @@ - - - @@ -36,11 +31,16 @@ + + +