Add SalesChannelContext to CleverPushWorkerJsController#4
Open
M-arcus wants to merge 1 commit intocleverpush:masterfrom
Open
Add SalesChannelContext to CleverPushWorkerJsController#4M-arcus wants to merge 1 commit intocleverpush:masterfrom
M-arcus wants to merge 1 commit intocleverpush:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the
CleverPushWorkerJsControllerto ensure that the CleverPush Channel ID is retrieved in a sales channel–aware manner. This improves the controller's ability to serve the correct configuration based on the current sales channel context.Key changes:
Sales Channel Context Integration:
showCleverPushWorkerJsmethod now accepts aSalesChannelContextparameter, enabling sales channel–specific logic.Dependency Import:
SalesChannelContextto support type hinting in the controller method.Note
Low Risk
Low risk, small controller change; behavior shifts to sales-channel-specific config lookup which could change which worker script is served in multi-channel setups.
Overview
/cleverpush-worker.jsnow receivesSalesChannelContextand uses it to fetchCleverPushShopwarePlugin.config.channelIdscoped to the current sales channel.This changes the generated worker script to be sales-channel aware rather than using the global system config value.
Written by Cursor Bugbot for commit bdfebbe. This will update automatically on new commits. Configure here.
Summary by cubic
Make the CleverPush worker JS controller sales channel–aware so it returns the correct Channel ID per sales channel. Fixes incorrect config in multi-channel setups.
showCleverPushWorkerJsnow acceptsSalesChannelContextand readsCleverPushShopwarePlugin.config.channelIdusing the current sales channel ID.SalesChannelContextimport for type hinting.Written for commit bdfebbe. Summary will update on new commits.