All Collections
Installation & Setup
Advanced Customizations
Different Methods of Showing the Add to Quote button on only specific products
Different Methods of Showing the Add to Quote button on only specific products

This is not an exact how-to, but rather a guide on how to accomplish restricting the button based on various parameters.

Kenzie avatar
Written by Kenzie
Updated over a week ago

☞Note: Much of what's discussed here will likely require the help of a developer.

Showing the Add to Quote button on only specific products.

  • In general, we discourage showing the Add to Quote button on only specific products as it creates a fragmented user experience. ie: They want to get a quote on 2 items, yet there is only a button on one of them.

  • If you are going to limit which products get the button, it's best to change the button text to "Request Quote."

Method 1 - Use Custom Template Layout File

  • Use BigCommerce's custom product display page (PDP) templates.

  • This will require making a copy of the page template you wish to use, and recompiling of the theme.

  • Once you have the custom product page template, you can hardcode in the B2B Ninja product page button. [How to hard-code the PDP button]

  • After your custom PDP is live, you can select it while editing a product in BigCommerce under Other Details > Template Layout File.

  • If the majority of your products will have a quote button, it often makes sense to hard-code the button to the default template, and use the custom template to "turn-off" the quote button.

Limitations

Method 2 - Utilize Custom Fields and a Custom Script

  • With this method, you add custom fields to the product that trigger hiding or showing our button, and can also be used to manipulate other items like the price and Add to Cart buttons.

  • This is typically the most flexible, as you can bulk import the Custom Fields via import/export, or the API.

  • You will need to write a script that controls what happens based on your input (custom fields)

  • The script will generally hide these custom fields when detected, so they are not shown to the customer.

Popular Uses:

  • HideAddToCart

  • HideAddToQuote

  • HideAddToCartAndPrice

  • ShowAddToQuote

  • ShowAddToQuoteHideAddToCart

These are just samples, and would typically be the Custom Field Label with a value of true. The script is generally looking for the custom field label, and depending on how you set it up, you can also use the value as well.

☞Note: If you choose to use custom fields to hide the price on he PDP, it does not mean that it's hidden from category blocks, search, etc. These are theme level settings / design items that will need to be considered. The pricing will also show on our Quote Form. You can submit a request for us to hide the pricing on the form by chatting us.

Showing the Add to Quote Button to only specific Customer Groups

Method 1 - Edit the PDP Page Template File(s)

  • If you are only showing the button to 1 or 2 customer groups, then it's likely easiest to hardcode our button to your PDP with an IF statement that it only shows when a specific customer group ID is detected.

Method 2 - Utilize a custom script to control the display

  • Use a custom script that hides the button until a customer group ID from a list you've created is detected

☞Note: This could also be done using specific customer IDs, but is probably too granular of a level for most users, and much less flexible in the long run. By using customer groups, it's much quicker to manage which customers get to see what, and easier to add new customers to a view.

Did this answer your question?