Conditionally Show Resolve At Checkout
Overview
If you manage a unified B2C and B2B storefront and wish to display the Resolve payment method exclusively for approved B2B customers, or if you want to restrict Resolve for certain customer groups, the following guide details how to show the Resolve payment method only for certain customer groups in BigCommerce.
The following steps require familiarity with JavaScript
Create a Customer Group
From the BigCommerce Control Panel, navigate to Customers > Customer Groups
If you do not have an existing customer group that you want to use, create a new group by selecting + Create new
Enter a name for the customer group and save
Select the newly created customer group, take note of the url structure as it includes the Customer Group ID that you will need for the checkout script.
The URL structure should appear like this: https://{store}.mybigcommerce.com/manage/customers/groups/{id}/edit
. We will be using the id
for our custom script below.
Create a Script
Navigate to Script Manager either from Storefront > Script Manager or (with multiple channels) Channels > Scripts (Accessed through Quick Links)
Select Create a script
Enter a name for the script and ensure the following is selected:
Placement: Footer
Location: Checkout
Script category: Essential
Script type: Script
Under script contents, add the following script. Ensure you are replacing
allowedGroupId
with the correct Customer Group ID that you want to restrict. Select Save after finalizing the script.
Upon checkout completion, only customers in the specified group will see the Resolve option. Customers without an account (guest customers), will not be able to checkout with Resolve.
Last updated
Was this helpful?