Displaying a Separate Q&A Widget (Legacy)
- DarkLight
Displaying a Separate Q&A Widget (Legacy)
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
This feature allows you to use the Q&A section separately from the Reviews Widget. By default, the two appear together, however you may want to have individual tabs or only the Q&A widget without the Reviews widget.
Is this article for me?
If you're using the new version of the Q&A Widget, see Customizing the Q&A Widget
Please note:
The look and feel of the Q&A dedicated widget is controlled by the Reviews Widget, even if you do not use the Reviews Widget.
Displaying the Q&A widget separately
- From your Yotpo Reviews main menu, go to On-Site Widgets.
- Click Q&A.
- Check the I’d like to have a separated Q&A widget checkbox.
- Click Generate Code.
- Copy the code snippet.
- Paste the code in the desired place in your store.
- Make sure to save the changes.
Please note:
Replace the values in the code snippet with the appropriate values for your website and products.The data-product-id attribute only supports alphanumeric (a...z, A...Z, 0...9) and "_" and "-" symbols
BigCommerce instructions
- Log into your BigCommerce admin.
- Click Script Manager.
- Click Create a Script.
- Choose the following options:
- Location on Page - Footer
- Select pages where script will be added - All pages (recommended)
- Script Category - Essential (recommended)
- Script Type - Script
- Paste the following code in the open script fields:JavaScript
<script type="text/javascript">//<![CDATA[ var div = document.createElement("div"); div.setAttribute('class', 'yotpo yotpo-main-widget'); div.setAttribute('data-product-id',"{{product.id}}"); div.setAttribute('data-name',"{{product.title}}"); div.setAttribute('data-url', document.URL); div.setAttribute('data-description',""); div.setAttribute('data-image-url', "{{getImage product.main_image 'product'}}"); div.setAttribute('data-mode', "questions"); document.querySelectorAll('.productView')[0].appendChild(div) //]]> </script>
- Click Save.
Your customers will now see a dedicated widget for questions and answers.
Volusion instructions
- Copy the code snippet and paste it in your product pages.
- Click Save Changes at the bottom of the screen.
Generic platform instructions
- Copy the code snippet and paste it in your product pages.
- Click Save Changes at the bottom of the screen.
Was this article helpful?