Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Develo Sense FAQ Module for Magento 2

This module integrates with an external FAQ API to display category-specific FAQs on Magento category pages.

Features

  • Displays FAQs specific to each category
  • Accordion-style open/close functionality
  • Schema.org rich snippets for better SEO
  • Configurable styles (colors and font size from API)
  • Caching mechanism for improved performance
  • Multiple display positions

Requirements

  • PHP 8.1, 8.2 or 8.3
  • Magento 2.4.x

Installation

Using Composer (recommended)

  1. Add the repository to your Magento 2 composer.json:
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/develodesign/develosense-magento2"
    }
]
  1. Require the module:
composer require develo/module-sense
  1. Enable the module:
bin/magento module:enable Develo_Sense
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:clean

Manual Installation

  1. Create the following directory: app/code/Develo/Sense
  2. Clone this repository into that directory:
git clone https://github.com/yourusername/develo-module-sense.git app/code/Develo/Sense
  1. Enable the module:
bin/magento module:enable Develo_Sense
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:clean

Configuration

Navigate to Stores > Configuration > Develo Extensions > Sense FAQ Settings

General Settings

  • Enable FAQ Display: Enable or disable the FAQ module
  • API URL: The base URL for the FAQ API (without trailing slash)
  • Integration ID: The integration ID used for API calls
  • Cache Lifetime: How long to cache API responses (in seconds)

Appearance Settings

  • FAQ Section Title: The heading displayed above the FAQs
  • Display Position: Where to display the FAQs (top of content, bottom of content, or sidebar)

API Integration

The module expects the Laravel FAQ API to return data in the following format:

{
    "category": {
        "id": 1,
        "name": "Category Name"
    },
    "faqs": [
        {
            "question": "Frequently Asked Question?",
            "answer": "The answer to the question."
        }
    ],
    "styles": {
        "primaryColor": "#333333",
        "secondaryColor": "#f5f5f5",
        "fontSize": "16px"
    }
}

Troubleshooting

  • Check the system.log and exception.log files if FAQs are not displaying
  • Verify the API URL and integration ID are correct
  • Ensure categories have the correct external ID mapping
  • Check if the API is returning valid data by testing directly in a browser

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This module is licensed under the Open Software License v. 3.0 (OSL-3.0)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages