From 09da57a119f6474e112883ed3bacef017214d13d Mon Sep 17 00:00:00 2001 From: Robert Saternus Date: Thu, 17 Oct 2024 13:36:20 +0200 Subject: [PATCH] FFWEB-3197: Fix double request issue on category pages Fix double request issue on category pages --- .../elements/paging/config/sw-cms-el-config-paging.html.twig | 4 ++-- .../administration/src/module/sw-cms/elements/paging/index.js | 2 +- src/Resources/public/administration/js/omikron-fact-finder.js | 2 +- src/Resources/views/storefront/base.html.twig | 1 - src/Subscriber/CategoryPageSubscriber.php | 3 +-- src/Subscriber/ConfigurationSubscriber.php | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Resources/app/administration/src/module/sw-cms/elements/paging/config/sw-cms-el-config-paging.html.twig b/src/Resources/app/administration/src/module/sw-cms/elements/paging/config/sw-cms-el-config-paging.html.twig index 44af541a..63b66e62 100644 --- a/src/Resources/app/administration/src/module/sw-cms/elements/paging/config/sw-cms-el-config-paging.html.twig +++ b/src/Resources/app/administration/src/module/sw-cms/elements/paging/config/sw-cms-el-config-paging.html.twig @@ -1,10 +1,10 @@ {% block sw_cms_element_paging_config %}
- - +
{% endblock %} diff --git a/src/Resources/app/administration/src/module/sw-cms/elements/paging/index.js b/src/Resources/app/administration/src/module/sw-cms/elements/paging/index.js index ab6b87ab..7e8ba868 100644 --- a/src/Resources/app/administration/src/module/sw-cms/elements/paging/index.js +++ b/src/Resources/app/administration/src/module/sw-cms/elements/paging/index.js @@ -14,7 +14,7 @@ Shopware.Service('cmsService').registerCmsElement({ source: 'static', }, showOnly: { - value: 'true', + value: false, source: 'static', }, }, diff --git a/src/Resources/public/administration/js/omikron-fact-finder.js b/src/Resources/public/administration/js/omikron-fact-finder.js index 373bb976..2b918fe0 100755 --- a/src/Resources/public/administration/js/omikron-fact-finder.js +++ b/src/Resources/public/administration/js/omikron-fact-finder.js @@ -1 +1 @@ -(function(){var e={228:function(){},494:function(){},782:function(){},787:function(){},132:function(){},259:function(e,n,t){var i=t(228);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),t(346).Z("6c33f4d4",i,!0,{})},262:function(e,n,t){var i=t(494);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),t(346).Z("1e877f1c",i,!0,{})},288:function(e,n,t){var i=t(782);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),t(346).Z("2bad29ae",i,!0,{})},577:function(e,n,t){var i=t(787);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),t(346).Z("004f6500",i,!0,{})},700:function(e,n,t){var i=t(132);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),t(346).Z("1afa291d",i,!0,{})},346:function(e,n,t){"use strict";function i(e,n){for(var t=[],i={},s=0;st.parts.length&&(i.parts.length=t.parts.length)}else{for(var o=[],s=0;s\n \n
\n \n \n
\n \n \n{% endblock %}\n'});let{Component:n}=Shopware;n.register("sw-cms-block-listing-preview",{template:'{% block cms_block_commerce_factfinder_listing_preview %}\n
\n FACT-Finder Search Result\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"listing",label:"sw-cms.blocks.commerce.factfinderWebComponentsListing.label",category:"commerce",component:"sw-cms-block-listing",previewComponent:"sw-cms-block-listing-preview",slots:{toolbarFilters:"asn",toolbarPaging:"paging",toolbarSorting:"sortbox",records:"record-list"}});let{Component:i}=Shopware;i.register("sw-cms-block-campaigns",{template:'{% block cms_block_commerce_factfinder_campaigns %}\n
\n \n
\n{% endblock %}\n'});let{Component:s}=Shopware;s.register("sw-cms-block-campaigns-preview",{template:'{% block cms_block_commerce_factfinder_campaigns_preview %}\n
\n FACT-Finder Campaigns\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"campaigns",label:"sw-cms.blocks.commerce.factfinderWebComponentsCampaigns.label",category:"commerce",component:"sw-cms-block-campaigns",previewComponent:"sw-cms-block-campaigns-preview",slots:{campaigns:"campaigns"}});let{Component:a}=Shopware;a.register("sw-cms-block-filters",{template:'{% block cms_block_commerce_factfinder_filters %}\n
\n \n
\n{% endblock %}\n'});let{Component:o}=Shopware;o.register("sw-cms-block-filters-preview",{template:'{% block cms_block_commerce_factfinder_filters_preview %}\n
\n FACT-Finder Filters\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"filters",label:"sw-cms.blocks.commerce.factfinderWebComponentsFilters.label",category:"commerce",component:"sw-cms-block-filters",previewComponent:"sw-cms-block-filters-preview",defaultConfig:{cssClass:"cms-block-sidebar-filter"},slots:{filters:"asn"}}),Shopware.Component.register("sw-cms-el-record-list",{template:'{% block sw_cms_element_record_list %}\n
\n
FF-RECORD-LIST
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("record-list")}}}),Shopware.Component.register("sw-cms-el-config-record-list",{template:'{% block sw_cms_element_record_list_config %}\n
\n \n\n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("record-list")}}}),Shopware.Component.register("sw-cms-el-preview-record-list",{template:'{% block sw_cms_element_record_list_preview %}\n
\n FF-RECORD-LIST\n
\n{% endblock %}\n'}),Shopware.Service("cmsService").registerCmsElement({name:"record-list",label:"sw-cms.elements.recordList.label",component:"sw-cms-el-record-list",configComponent:"sw-cms-el-config-record-list",previewComponent:"sw-cms-el-preview-record-list",defaultConfig:{subscribe:{value:!0,source:"static"},infiniteScrolling:{value:!1,source:"static"},restoreScrollPosition:{value:!1,source:"static"},infiniteDebounceDelay:{value:"32",source:"static"},infiniteScrollMargin:{value:0,source:"static"},callbackArg:{value:"records",source:"static"},callback:{value:"",source:"static"},id:{value:"",source:"static"},domUpdated:{value:"",source:"static"}}}),Shopware.Component.register("sw-cms-el-asn",{template:'{% block sw_cms_element_asn %}\n
\n
FF-ASN
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("asn")}}}),t(577),Shopware.Component.register("sw-cms-el-config-asn",{template:'{% block sw_cms_element_asn_config %}\n
\n \n\n \n \n\n \n \n\n \n \n\n \n \n \n \n \n \n\n \n

Filter Cloud

\n \n\n \n \n \n\n \n \n\n \n \n \n \n \n \n
\n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("asn")}}}),Shopware.Component.register("sw-cms-el-preview-asn",{template:'{% block sw_cms_preview_element_asn %}\n
\n FF-ASN\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"asn",label:"sw-cms.elements.asn.label",component:"sw-cms-el-asn",configComponent:"sw-cms-el-config-asn",previewComponent:"sw-cms-el-preview-asn",defaultConfig:{subscribe:{value:!0,source:"static"},vertical:{value:!1,source:"static"},topic:{value:"asn",source:"static"},callbackArg:{value:"groups",source:"static"},callback:{value:"",source:"static"},id:{value:"",source:"static"},domUpdated:{value:"",source:"static"},filterCloud:{value:!0,source:"static"},filterCloudBlacklist:{value:"",source:"static"},filterCloudWhitelist:{value:"",source:"static"},filterCloudOrder:{value:"fact-finder",source:"static"}}}),Shopware.Component.register("sw-cms-el-sortbox",{template:'{% block sw_cms_element_sortbox %}\n
\n
FF-SORTBOX
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("sortbox")}}}),Shopware.Component.register("sw-cms-el-config-sortbox",{template:'{% block sw_cms_element_sortbox_config %}\n
\n \n \n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("sortbox")}}}),Shopware.Component.register("sw-cms-el-preview-sortbox",{template:'{% block sw_cms_element_sortbox_preview %}\n
\n FF-SORTBOX\n
\n{% endblock %}\n'}),Shopware.Service("cmsService").registerCmsElement({name:"sortbox",label:"sw-cms.elements.sortbox.label",component:"sw-cms-el-sortbox",configComponent:"sw-cms-el-config-sortbox",previewComponent:"sw-cms-el-preview-sortbox",defaultConfig:{subscribe:{value:!0,source:"static"},opened:{value:!0,source:"static"},showSelected:{value:!1,source:"static"},showSelectedFirst:{value:!1,source:"static"},collapseOnblur:{value:!1,source:"static"}}}),Shopware.Component.register("sw-cms-el-paging",{template:'{% block sw_cms_element_paging %}\n
\n
FF-PAGING
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("paging")}}}),Shopware.Component.register("sw-cms-el-config-paging",{template:'{% block sw_cms_element_paging_config %}\n
\n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("paging")}}}),Shopware.Component.register("sw-cms-el-preview-paging",{template:'{% block sw_cms_element_paging_preview %}\n
\n FF-PAGING\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"paging",label:"sw-cms.elements.paging.label",component:"sw-cms-el-paging",configComponent:"sw-cms-el-config-paging",previewComponent:"sw-cms-el-preview-paging",defaultConfig:{subscribe:{value:!0,source:"static"},showOnly:{value:"true",source:"static"}}}),Shopware.Component.register("sw-cms-el-campaigns",{template:'{% block sw_cms_element_campaigns %}\n
\n
CAMPAIGNS
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("campaigns")}}}),Shopware.Component.register("sw-cms-el-config-campaigns",{template:'{% block sw_cms_element_campaigns_config %}\n
\n\n \n \n\n \n \n \n \n\n \n \n\n \n \n \n\n \n \n \n \n\n \n \n\n\n \n \n \n \n \n \n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},data(){return{campaignFlags:["None","is-product-campaign","is-landing-page-campaign"]}},methods:{createdComponent(){this.initElementConfig("campaigns")}}}),Shopware.Component.register("sw-cms-el-preview-campaigns",{template:'{% block sw_cms_element_campaigns_preview %}\n
\n CAMPAIGNS\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"campaigns",label:"sw-cms.elements.campaigns.label",component:"sw-cms-el-campaigns",configComponent:"sw-cms-el-config-campaigns",previewComponent:"sw-cms-el-preview-campaigns",defaultConfig:{advisorCampaignName:{value:"",source:"static"},feedbackCampaignLabel:{value:"",source:"static"},feedbackCampaignFlag:{value:"",source:"static"},enableFeedbackCampaign:{value:!1,source:"static"},enableAdvisorCampaign:{value:!1,source:"static"},enableRedirectCampaign:{value:!1,source:"static"},enablePushedProducts:{value:!1,source:"static"},pushedProductsFlag:{value:"",source:"static"},pushedProductsName:{value:"",source:"static"}}}),t(700),t(288);let{Component:l,Mixin:c}=Shopware;l.register("ui-feed-export-form",{template:'{% block factfinder_module_ui_feed_export %}\n \n\n \n \n \n \n\n \n \n\n \n \n \n\n \n \n\n {{ $tc(\'ui-feed-export.component.export_form.button.title\') }}\n \n \n \n{% endblock %}\n',inject:["systemConfigApiService"],data(){return{salesChannelValue:null,salesChannelLanguageValue:null,exportTypeValue:null,typeSelectOptions:[],isCacheDisable:!1,isLoadingCache:!1,isLoadingExport:!1}},mixins:[c.getByName("notification")],mounted(){this.getPluginConfig(),this.getExportTypeValues()},filters:{capitalize:function(e){return e?(e=e.toString()).charAt(0).toUpperCase()+e.slice(1):""}},methods:{async getPluginConfig(){let e=await this.systemConfigApiService.getValues("OmikronFactFinder.config");this.isCacheDisable=e["OmikronFactFinder.config.enableExportCache"]},getExportTypeValues(){let e=Shopware.Service("syncService").httpClient,n={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};e.get("_action/fact-finder/get-export-type-options",{headers:n}).then(e=>{200===e.status&&(this.typeSelectOptions=e.data)})},successFeedGenerationWindow(){this.createNotificationSuccess({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.alert_success.text")})},errorFeedGenerationWindow(){this.createNotificationError({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.alert_error.text")})},errorNotValidParams(){this.createNotificationError({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.alert_not_valid_params.text")})},successRefreshCacheWindow(){this.createNotificationSuccess({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.refresh_cache_success.text")})},errorRefreshCacheWindow(){this.createNotificationError({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.refresh_cache_error.text")})},validateParams(e){return null!==e.salesChannelValue&&null!==e.salesChannelLanguageValue&&null!==e.exportTypeValue},getFeedExportFile(e){let n={salesChannelValue:this.salesChannelValue,salesChannelLanguageValue:this.salesChannelLanguageValue,exportTypeValue:this.exportTypeValue};if(!this.validateParams(n)){this.errorNotValidParams();return}this.isLoadingExport=!0;let t=Shopware.Service("syncService").httpClient,i={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};t.get(e,{headers:i,params:n}).then(e=>{200===e.status?this.successFeedGenerationWindow():this.errorFeedGenerationWindow(),this.isLoadingExport=!1})},refreshExportCache(e){this.isLoadingCache=!0;let n=Shopware.Service("syncService").httpClient,t={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"},i={salesChannelValue:this.salesChannelValue,salesChannelLanguageValue:this.salesChannelLanguageValue};n.get(e,{headers:t,params:i}).then(e=>{200===e.status?this.successRefreshCacheWindow():this.errorRefreshCacheWindow(),this.isLoadingCache=!1})}}});let{Component:r}=Shopware;r.register("ui-feed-export-index",{template:'{% block factfinder_ui_feed_export_index %}\n \n \n \n{% endblock %}\n',metaInfo(){return{title:this.$createTitle()}}});var d=JSON.parse('{"ui-feed-export":{"title":"FACT-Finder\xae Feed-Export","component":{"export_form":{"sales_channel":{"label":"Verkaufskanal"},"sales_channel_language":{"label":"Sprache"},"button":{"title":"Export erstellen"},"cache_button":{"title":"Cache-Export aktualisieren"},"alert_success":{"text":"Der Export wurde generiert"},"alert_error":{"text":"W\xe4hrend des Integrationsprozesses ist ein Fehler aufgetreten"},"export_type":{"label":"W\xe4hlen Sie den Exporttyp aus"},"alert_not_valid_params":{"text":"Bitte w\xe4hlen Sie Exportparameter aus"},"refresh_cache_success":{"text":"Der Export-Cache wurde aktualisiert"},"refresh_cache_error":{"text":"Beim Aktualisieren des Exportcaches ist ein Fehler aufgetreten"}}}}}'),p=JSON.parse('{"ui-feed-export":{"title":"FACT-Finder\xae Feed Export","component":{"export_form":{"sales_channel":{"label":"Sales Channel"},"sales_channel_language":{"label":"Language"},"button":{"title":"Create Export"},"cache_button":{"title":"Refresh cache Export"},"alert_success":{"text":"Export has been generated"},"alert_error":{"text":"An error occurred during integration process"},"export_type":{"label":"Select export type"},"alert_not_valid_params":{"text":"Please choose export parameters"},"refresh_cache_success":{"text":"Export cache has been refreshed"},"refresh_cache_error":{"text":"An error occurred during refresh export cache"}}}}}');let{Module:m}=Shopware;m.register("ui-feed-export",{color:"#ff3d58",icon:"default-shopping-paper-bag-product",title:"ui-feed-export.title",description:"",snippets:{"de-DE":d,"en-GB":p},routes:{index:{component:"ui-feed-export-index",path:"index"}},navigation:[{label:"ui-feed-export.title",path:"ui.feed.export.index",position:100,parent:"sw-extension"}]});let{Component:u,Mixin:f}=Shopware;u.register("update-field-roles",{template:'\n {{ $tc(\'configuration.updateFieldRoles.update\') }}\n\n',inject:["fieldRolesService"],mixins:[f.getByName("notification"),f.getByName("sw-inline-snippet")],data(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{async onClick(){this.isLoading=!0,await this.fieldRolesService.sendUpdateFieldRoles(),this.isSaveSuccessful=!0,this.isLoading=!1,this.createNotificationSuccess({message:Shopware.Snippet.tc("configuration.updateFieldRoles.update")})}}}),t(259);let{Component:g,Mixin:h}=Shopware;g.register("test-api-connection",{template:'\n {{ $tc(\'configuration.testApiConnection.testConnection\') }}\n\n',mixins:[h.getByName("notification"),h.getByName("sw-inline-snippet")],data(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{async onClick(){this.isLoading=!0;let e=Shopware.Service("syncService").httpClient,n={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};e.get("_action/test-connection/api",{headers:n}).then(e=>{200===e.status?this.createNotificationSuccess({message:Shopware.Snippet.tc("configuration.testConnection.success")}):this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).catch(()=>{this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).finally(()=>{this.isSaveSuccessful=!0,this.isLoading=!1})}}}),t(262);let{Component:v,Mixin:w}=Shopware;v.register("test-ftp-connection",{template:'\n {{ $tc(\'configuration.testFtpConnection.testConnection\') }}\n\n',mixins:[w.getByName("notification"),w.getByName("sw-inline-snippet")],data(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{async onClick(){this.isLoading=!0;let e=Shopware.Service("syncService").httpClient,n={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};e.get("_action/test-connection/ftp",{headers:n}).then(e=>{200===e.status?this.createNotificationSuccess({message:Shopware.Snippet.tc("configuration.testConnection.success")}):this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).catch(()=>{this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).finally(()=>{this.isSaveSuccessful=!0,this.isLoading=!1})}}});let{Component:b,Mixin:C}=Shopware;b.register("test-push-import-connection",{template:'\n {{ $tc(\'configuration.testApiConnection.testConnection\') }}\n\n',mixins:[C.getByName("notification"),C.getByName("sw-inline-snippet")],data(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{async onClick(){this.isLoading=!0;let e=Shopware.Service("syncService").httpClient,n={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};e.get("_action/test-connection/push-import",{headers:n}).then(e=>{200===e.status?this.createNotificationSuccess({message:Shopware.Snippet.tc("configuration.testConnection.success")}):this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).catch(()=>{this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).finally(()=>{this.isSaveSuccessful=!0,this.isLoading=!1})}}});let S=Shopware.Classes.ApiService;var x=class extends S{constructor(e,n){super(e,n,null,"application/json"),this.name="fieldRolesServiceApi"}sendUpdateFieldRoles(){let e=this.getBasicHeaders();return this.httpClient.get("_action/field-roles/update",{headers:e}).then(e=>S.handleResponse(e))}};Shopware.Service().register("fieldRolesService",()=>new x(Shopware.Application.getContainer("init").httpClient,Shopware.Service("loginService")));var _=JSON.parse('{"sw-cms":{"blocks":{"commerce":{"factfinderWebComponentsListing":{"label":"Typische Sammlung von Webkomponenten, die eine Suchergebnisseite implementiert"},"factfinderWebComponentsCampaigns":{"label":"FACT-Finder\xae Web Components Kampagnen"},"factfinderWebComponentsFilters":{"label":"FACT-Finder\xae Web Components Filter"},"factfinderWebComponentsRecordList":{"label":"FACT-Finder\xae Web Components Rekordliste"}}},"elements":{"recordList":{"label":"FACT-Finder\xae Web Components ff-record-list element","config":{"callbackArg":"Name des Arguments, das im Callback-Bereich verf\xfcgbar sein wird","callback":"R\xfcckruf zum abonnierten Thema. Es wird empfohlen, nur einen R\xfcckruf pro Thema und Seite durchzuf\xfchren.","domUpdated":"Listener f\xfcr das dom-update-Ereignis dieses Elements","id":"Der Wert wird als „id“-Attribut an das Element \xfcbergeben. Wenn nicht angegeben, wird die Standard-CMS-Element-ID verwendet"}},"asn":{"asn":{"label":"FACT-Finder\xae Web Components ff-asn element","config":{"callbackArg":"Name des Arguments, das im Callback-Bereich verf\xfcgbar sein wird","callback":"R\xfcckruf zum abonnierten Thema. Es wird empfohlen, nur einen R\xfcckruf pro Thema und Seite durchzuf\xfchren.","domUpdated":"Listener f\xfcr das dom-update-Ereignis dieses Elements.","id":"Der Wert wird als „id“-Attribut an das Element \xfcbergeben. Wenn nicht angegeben, wird die Standard-CMS-Element-ID verwendet","topic":"Wenn Sie dieses Feld leer lassen, abonniert das Element sein Standardthema (ASN).","vertical":"Durch die Einstellung „true“ wird die zus\xe4tzliche CSS-Klasse „btn-block“ zu „ff-asn-group“ und „
t.parts.length&&(i.parts.length=t.parts.length)}else{for(var o=[],s=0;s\n \n
\n \n \n
\n \n
\n{% endblock %}\n'});let{Component:n}=Shopware;n.register("sw-cms-block-listing-preview",{template:'{% block cms_block_commerce_factfinder_listing_preview %}\n
\n FACT-Finder Search Result\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"listing",label:"sw-cms.blocks.commerce.factfinderWebComponentsListing.label",category:"commerce",component:"sw-cms-block-listing",previewComponent:"sw-cms-block-listing-preview",slots:{toolbarFilters:"asn",toolbarPaging:"paging",toolbarSorting:"sortbox",records:"record-list"}});let{Component:i}=Shopware;i.register("sw-cms-block-campaigns",{template:'{% block cms_block_commerce_factfinder_campaigns %}\n
\n \n
\n{% endblock %}\n'});let{Component:s}=Shopware;s.register("sw-cms-block-campaigns-preview",{template:'{% block cms_block_commerce_factfinder_campaigns_preview %}\n
\n FACT-Finder Campaigns\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"campaigns",label:"sw-cms.blocks.commerce.factfinderWebComponentsCampaigns.label",category:"commerce",component:"sw-cms-block-campaigns",previewComponent:"sw-cms-block-campaigns-preview",slots:{campaigns:"campaigns"}});let{Component:a}=Shopware;a.register("sw-cms-block-filters",{template:'{% block cms_block_commerce_factfinder_filters %}\n
\n \n
\n{% endblock %}\n'});let{Component:o}=Shopware;o.register("sw-cms-block-filters-preview",{template:'{% block cms_block_commerce_factfinder_filters_preview %}\n
\n FACT-Finder Filters\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"filters",label:"sw-cms.blocks.commerce.factfinderWebComponentsFilters.label",category:"commerce",component:"sw-cms-block-filters",previewComponent:"sw-cms-block-filters-preview",defaultConfig:{cssClass:"cms-block-sidebar-filter"},slots:{filters:"asn"}}),Shopware.Component.register("sw-cms-el-record-list",{template:'{% block sw_cms_element_record_list %}\n
\n
FF-RECORD-LIST
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("record-list")}}}),Shopware.Component.register("sw-cms-el-config-record-list",{template:'{% block sw_cms_element_record_list_config %}\n
\n \n\n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("record-list")}}}),Shopware.Component.register("sw-cms-el-preview-record-list",{template:'{% block sw_cms_element_record_list_preview %}\n
\n FF-RECORD-LIST\n
\n{% endblock %}\n'}),Shopware.Service("cmsService").registerCmsElement({name:"record-list",label:"sw-cms.elements.recordList.label",component:"sw-cms-el-record-list",configComponent:"sw-cms-el-config-record-list",previewComponent:"sw-cms-el-preview-record-list",defaultConfig:{subscribe:{value:!0,source:"static"},infiniteScrolling:{value:!1,source:"static"},restoreScrollPosition:{value:!1,source:"static"},infiniteDebounceDelay:{value:"32",source:"static"},infiniteScrollMargin:{value:0,source:"static"},callbackArg:{value:"records",source:"static"},callback:{value:"",source:"static"},id:{value:"",source:"static"},domUpdated:{value:"",source:"static"}}}),Shopware.Component.register("sw-cms-el-asn",{template:'{% block sw_cms_element_asn %}\n
\n
FF-ASN
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("asn")}}}),t(577),Shopware.Component.register("sw-cms-el-config-asn",{template:'{% block sw_cms_element_asn_config %}\n
\n \n\n \n \n\n \n \n\n \n \n\n \n \n \n \n \n \n\n \n

Filter Cloud

\n \n\n \n \n \n\n \n \n\n \n \n \n \n \n \n
\n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("asn")}}}),Shopware.Component.register("sw-cms-el-preview-asn",{template:'{% block sw_cms_preview_element_asn %}\n
\n FF-ASN\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"asn",label:"sw-cms.elements.asn.label",component:"sw-cms-el-asn",configComponent:"sw-cms-el-config-asn",previewComponent:"sw-cms-el-preview-asn",defaultConfig:{subscribe:{value:!0,source:"static"},vertical:{value:!1,source:"static"},topic:{value:"asn",source:"static"},callbackArg:{value:"groups",source:"static"},callback:{value:"",source:"static"},id:{value:"",source:"static"},domUpdated:{value:"",source:"static"},filterCloud:{value:!0,source:"static"},filterCloudBlacklist:{value:"",source:"static"},filterCloudWhitelist:{value:"",source:"static"},filterCloudOrder:{value:"fact-finder",source:"static"}}}),Shopware.Component.register("sw-cms-el-sortbox",{template:'{% block sw_cms_element_sortbox %}\n
\n
FF-SORTBOX
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("sortbox")}}}),Shopware.Component.register("sw-cms-el-config-sortbox",{template:'{% block sw_cms_element_sortbox_config %}\n
\n \n \n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("sortbox")}}}),Shopware.Component.register("sw-cms-el-preview-sortbox",{template:'{% block sw_cms_element_sortbox_preview %}\n
\n FF-SORTBOX\n
\n{% endblock %}\n'}),Shopware.Service("cmsService").registerCmsElement({name:"sortbox",label:"sw-cms.elements.sortbox.label",component:"sw-cms-el-sortbox",configComponent:"sw-cms-el-config-sortbox",previewComponent:"sw-cms-el-preview-sortbox",defaultConfig:{subscribe:{value:!0,source:"static"},opened:{value:!0,source:"static"},showSelected:{value:!1,source:"static"},showSelectedFirst:{value:!1,source:"static"},collapseOnblur:{value:!1,source:"static"}}}),Shopware.Component.register("sw-cms-el-paging",{template:'{% block sw_cms_element_paging %}\n
\n
FF-PAGING
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("paging")}}}),Shopware.Component.register("sw-cms-el-config-paging",{template:'{% block sw_cms_element_paging_config %}\n
\n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("paging")}}}),Shopware.Component.register("sw-cms-el-preview-paging",{template:'{% block sw_cms_element_paging_preview %}\n
\n FF-PAGING\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"paging",label:"sw-cms.elements.paging.label",component:"sw-cms-el-paging",configComponent:"sw-cms-el-config-paging",previewComponent:"sw-cms-el-preview-paging",defaultConfig:{subscribe:{value:!0,source:"static"},showOnly:{value:!1,source:"static"}}}),Shopware.Component.register("sw-cms-el-campaigns",{template:'{% block sw_cms_element_campaigns %}\n
\n
CAMPAIGNS
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created(){this.createdComponent()},methods:{createdComponent(){this.initElementConfig("campaigns")}}}),Shopware.Component.register("sw-cms-el-config-campaigns",{template:'{% block sw_cms_element_campaigns_config %}\n
\n\n \n \n\n \n \n \n \n\n \n \n\n \n \n \n\n \n \n \n \n\n \n \n\n\n \n \n \n \n \n \n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created(){this.createdComponent()},data(){return{campaignFlags:["None","is-product-campaign","is-landing-page-campaign"]}},methods:{createdComponent(){this.initElementConfig("campaigns")}}}),Shopware.Component.register("sw-cms-el-preview-campaigns",{template:'{% block sw_cms_element_campaigns_preview %}\n
\n CAMPAIGNS\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"campaigns",label:"sw-cms.elements.campaigns.label",component:"sw-cms-el-campaigns",configComponent:"sw-cms-el-config-campaigns",previewComponent:"sw-cms-el-preview-campaigns",defaultConfig:{advisorCampaignName:{value:"",source:"static"},feedbackCampaignLabel:{value:"",source:"static"},feedbackCampaignFlag:{value:"",source:"static"},enableFeedbackCampaign:{value:!1,source:"static"},enableAdvisorCampaign:{value:!1,source:"static"},enableRedirectCampaign:{value:!1,source:"static"},enablePushedProducts:{value:!1,source:"static"},pushedProductsFlag:{value:"",source:"static"},pushedProductsName:{value:"",source:"static"}}}),t(700),t(288);let{Component:l,Mixin:c}=Shopware;l.register("ui-feed-export-form",{template:'{% block factfinder_module_ui_feed_export %}\n \n\n \n \n \n \n\n \n \n\n \n \n \n\n \n \n\n {{ $tc(\'ui-feed-export.component.export_form.button.title\') }}\n \n \n \n{% endblock %}\n',inject:["systemConfigApiService"],data(){return{salesChannelValue:null,salesChannelLanguageValue:null,exportTypeValue:null,typeSelectOptions:[],isCacheDisable:!1,isLoadingCache:!1,isLoadingExport:!1}},mixins:[c.getByName("notification")],mounted(){this.getPluginConfig(),this.getExportTypeValues()},filters:{capitalize:function(e){return e?(e=e.toString()).charAt(0).toUpperCase()+e.slice(1):""}},methods:{async getPluginConfig(){let e=await this.systemConfigApiService.getValues("OmikronFactFinder.config");this.isCacheDisable=e["OmikronFactFinder.config.enableExportCache"]},getExportTypeValues(){let e=Shopware.Service("syncService").httpClient,n={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};e.get("_action/fact-finder/get-export-type-options",{headers:n}).then(e=>{200===e.status&&(this.typeSelectOptions=e.data)})},successFeedGenerationWindow(){this.createNotificationSuccess({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.alert_success.text")})},errorFeedGenerationWindow(){this.createNotificationError({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.alert_error.text")})},errorNotValidParams(){this.createNotificationError({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.alert_not_valid_params.text")})},successRefreshCacheWindow(){this.createNotificationSuccess({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.refresh_cache_success.text")})},errorRefreshCacheWindow(){this.createNotificationError({message:Shopware.Snippet.tc("ui-feed-export.component.export_form.refresh_cache_error.text")})},validateParams(e){return null!==e.salesChannelValue&&null!==e.salesChannelLanguageValue&&null!==e.exportTypeValue},getFeedExportFile(e){let n={salesChannelValue:this.salesChannelValue,salesChannelLanguageValue:this.salesChannelLanguageValue,exportTypeValue:this.exportTypeValue};if(!this.validateParams(n)){this.errorNotValidParams();return}this.isLoadingExport=!0;let t=Shopware.Service("syncService").httpClient,i={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};t.get(e,{headers:i,params:n}).then(e=>{200===e.status?this.successFeedGenerationWindow():this.errorFeedGenerationWindow(),this.isLoadingExport=!1})},refreshExportCache(e){this.isLoadingCache=!0;let n=Shopware.Service("syncService").httpClient,t={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"},i={salesChannelValue:this.salesChannelValue,salesChannelLanguageValue:this.salesChannelLanguageValue};n.get(e,{headers:t,params:i}).then(e=>{200===e.status?this.successRefreshCacheWindow():this.errorRefreshCacheWindow(),this.isLoadingCache=!1})}}});let{Component:r}=Shopware;r.register("ui-feed-export-index",{template:'{% block factfinder_ui_feed_export_index %}\n \n \n \n{% endblock %}\n',metaInfo(){return{title:this.$createTitle()}}});var d=JSON.parse('{"ui-feed-export":{"title":"FACT-Finder\xae Feed-Export","component":{"export_form":{"sales_channel":{"label":"Verkaufskanal"},"sales_channel_language":{"label":"Sprache"},"button":{"title":"Export erstellen"},"cache_button":{"title":"Cache-Export aktualisieren"},"alert_success":{"text":"Der Export wurde generiert"},"alert_error":{"text":"W\xe4hrend des Integrationsprozesses ist ein Fehler aufgetreten"},"export_type":{"label":"W\xe4hlen Sie den Exporttyp aus"},"alert_not_valid_params":{"text":"Bitte w\xe4hlen Sie Exportparameter aus"},"refresh_cache_success":{"text":"Der Export-Cache wurde aktualisiert"},"refresh_cache_error":{"text":"Beim Aktualisieren des Exportcaches ist ein Fehler aufgetreten"}}}}}'),p=JSON.parse('{"ui-feed-export":{"title":"FACT-Finder\xae Feed Export","component":{"export_form":{"sales_channel":{"label":"Sales Channel"},"sales_channel_language":{"label":"Language"},"button":{"title":"Create Export"},"cache_button":{"title":"Refresh cache Export"},"alert_success":{"text":"Export has been generated"},"alert_error":{"text":"An error occurred during integration process"},"export_type":{"label":"Select export type"},"alert_not_valid_params":{"text":"Please choose export parameters"},"refresh_cache_success":{"text":"Export cache has been refreshed"},"refresh_cache_error":{"text":"An error occurred during refresh export cache"}}}}}');let{Module:m}=Shopware;m.register("ui-feed-export",{color:"#ff3d58",icon:"default-shopping-paper-bag-product",title:"ui-feed-export.title",description:"",snippets:{"de-DE":d,"en-GB":p},routes:{index:{component:"ui-feed-export-index",path:"index"}},navigation:[{label:"ui-feed-export.title",path:"ui.feed.export.index",position:100,parent:"sw-extension"}]});let{Component:u,Mixin:f}=Shopware;u.register("update-field-roles",{template:'\n {{ $tc(\'configuration.updateFieldRoles.update\') }}\n\n',inject:["fieldRolesService"],mixins:[f.getByName("notification"),f.getByName("sw-inline-snippet")],data(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{async onClick(){this.isLoading=!0,await this.fieldRolesService.sendUpdateFieldRoles(),this.isSaveSuccessful=!0,this.isLoading=!1,this.createNotificationSuccess({message:Shopware.Snippet.tc("configuration.updateFieldRoles.update")})}}}),t(259);let{Component:g,Mixin:h}=Shopware;g.register("test-api-connection",{template:'\n {{ $tc(\'configuration.testApiConnection.testConnection\') }}\n\n',mixins:[h.getByName("notification"),h.getByName("sw-inline-snippet")],data(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{async onClick(){this.isLoading=!0;let e=Shopware.Service("syncService").httpClient,n={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};e.get("_action/test-connection/api",{headers:n}).then(e=>{200===e.status?this.createNotificationSuccess({message:Shopware.Snippet.tc("configuration.testConnection.success")}):this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).catch(()=>{this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).finally(()=>{this.isSaveSuccessful=!0,this.isLoading=!1})}}}),t(262);let{Component:v,Mixin:w}=Shopware;v.register("test-ftp-connection",{template:'\n {{ $tc(\'configuration.testFtpConnection.testConnection\') }}\n\n',mixins:[w.getByName("notification"),w.getByName("sw-inline-snippet")],data(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{async onClick(){this.isLoading=!0;let e=Shopware.Service("syncService").httpClient,n={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};e.get("_action/test-connection/ftp",{headers:n}).then(e=>{200===e.status?this.createNotificationSuccess({message:Shopware.Snippet.tc("configuration.testConnection.success")}):this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).catch(()=>{this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).finally(()=>{this.isSaveSuccessful=!0,this.isLoading=!1})}}});let{Component:b,Mixin:C}=Shopware;b.register("test-push-import-connection",{template:'\n {{ $tc(\'configuration.testApiConnection.testConnection\') }}\n\n',mixins:[C.getByName("notification"),C.getByName("sw-inline-snippet")],data(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{async onClick(){this.isLoading=!0;let e=Shopware.Service("syncService").httpClient,n={Authorization:`Bearer ${Shopware.Context.api.authToken.access}`,"Content-Type":"application/json"};e.get("_action/test-connection/push-import",{headers:n}).then(e=>{200===e.status?this.createNotificationSuccess({message:Shopware.Snippet.tc("configuration.testConnection.success")}):this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).catch(()=>{this.createNotificationError({title:Shopware.Snippet.tc("configuration.testConnection.fail"),message:Shopware.Snippet.tc("configuration.testConnection.helpText")})}).finally(()=>{this.isSaveSuccessful=!0,this.isLoading=!1})}}});let S=Shopware.Classes.ApiService;var x=class extends S{constructor(e,n){super(e,n,null,"application/json"),this.name="fieldRolesServiceApi"}sendUpdateFieldRoles(){let e=this.getBasicHeaders();return this.httpClient.get("_action/field-roles/update",{headers:e}).then(e=>S.handleResponse(e))}};Shopware.Service().register("fieldRolesService",()=>new x(Shopware.Application.getContainer("init").httpClient,Shopware.Service("loginService")));var _=JSON.parse('{"sw-cms":{"blocks":{"commerce":{"factfinderWebComponentsListing":{"label":"Typische Sammlung von Webkomponenten, die eine Suchergebnisseite implementiert"},"factfinderWebComponentsCampaigns":{"label":"FACT-Finder\xae Web Components Kampagnen"},"factfinderWebComponentsFilters":{"label":"FACT-Finder\xae Web Components Filter"},"factfinderWebComponentsRecordList":{"label":"FACT-Finder\xae Web Components Rekordliste"}}},"elements":{"recordList":{"label":"FACT-Finder\xae Web Components ff-record-list element","config":{"callbackArg":"Name des Arguments, das im Callback-Bereich verf\xfcgbar sein wird","callback":"R\xfcckruf zum abonnierten Thema. Es wird empfohlen, nur einen R\xfcckruf pro Thema und Seite durchzuf\xfchren.","domUpdated":"Listener f\xfcr das dom-update-Ereignis dieses Elements","id":"Der Wert wird als „id“-Attribut an das Element \xfcbergeben. Wenn nicht angegeben, wird die Standard-CMS-Element-ID verwendet"}},"asn":{"asn":{"label":"FACT-Finder\xae Web Components ff-asn element","config":{"callbackArg":"Name des Arguments, das im Callback-Bereich verf\xfcgbar sein wird","callback":"R\xfcckruf zum abonnierten Thema. Es wird empfohlen, nur einen R\xfcckruf pro Thema und Seite durchzuf\xfchren.","domUpdated":"Listener f\xfcr das dom-update-Ereignis dieses Elements.","id":"Der Wert wird als „id“-Attribut an das Element \xfcbergeben. Wenn nicht angegeben, wird die Standard-CMS-Element-ID verwendet","topic":"Wenn Sie dieses Feld leer lassen, abonniert das Element sein Standardthema (ASN).","vertical":"Durch die Einstellung „true“ wird die zus\xe4tzliche CSS-Klasse „btn-block“ zu „ff-asn-group“ und „
getCustomFields(), OmikronFactFinder::DISABLE_SEARCH_IMMEDIATE_CUSTOM_FIELD_NAME); $isHome = $route === 'frontend.home.page'; $isCategory = !$isHome && !$disableImmediate; - $searchImmediate = $this->config->isSsrActive() === false && $isCategory; $baseAddParams = array_filter(explode(',', (string) safeGetByName($event->getPage()->getExtension('factfinder')->get('communication'), 'add-params'))); /** @@ -77,7 +76,7 @@ public function onPageLoaded(NavigationPageLoadedEvent $event): void 'communication' => $communication, 'trackingSettings' => $this->extensionConfig->getTrackingSettings(), 'redirectMapping' => (string) $this->extensionConfig->getRedirectMapping(), - 'searchImmediate' => $searchImmediate ? 'true' : 'false', + 'searchImmediate' => false, 'categoryPathFieldName' => "{$this->fieldName}ROOT", 'communicationAttributes' => !empty($communicationConfig) ? $this->getCommunicationAttributes($communicationConfig) : $communication, ] diff --git a/src/Subscriber/ConfigurationSubscriber.php b/src/Subscriber/ConfigurationSubscriber.php index 913eafb2..40c6aff3 100755 --- a/src/Subscriber/ConfigurationSubscriber.php +++ b/src/Subscriber/ConfigurationSubscriber.php @@ -78,7 +78,7 @@ public function onPageLoaded(ShopwareSalesChannelEvent $event): void 'communication' => $communicationConfig, 'trackingSettings' => $this->extensionConfig->getTrackingSettings(), 'redirectMapping' => (string) $this->extensionConfig->getRedirectMapping(), - 'searchImmediate' => $this->isSearchImmediate($event) ? 'true' : 'false', + 'searchImmediate' => $this->isSearchImmediate($event), 'userId' => $customer ? $customer->getId() : null, 'ssr' => $this->config->isSsrActive(), 'communicationAttributes' => $this->getCommunicationAttributes($communicationConfig),