Compliance element
Gain a better understanding of what the compliance element does and how to use it.
Last updated
Gain a better understanding of what the compliance element does and how to use it.
Last updated
The compliance element displays the facilitating a transaction and renders links to applicable disclosures, such as terms of sale, cookie policies, and cancellation rights.
This page provides information on how to , , , , , and the element.
mount()
Call this function to place the created compliance element on your page.
unmount()
destroy()
update()
classes
compliance
For example, the following configuration results in the compliance element displaying the required disclosures, translated into Spanish, when customers shop in Germany, and Digital River Ireland Ltd. facilitates the transaction.
language
This required string determines the language of the text displayed in the element as well as the linked-to disclosure documents. The value you assign language
doesn't affect what disclosures are displayed, only how their text is rendered.
country
entity
jpCommerceLawPageUrl
If compliance.country
is jp
, then the element displays a link to a disclosure that pertains to Japanese commercial transaction law.
If you'd like to replace the default URL behind this link with your own, use jpCommerceLawPageUrl
.
To create a compliance element, pass 'compliance'
and its to createElement()
, which is exposed by the .
Call this function to remove the compliance element from your page. The element may be re-added to your page by calling .
Call this function to remove both the compliance element and its functionality from your page. You cannot re-add a destroyed element to your page via .
To refresh the compliance element, pass its to update()
.
The compliance element's configuration object contains a nested and .
To stylize the compliance element, define the optional classes
. For details, refer to .
The compliance
object consists of a , , and , all of which are required to make the element behave properly. Giving Digital River this data increases the probability that customers are shown accurately translated disclosures that apply to their shopping country.
For a list of accepted values, refer to .
A required string, formatted as an code, represents the customer's shopping country. Since legal requirements vary slightly from country to country, the value you assign to this property determines which specific disclosures are rendered in the element. For example, some country
values display a link to the customer's cancellation rights, while others do not.
If the transaction involves , country
should ideally be the same as the customer’s ship to country. If customers only purchase , you can use their billing country.
A required string that represents the transaction's designated . Like compliance.country
, this property affects which disclosures are displayed in the element.
In , you can find this value in sellingEntity.id
.
For a list of accepted values, refer to .