Buyer info component
Learn how to use the Buyer Info component.
Last updated
Learn how to use the Buyer Info component.
Last updated
Use this drb2b_buyerInfo
component with the drb2b_taxCertificateCheckout
component. The drb2b_buyerInfo
publishes an event and the listens for the event triggered by the drb2b_buyerInfo
component. The drb2b_taxCertificateCheckout
is dependent on drb2b_buyerInfo
component.
If you use a custom component instead of the drb2b_buyerinfo
component, you must:
Populate the following fields in the WebCart
object:
Buyer_Name__c
Buyer_Email__c
Buyer_Phone__c
BillingAddress
DR_Customer_Type__c
Provide the selected ship-to contact point address ID to the OOTB flow which populates the ship-to address on the Cart Delivery Group object.
from the custom component using LMS (Lightning Message Service) as drb2b_taxCertificateCheckout
is dependent on this component.
This section provides information on publishing events with using this component.
Import the TaxCertificateMessageChannel__c
message channel and message service into a custom JavaScript file.
Declare the message context variable as shown below.
Declare the messageContext
variable as shown below.
To enable the drb2b_taxCertificateCheckout
component, set the showLink
value to true
when publishing the event.
Use the following steps to publish various event types. The event purpose and payload will vary depending on your use case.
Import theDigitalRiverMessageChannel__c
message channel and message service into a custom JavaScript file as shown below.
Declare the message context variable as shown below.
Publish the event.
The following table provides more information on the component events.
toggleShowBIComponent
{"isShow":true}
Publish this event to show {"isShow":true}
or hide {"isShow":false}
the Buyer Info component.
saveBuyerInfo
n/a
Publish this event to perform validation of the information entered into the buyer info component and save the data to the cart.
If publishing this event, you must also subscribe to the contactPointAddressId event to get back the saved Contact Point Address Id.
Use this event if the OOTB Next button is disabled.
You can use this event to have the saved Contact Point Address Id returned back after the buyer information is saved using the saveBuyerInfo purpose. You use this value to update the Cart Delivery Group as appropriate. Complete the following tasks to subscribe to the event.
Import the DigitalRiverMessageChannel__c
message channel and message service into a custom JavaScript file as shown below.
Declare the message context variable as shown below.
Declare methods as shown below to get the Contact Point Address Id.
The following is an example of the message format:
Call a declared method in the connectedCallback method as shown below: