Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LYNX-718: Sidekick Personalisation plugin - Catalog Rules, Cart Rules and Customer Groups #287

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

bl4de
Copy link
Collaborator

@bl4de bl4de commented Jan 29, 2025

This PR implements selection for Customer Groups, Catalog Rules and Cart Rules in Sidekick Personalisation Plugin
See https://jira.corp.adobe.com/browse/LYNX-718 for details

Test URLs:

Copy link

aem-code-sync bot commented Jan 29, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Jan 29, 2025

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

'key': 'catalogRules',
'title': 'Catalog Rules',
'initializer': getCatalogRules,
},
// {
// 'key': 'utmParams',
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't have to list utm_params in the plugin

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is just a placeholder based on the description from https://jira.corp.adobe.com/browse/LYNX-671, removed for now.

'Content-Type': 'application/json',
'x-api-key': config['commerce.headers.cs.x-api-key'],
'Magento-Customer-Group': config['commerce.headers.cs.Magento-Customer-Group'],
'Magento-Environment-Id': config['commerce.headers.cs.Magento-Environment-Id'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not all headers are neccessary for Adobe Commerce

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed unnecessary headers.

'Magento-Website-Code': config['commerce.headers.cs.Magento-Website-Code'],
};

const apiCall = new URL(config['commerce-core-endpoint']);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd use import { getConfigValue } from '../../scripts/configs.js'; and await getConfigValue('commerce-core-endpoint')

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@bl4de bl4de marked this pull request as ready for review January 30, 2025 16:27
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.

2 participants