Setting Up Product Category Questions & Answers for your Ecommerce Store
Answerbase supports the ability to not only have product page questions and answers, but you can also put questions and answers on your product category pages. This helps you accomplish the following:
This article will give an overview of how to set up Product Category Questions & Answers for your store.
1) Ensure Your Product Categories are Reflected in Answerbase
You'll need to make sure that Answerbase can know and recognize what product categories you support. To determine whether Answerbase has your categories recognized and saved, go to "System Settings > Ecommerce Module > Categorization" and see if your product categories are already reflected there. If they are, they should display with the category name as well as Answerbase's ID for the category....and the unique ID that your ecommerce platform has given to that category...as seen here:
If you see your product categories already reflected, then Answerbase has what it needs and you can continue to the next step.
If you don't see your product categories reflected....we'll need to get those synced with your ecommerce platform so we know what your product category names are and their unique IDs. Depending on how many product categories you're managing and how often they change....many stores choose to just manually add those categories within the Answerbase Administration Portal by clicking the "Add New Category" button in the above screenshot.
If you have a larger number of categories or want to have those synced automatically with your platform, Answerbase can automatically sync those depending on your platform you're on....so please Contact Us about that option and we'll direct you appropriately based on your needs.
Once your categories are added effectively, go to the next step.
2) Copy the Answerbase Q&A Widget Code
Go to your Answerbase Administration Portal under "Integration > Q&A Widget" as seen here:
That will take you to where you can see your widget code....where you can copy your code.
3) Install the Answerbase Q&A Widget on Your Product Category Pages
Go to the template on your product page where you want the Q&A widget integrated into and paste the widget code on the bottom of the page, just before the </body> tag. In order to effectively manage a product category page integration, you'll want to define the following parameters within your widget code:
Your code may look something similar to this when you're done:
When you're done inserting your widget to your template, save and go to your Product Category Page to test.
4) Test Posting a Product Category Question
You want to post a test question to test and ensure everything is working as it should. Go to your Product Category Page where the widget is displaying and post a test question. Since you've identified what Product Category the page is related to within your Q&A widget parameters....you should be able to post a new question where you don't have to identify what category the question is related to....it will make that association automatically for you.
COMMON BUG NOTE: If you get a validation message letting you know that you must associate a category to your question, Answerbase isn't recognizing the "data-external-product-category-id" parameter that your page is populating so double check that you're effectively populating that parameter within your code when the page loads.
After you've successfully posted a question, go to your Answerbase Administration Portal under "Content > Questions" and click into the question that you just posted. On the right side you'll see the "Product" association to the question and you should confirm that it has successfully associated the appropriate product category to that question. See example here:
If you see the appropriate category associated, you should be set from there. Your customers will be able to ask their product category questions and your moderators will receive notifications when new questions are asked. The widget on your product category pages will also start to reflect the product category questions and answers that have already been asked and answered.....to let future visitors see that content and building the SEO value of those pages with original content.
If you have any questions about Product Category Questions & Answers, please Contact Us and we'll ensure you're taken care of.
- Enhance the content on your product category pages for SEO
- Engage your visitors on your product category pages if they have questions related to which product fits their needs best.
This article will give an overview of how to set up Product Category Questions & Answers for your store.
1) Ensure Your Product Categories are Reflected in Answerbase
You'll need to make sure that Answerbase can know and recognize what product categories you support. To determine whether Answerbase has your categories recognized and saved, go to "System Settings > Ecommerce Module > Categorization" and see if your product categories are already reflected there. If they are, they should display with the category name as well as Answerbase's ID for the category....and the unique ID that your ecommerce platform has given to that category...as seen here:
If you see your product categories already reflected, then Answerbase has what it needs and you can continue to the next step.
If you don't see your product categories reflected....we'll need to get those synced with your ecommerce platform so we know what your product category names are and their unique IDs. Depending on how many product categories you're managing and how often they change....many stores choose to just manually add those categories within the Answerbase Administration Portal by clicking the "Add New Category" button in the above screenshot.
If you have a larger number of categories or want to have those synced automatically with your platform, Answerbase can automatically sync those depending on your platform you're on....so please Contact Us about that option and we'll direct you appropriately based on your needs.
Once your categories are added effectively, go to the next step.
2) Copy the Answerbase Q&A Widget Code
Go to your Answerbase Administration Portal under "Integration > Q&A Widget" as seen here:
That will take you to where you can see your widget code....where you can copy your code.
3) Install the Answerbase Q&A Widget on Your Product Category Pages
Go to the template on your product page where you want the Q&A widget integrated into and paste the widget code on the bottom of the page, just before the </body> tag. In order to effectively manage a product category page integration, you'll want to define the following parameters within your widget code:
- data-insert-after: This attribute will be used if you want to insert the widget AFTER the element of reference you define as the attribute. This attribute represents a "CSS selector", which means you can use an ID of an element, a CLASS NAME or any other CSS-style way of identifying an element. For example, if you specify "#description" as its value, it means you want to use the element whose ID equals "description" as a reference. If you specify ".description", it means you want to use the element that includes "description" as one of its classes. If you define this attribute, you should not define the "data-insert-before" attribute, as only one of them can be used.
- IMPORTANT FORMATTING NOTES:
- Using Class Attribute: If you use a class name, you need to prefix class name with a “dot” so if your div tag is <div class="product-single__description rte"> then you need to define ".product-single__description" in the field. If there are multiple class names, they also must be joined by dots....so a div tag <div class="product-single__description rte"> would need to define ".product-single__description.rte" in the text field.
- Using ID Attribute: If using an ID, you have to prefix the ID with a “#”, so if your div tag is <div id="product-single__description"> then your field would have "#product-single__description" populated to be correct.
- IMPORTANT FORMATTING NOTES:
- data-external-product-category-id: This parameter controls what list of questions will be displayed, and gives you the option to only display content associated with a specific product category. The value of this parameter will be the unique ID of the product category you'd like displayed as identified on your site. You'll need to ensure that Answerbase is getting that value in order to effectively utilize this parameter as mentioned above, and you'll be able to see the value that needs to be reflected within your Answerbase Administration Portal under the "External ID" column when looking at your ecommerce categories:
Your code may look something similar to this when you're done:
<script type="text/javascript" src="https://help.services.answerbase.com/javascript/widget/full-featured-widget.min.js"
data-insert-after=".ProductCategoryTable"
data-external-product-category-id="ex1001"
defer>
</script>
If you're looking for other configuration options to configure your product category page Q&A widget, see the Full List of Q&A Widget Parameters.
When you're done inserting your widget to your template, save and go to your Product Category Page to test.
4) Test Posting a Product Category Question
You want to post a test question to test and ensure everything is working as it should. Go to your Product Category Page where the widget is displaying and post a test question. Since you've identified what Product Category the page is related to within your Q&A widget parameters....you should be able to post a new question where you don't have to identify what category the question is related to....it will make that association automatically for you.
COMMON BUG NOTE: If you get a validation message letting you know that you must associate a category to your question, Answerbase isn't recognizing the "data-external-product-category-id" parameter that your page is populating so double check that you're effectively populating that parameter within your code when the page loads.
After you've successfully posted a question, go to your Answerbase Administration Portal under "Content > Questions" and click into the question that you just posted. On the right side you'll see the "Product" association to the question and you should confirm that it has successfully associated the appropriate product category to that question. See example here:
If you see the appropriate category associated, you should be set from there. Your customers will be able to ask their product category questions and your moderators will receive notifications when new questions are asked. The widget on your product category pages will also start to reflect the product category questions and answers that have already been asked and answered.....to let future visitors see that content and building the SEO value of those pages with original content.
If you have any questions about Product Category Questions & Answers, please Contact Us and we'll ensure you're taken care of.