Konbini elements
Learn how to use Konbini elements.
With DigitalRiver.js, you can create a Konbini element that will automatically retrieve and build a select dropdown that can be styled and placed on your page like other DigitalRiver.js elements.
Creating a Konbini element
To create a Konbini element, you should use the createElement function exposed through the DigitalRiver object. This object follows the same pattern and allows for the same custom classes and styles as other elements.
Konbini element functions
konbini.mount();
Call this function to place the created Konbini element on your page.
konbini.unmount();
Call this function to remove the Konbini element from your page. The element may be re-added to your page by calling mount()
.
konbini.destroy();
Call this function to remove the Konbini element from your page as well as remove its functionality. You cannot re-add the destroyed element to your page via mount()
.
konbini.update();
Call this function to update the Konbini element's data.
Konbini element events - konbini.on('event', handler);
Use this functionality to monitor events that can be used to build and enhance your purchase flow.
Ready
The Ready event triggers when the Konbini Element has loaded and is available to take an update()
call.
In addition to the type of element returned in the ready function, the online banking element returns hasAvailableBanks
. This Boolean reflects whether the currency and country combination specified has banks available for payment. If this is false, there are no banks available for payment.
Focus
A Focus event triggers when the element gains focus.
Blur
A Blur event triggers when the Konbini element no longer has focus.
Change
A Change event triggers when the Konbin element's state has changed. When using this element, you will only receive this event when the customer selects a store.
In this flow, you can use the createSource
method to create a source using the Konbini element.
Last updated