How to setup manually Q&A block instead of theme app block
Learn more and install our app Askify - Questions & Answers for your shopify store.
Most of the features will be available just by installing the app and then enabling it. The following code is not always needed.
Steps for Manual Integration:
-
Create the File:
- In your theme's snippets directory, create a new file named
ac-pqa.liquid
.
- In your theme's snippets directory, create a new file named
-
Add the Code:
- Paste the below code into that file and save it.
<div id="ac-pqa-qa-block" class="page-width">Questions & Answers loading...</div>
<script>
const acqaLiquidData = {
product_id: '{{ product.id | default: 0 }}',
product_title: `{{ product.title | default: "Unknown Title" }}`,
product_image: '{{ product.featured_image | default: "" }}',
product_handle: '{{ product.handle | default: "" }}',
page_template: '{{ template | default: "" }}',
customer_accounts_enabled: '{{ shop.customer_accounts_enabled | default: false }}',
customer_id: '{{ customer.id | default: 0 }}',
customer_name: '{{ customer.first_name | default: "" }}',
customer_email: '{{ customer.email | default: "" }}',
shop_url: '{{ shop.url | default: "" }}',
login_url: '{{ routes.account_login_url }}',
};
</script>
<script src='https://cdn.appifycommerce.com/apps/shopify/pqa/js/ac-pqa-bundle.js?v=1125' defer></script>
-
Render the file:
-
Render the file into the code where you want our block to appear.
{% render 'ac-pqa' %}
-
Contact Us at support@appifycommerce.com for any queries or assistance.