Skip to content

Add SalesChannelContext to CleverPushWorkerJsController#4

Open
M-arcus wants to merge 1 commit intocleverpush:masterfrom
M-arcus:patch-1
Open

Add SalesChannelContext to CleverPushWorkerJsController#4
M-arcus wants to merge 1 commit intocleverpush:masterfrom
M-arcus:patch-1

Conversation

@M-arcus
Copy link
Copy Markdown
Contributor

@M-arcus M-arcus commented Mar 31, 2026

This pull request updates the CleverPushWorkerJsController to 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:

  • The showCleverPushWorkerJs method now accepts a SalesChannelContext parameter, enabling sales channel–specific logic.
  • The CleverPush Channel ID is now fetched using the current sales channel's ID, ensuring the correct configuration is used for each sales channel.

Dependency Import:

  • Added an import for SalesChannelContext to 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.js now receives SalesChannelContext and uses it to fetch CleverPushShopwarePlugin.config.channelId scoped 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.

  • Bug Fixes
    • showCleverPushWorkerJs now accepts SalesChannelContext and reads CleverPushShopwarePlugin.config.channelId using the current sales channel ID.
    • Added SalesChannelContext import for type hinting.

Written for commit bdfebbe. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant