diff --git a/spec/Storefront/Controller/ProxyControllerSpec.php b/spec/Storefront/Controller/ProxyControllerSpec.php index eb73f7e9..6b7d5171 100644 --- a/spec/Storefront/Controller/ProxyControllerSpec.php +++ b/spec/Storefront/Controller/ProxyControllerSpec.php @@ -15,7 +15,6 @@ use PhpSpec\Wrapper\Collaborator; use PHPUnit\Framework\Assert; use Prophecy\Argument; -use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -36,14 +35,11 @@ public function let( $serverUrl = 'https://example.fact-finder.de/fact-finder'; $config->getServerUrl()->willReturn($serverUrl); $config->getVersion()->willReturn('ng'); - $config->getCredentials()->willReturn([ - 'username', - 'pass', - ]); + $config->getApiKey()->willReturn('api-key-123'); $this->beConstructedWith($config); $clientBuilder->build()->willReturn($client); $clientBuilder->withServerUrl(Argument::any())->willReturn($clientBuilder); - $clientBuilder->withCredentials(Argument::any())->willReturn($clientBuilder); + $clientBuilder->withApiKey(Argument::any())->willReturn($clientBuilder); $clientBuilder->withVersion(Argument::any())->willReturn($clientBuilder); $this->client = $client; $this->clientBuilder = $clientBuilder; diff --git a/src/Api/TestConnectionController.php b/src/Api/TestConnectionController.php index 55f23dec..7259def7 100644 --- a/src/Api/TestConnectionController.php +++ b/src/Api/TestConnectionController.php @@ -33,15 +33,9 @@ public function __construct( )] public function testApiConnection(): JsonResponse { - $client = $this->clientBuilder - ->withCredentials(new Credentials(...$this->config->getCredentials())) - ->withServerUrl($this->config->getServerUrl()) - ->withVersion($this->config->getVersion()) - ->build(); - try { $client = $this->clientBuilder - ->withCredentials(new Credentials(...$this->config->getCredentials())) + ->withApiKey($this->config->getApiKey()) ->withServerUrl($this->config->getServerUrl()) ->withVersion($this->config->getVersion()) ->build(); @@ -79,6 +73,32 @@ public function testFTPConnection(): JsonResponse } } + #[Route( + '/api/_action/test-connection/push-import', + name: 'api.action.fact_finder.test_push_import_connection', + defaults: ['XmlHttpRequest' => true], + methods: ['GET'] + )] + public function testPushImportApiConnection(): JsonResponse + { + try { + $client = $this->clientBuilder + ->withCredentials(new Credentials(...$this->config->getCredentials())) + ->withServerUrl($this->config->getServerUrl()) + ->withVersion($this->config->getVersion()) + ->build(); + + $endpoint = $this->createTestEndpoint(); + $client->request('GET', $endpoint); + + return new JsonResponse(['message' => 'Connection successfully established'], 200); + } catch (\Exception $e) { + $this->factfinderLogger->error($e->getMessage()); + + return new JsonResponse(['message' => 'Connection could not be established'], 400); + } + } + private function createTestEndpoint(): string { $apiVersion = $this->config->getApiVersion(); diff --git a/src/Config/Communication.php b/src/Config/Communication.php index ca07d9eb..779c8b3e 100644 --- a/src/Config/Communication.php +++ b/src/Config/Communication.php @@ -48,7 +48,7 @@ public function getVersion(): string public function getApiVersion(): string { - return (string) $this->config('apiVersion') ?? 'v4'; + return 'v5'; } public function isProxyEnabled(): bool diff --git a/src/Resources/app/administration/src/module/configuration/component/test-push-import-connection/index.js b/src/Resources/app/administration/src/module/configuration/component/test-push-import-connection/index.js new file mode 100644 index 00000000..84b29fdd --- /dev/null +++ b/src/Resources/app/administration/src/module/configuration/component/test-push-import-connection/index.js @@ -0,0 +1,56 @@ +import template from './test-push-import-connection.html.twig'; + +const {Component, Mixin} = Shopware; + +Component.register('test-push-import-connection', { + template, + mixins: [ + Mixin.getByName('notification'), + Mixin.getByName('sw-inline-snippet'), + ], + data() { + return { + isLoading: false, + isSaveSuccessful: false, + }; + }, + + methods: { + async onClick() { + this.isLoading = true; + const httpClient = Shopware.Service('syncService').httpClient; + const url = '_action/test-connection/push-import'; + const basicHeaders = { + Authorization: `Bearer ${Shopware.Context.api.authToken.access}`, + 'Content-Type': 'application/json' + }; + + httpClient + .get(url, { + headers: basicHeaders + }) + .then((response) => { + if (response.status === 200) { + this.createNotificationSuccess({ + message: Shopware.Snippet.tc('configuration.testConnection.success') + }); + } else { + 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 = true; + this.isLoading = false; + }); + }, + }, + },); diff --git a/src/Resources/app/administration/src/module/configuration/component/test-push-import-connection/test-push-import-connection.html.twig b/src/Resources/app/administration/src/module/configuration/component/test-push-import-connection/test-push-import-connection.html.twig new file mode 100644 index 00000000..9bf31618 --- /dev/null +++ b/src/Resources/app/administration/src/module/configuration/component/test-push-import-connection/test-push-import-connection.html.twig @@ -0,0 +1,9 @@ + + {{ $tc('configuration.testApiConnection.testConnection') }} + diff --git a/src/Resources/app/administration/src/module/configuration/index.js b/src/Resources/app/administration/src/module/configuration/index.js index 8ed84688..4c87ea18 100644 --- a/src/Resources/app/administration/src/module/configuration/index.js +++ b/src/Resources/app/administration/src/module/configuration/index.js @@ -1,3 +1,4 @@ import './component/update-field-roles'; import './component/test-api-connection'; import './component/test-ftp-connection'; +import './component/test-push-import-connection'; diff --git a/src/Resources/config/config.xml b/src/Resources/config/config.xml index 0a22c02f..e4e8cca2 100644 --- a/src/Resources/config/config.xml +++ b/src/Resources/config/config.xml @@ -20,20 +20,6 @@ true - - username - - - true - - - - password - - - true - - apiKey @@ -41,24 +27,6 @@ true - - apiVersion - - - - - v4 - - - true - - useSsr @@ -223,6 +191,21 @@ Import Settings Import-Konfiguration + + + username + + + true + + + + password + + + true + + pushImport @@ -242,5 +225,9 @@ + + + testApiConnection + diff --git a/src/Resources/public/administration/js/omikron-fact-finder.js b/src/Resources/public/administration/js/omikron-fact-finder.js index 8b2caed7..dea026df 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{% 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:f,Mixin:u}=Shopware;f.register("update-field-roles",{template:'\n {{ $tc(\'configuration.updateFieldRoles.update\') }}\n\n',inject:["fieldRolesService"],mixins:[u.getByName("notification"),u.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:w,Mixin:v}=Shopware;w.register("test-ftp-connection",{template:'\n {{ $tc(\'configuration.testFtpConnection.testConnection\') }}\n\n',mixins:[v.getByName("notification"),v.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 b=Shopware.Classes.ApiService;var C=class extends b{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=>b.handleResponse(e))}};Shopware.Service().register("fieldRolesService",()=>new C(Shopware.Application.getContainer("init").httpClient,Shopware.Service("loginService")));var S=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{% 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:w,Mixin:v}=Shopware;w.register("test-ftp-connection",{template:'\n {{ $tc(\'configuration.testFtpConnection.testConnection\') }}\n\n',mixins:[v.getByName("notification"),v.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 „
withServerUrl($this->config->getServerUrl()) - ->withCredentials(new Credentials(...$this->config->getCredentials())) + ->withApiKey($this->config->getApiKey()) ->withVersion($this->config->getVersion()) ->build(); $query = (string) parse_url($_SERVER['REQUEST_URI'] ?? '', PHP_URL_QUERY); diff --git a/src/Subscriber/ConfigurationSubscriber.php b/src/Subscriber/ConfigurationSubscriber.php index b1c3fcaa..ca9fe5d3 100755 --- a/src/Subscriber/ConfigurationSubscriber.php +++ b/src/Subscriber/ConfigurationSubscriber.php @@ -56,8 +56,6 @@ public function onPageLoaded(ShopwareSalesChannelEvent $event): void 'url' => $this->getServerUrl(), 'channel' => $this->config->getChannel($salesChannelId), 'apiKey' => $this->config->getApiKey(), - 'version' => $this->config->getVersion(), - 'api' => $this->config->getApiVersion(), 'currencyCode' => $event->getSalesChannelContext()->getCurrency()->getIsoCode(), 'currencyCountryCode' => $event->getRequest()->getLocale(), ]; diff --git a/src/Utilites/Ssr/SearchAdapter.php b/src/Utilites/Ssr/SearchAdapter.php index 1e3daad9..a2722ac4 100644 --- a/src/Utilites/Ssr/SearchAdapter.php +++ b/src/Utilites/Ssr/SearchAdapter.php @@ -6,7 +6,6 @@ use Omikron\FactFinder\Communication\Client\ClientBuilder; use Omikron\FactFinder\Communication\Client\ClientException; -use Omikron\FactFinder\Communication\Credentials; use Omikron\FactFinder\Shopware6\Config\Communication; use Psr\Http\Message\ResponseInterface; @@ -33,7 +32,7 @@ public function search( ): array { $client = $this->clientBuilder ->withServerUrl($this->config->getServerUrl()) - ->withCredentials(new Credentials(...$this->config->getCredentials())) + ->withApiKey($this->config->getApiKey()) ->withVersion($this->config->getVersion()) ->build();