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

Platform Selection AddToCart #1203

Open
korgon opened this issue Nov 15, 2024 · 1 comment
Open

Platform Selection AddToCart #1203

korgon opened this issue Nov 15, 2024 · 1 comment
Assignees
Labels
critical Should be fixed ASAP type: feature New functionality

Comments

@korgon
Copy link
Contributor

korgon commented Nov 15, 2024

The Bundle Recommendation component (and its variations) require an onAddToCart prop - however when Snap Templates uses these components it does not provide the prop. We should look into how we might wire up our standard "Big 3" platforms automatically (using platform functions).

For custom functions we could possibly allow for providing these via the Snap Templates config or perhaps we could register a custom addToCart function in Snap Templates config via a custom plugin for addToCart that takes a function (custom code to run when buttons are clicked) as a parameter.

For all cases, we should likely allow for the addToCart function (either platform package provided or custom) to be accessible to all future components (even custom product cards). This could be something that could exist in the TemplatesStore (library) that could be pulled in dynamically and then connected via a theme overlay that is added into each theme (similar to currency and language).

@korgon korgon added type: feature New functionality critical Should be fixed ASAP labels Nov 15, 2024
@korgon korgon added this to the Snap Templates milestone Nov 15, 2024
@chrisFrazier77 chrisFrazier77 self-assigned this Nov 19, 2024
@korgon
Copy link
Contributor Author

korgon commented Dec 12, 2024

Should a plugin be allowed to have multiple plugins and configs inside of it? Or should a plugin do a single thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical Should be fixed ASAP type: feature New functionality
Projects
None yet
Development

No branches or pull requests

2 participants