Skip to content

ConsentsSettings

The ConsentsSettings object represents settings for cookies consents and privacy policy popup in the storefront

classDiagram
  direction LR
  ConsentsSettings --> Page
  ConsentsSettings --> Url
  class ConsentsSettings{
    bool isCookieInformationEnabled
    string headingHeader
    string headingContent
    string cookiesPolicyHeader
    string cookiesPolicyDescription
    string necessaryCookiesDescription
    string functionalCookiesDescription
    string analyticalCookiesDescription
    string platformCookiesDescription
    string marketingCookiesDescription
    bool hasPrivacyPolicy
    Page privacyPolicyPage
    string privacyPolicyLinkDescription
    Url privacyPolicyLink
  }
  class Page{
  }
  class Url{
  }

Properties

Attribute name Type Description
isCookieInformationEnabled bool Indicates whether the cookie information is enabled.
headingHeader string The header of the heading.
headingContent string The HTML content of the heading.
cookiesPolicyHeader string The header of the cookies policy.
cookiesPolicyDescription string The HTML content of the cookies policy.
necessaryCookiesDescription string The HTML content of the necessary cookies description.
functionalCookiesDescription string The HTML content of the functional cookies description.
analyticalCookiesDescription string The HTML content of the analytical cookies description.
platformCookiesDescription string The HTML content of the platform cookies description.
marketingCookiesDescription string The HTML content of the marketing cookies description.
hasPrivacyPolicy bool Indicates whether there is privacy policy information page in the storefront.
privacyPolicyPage Page Reference to the Page object that provides information about the privacy policy page.
privacyPolicyLinkDescription string The description of the privacy policy link.
privacyPolicyLink Url Reference to the Url object that provides information about the privacy policy page link.

Examples

headingHeader property

{{ consentsSettings.headingHeader }}
Consents header

headingContent property

Note

The content of this property is a HTML string. To render it properly you need to apply raw filter.

{{ consentsSettings.headingContent|raw }}
Consents header content

cookiesPolicyHeader property

{{ consentsSettings.cookiesPolicyHeader|raw }}
Cookies policy header

cookiesPolicyDescription property

Note

The content of this property is a HTML string. To render it properly you need to apply raw filter.

{{ consentsSettings.cookiesPolicyDescription|raw }}
Cookies policy description

necessaryCookiesDescription property

Note

The content of this property is a HTML string. To render it properly you need to apply raw filter.

{{ consentsSettings.necessaryCookiesDescription|raw }}
Description of necessary cookies

functionalCookiesDescription property

Note

The content of this property is a HTML string. To render it properly you need to apply raw filter.

{{ consentsSettings.functionalCookiesDescription|raw }}
Description of functional cookies

analyticalCookiesDescription property

Note

The content of this property is a HTML string. To render it properly you need to apply raw filter.

{{ consentsSettings.analyticalCookiesDescription|raw }}
Description of analytical cookies

platformCookiesDescription property

Note

The content of this property is a HTML string. To render it properly you need to apply raw filter.

{{ consentsSettings.platformCookiesDescription|raw }}
Description of platform cookies

marketingCookiesDescription property

Note

The content of this property is a HTML string. To render it properly you need to apply raw filter.

{{ consentsSettings.marketingCookiesDescription|raw }}
Description of marketing cookies

hasPrivacyPolicy property

{{ consentsSettings.hasPrivacyPolicy }}
true

privacyPolicyPage property

{{ consentsSettings.privacyPolicyPage.name }}
Consents page

privacyPolicyLinkDescription property

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