Skip to content

Expert Settings

The plugin offers a few advanced settings that are not part of the plugin configuration in the administration. Instead, they are controlled via environment variables (ENV) of the shop.

For experienced users only

These settings are intended for developers and experienced users with server access.

Setup

The environment variables are defined in the .env or .env.local file in the shop's root directory (or directly in the server or container environment).

Don't forget to clear the cache

After changing an environment variable, the shop cache must be cleared for the change to take effect:

bin/console cache:clear

Available environment variables

AMAZON_PAY_BUTTON_CONSIDER_RULES

Default: 0 (disabled)

When enabled, the Amazon Pay express button is only displayed if the availability rule assigned to the "Amazon Pay" payment method (configurable under Settings » Payment methods » Amazon Pay) resolves positively in the customer's current context.

This allows you to restrict the express button to certain customer groups, cart values or currencies, for example. The same rule is applied that also controls the availability of the payment method in the checkout.

The check applies to all placements of the express button:

  • Product detail page
  • Product listings (category and search pages)
  • Cart and offcanvas cart
  • Checkout registration page

If no availability rule is assigned to the payment method, the button is displayed as usual. The Amazon login button on the registration page is not affected by this setting.

Note on rule evaluation

Since the button is displayed in all areas of the shop, certain criteria such as the address or the cart value (for the button on the product detail page) may not be correctly available. The rule should therefore only contain criteria that can be determined correctly in a global context.

AMAZON_PAY_NO_GUESTS

Default: 0 (disabled)

By default, customers who order via the Amazon Pay express checkout and do not have a customer account yet are created as guest customers.

When this variable is enabled, a full customer account is always created instead.