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

Move static options object to AddToCartButton props #147

Open
enriquebeta6 opened this issue Jul 6, 2023 · 0 comments
Open

Move static options object to AddToCartButton props #147

enriquebeta6 opened this issue Jul 6, 2023 · 0 comments

Comments

@enriquebeta6
Copy link

Is your feature request related to a problem? Please describe.
The minicart can show outdated prices when a store sets a default payment system like "Boleto" or "Pix" because the addItem functions its always called with these options:

const options = {
  allowedOutdatedData: ['paymentData'],
}

Describe the solution you'd like
Move these options to component props to allow overrides

Describe alternatives you've considered
Also can be a feature flag of store advancedSettings.

Additional context
You can test this behaviour following these steps:

  1. Update the orderForm config with this payload:
{
    "paymentConfiguration": {
        "requiresAuthenticationForPreAuthorizedPaymentOption": false,
        "allowInstallmentsMerge": null,
        "blockPaymentSession": null,
        "paymentSystemToCheckFirstInstallment": "6",
        "defaultPaymentSystemToApplyOnUserOrderForm": {
            "installment": 1,
            "paymentSystemId": "6"
        }
    },
    "taxConfiguration": null,
    "minimumQuantityAccumulatedForItems": 1,
    "decimalDigitsPrecision": 2,
    "minimumValueAccumulated": 0,
    "apps": [],
    "allowMultipleDeliveries": false,
    "allowManualPrice": true,
    "savePersonalDataAsOptIn": false,
    "maxNumberOfWhiteLabelSellers": null,
    "maskFirstPurchaseData": null,
    "recaptchaValidation": null,
    "recaptchaMinScore": null,
    "recaptchaKeys": null,
    "maskStateOnAddress": null
}
  1. Create a promotion of 5% linked to payment method "Boleto".
  2. Add a product to the minicart and validate if the price has the discount.
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

No branches or pull requests

1 participant