Skip to content

getConsentsSettings()

The getConsentsSettings method is used to get a ConsentsSettings object that represents settings for cookies consents and privacy policy popup in the storefront.

Returned value

The ConsentsSettings object.

Example

source
{% set settings = ObjectApi.getConsentsSettings() %}
{% if settings.hasPrivacyPolicy %}
    <a href="{{ settings.privacyPolicyLink }}">{{ settings.privacyPolicyLinkDescription }}</a>
{% endif %}
output
<a href="/en/i/some-page/11>Privacy Policy</a>