Accordion & Tabs
Documentation for OpenCart 3.x
Flexible block content management with 18 display types and Schema.org microdata support.
Version 3.0 — major update with a new activation system
If you are upgrading from a previous version of the module, please read this before downloading the new files:
- Version 3.0 is a major update with a new licensing system — it is effectively a new product.
- After installing the new files, an activation form will be displayed. The module will not work without an activation key.
- Owners of previous versions receive a 50% discount on purchasing v3.0.
- Old files continue to work without any restrictions — upgrading to v3.0 is not mandatory.
🚀 Quick Start — First 5 Steps
-
Install and enable the module Extensions → Modules → Accordion & Tabs → Install → Enable.
-
Add module to a layout Design → Layouts → select a layout (e.g. Home) → add Accordion & Tabs to a position (content_top, content_bottom, etc.).Skip this step if you plan to display blocks only via shortcodes.
-
Create your first block Click the "New" dropdown → "Generate a block in 1 click" — you'll get a ready example with content. Or "New: select type" for manual setup.
-
Set block relations In the block form, "Relations" tab: choose pages, customer groups, and devices for display.
-
Check on the frontend Open the target page and verify the block is displayed.
1. Displaying Blocks
Blocks can be displayed in two ways — via OpenCart layouts or via the shortcode system.
- Layouts — ideal when standard template positions (left, right, top, bottom) work for you and the block needs to appear on many pages of a given type.
- Shortcodes — ideal for inserting into product/category descriptions, articles, ocfilter pages, or twig template files.
1.1 Adding the Module to a Layout
When displaying via shortcode you do not need to add the module to any layout.
You can add the module to all layouts at once. If no block is linked to a page, the module will produce no output.
Layout-to-page mapping:
- Home page — Home (common/home)
- Contact — Contact (information/contact)
- Manufacturer list — Manufacturer (product/manufacturer)
- Manufacturer page — create layout product/manufacturer/info
- Cart — create layout checkout/cart
- Account — Account (account/%)
- Information page — information/information
- Category — Category (product/category)
- Product — Product (product/product)
1.2 Shortcode System
Every block has a shortcode. Copy it from the block list by clicking the </> icon in the block row. The shortcode is also visible in the "Relations" tab of the block form.
Two shortcode variants:
[ldev_question_block_id=1]— displays the block always wherever the shortcode appears (if the block is enabled).[ldev_question_block_id=1&rel=1]— displays the block only if its relations are satisfied. Useful when embedding shortcodes in twig template files.
Paste the shortcode in any admin text field (product description, category, article) or a twig file — the system substitutes the block automatically when the page renders.
1.3 Multiple Positions on One Page
Use shortcodes combined with the standard "HTML Content" module:
- Create several "HTML Content" module instances, each with a different shortcode in its description.
- In the layout, add these "HTML Content" modules to the desired positions — instead of the main Accordion & Tabs module.
Alternative — the "Append to selector" field (tab "Override output position"): specify a CSS selector and insertion method — the block will be moved there via JS after page load.
2. Block Relations
The "Relations", "Product relations", and "URL relations" tabs control where a block appears:
- A specific page — category, manufacturer, article
- Home, contact, cart, account, etc.
- Any URL or part of a URL ("URL relations" tab)
- A specific product or products filtered by parameters
- Login status and customer group
- Visitor device (mobile, tablet, desktop)
- Store (for multistore)
2.1 Product Relations
Options:
- Display for all products
- Specific products — selected manually
- Filter by parameters — the most powerful option
Filter by parameters lets you combine conditions:
- Example 1. Two conditions: (Manufacturer: Apple) + (Attribute: Cores = 8) OR (Quantity < 5). Block shows if at least one condition matches.
- Example 2. One condition with three parameters — block shows only if all three match simultaneously.
Available condition types: manufacturer, category, product name, discount (special), tag, attribute, product field (price, quantity, weight, etc.).
Comparison operators: =, !=, >, <, >=, <=, LIKE, BETWEEN, IS EMPTY, IS NOT EMPTY.
After adding a condition you can: click 👁 Preview to see how many products match; click ✏ Edit to reopen the condition for changes. The ? button next to "Add condition" opens a help panel with examples.
3. Blocks
3.1 Block Types
Select the type in the "Block type, design, settings" tab, field "Display style". Type-specific settings appear in the corresponding section to the right.
| Type | Description |
|---|---|
| Accordion (collapse) | Collapsible sections. Toggler, Expand/Collapse all, URL-hash deep-link, multi-column layout |
| Tabs (tabs) | Horizontal or vertical tabs with URL-hash deep-link support |
| Panel (panel) | Simple block with a heading and text, no interaction |
| Gallery (gallery) | Image grid or slider with popup, captions, aspect ratio support |
| Banner (banner) | Single banner or slider with captions over the image, overlay, animation |
| Grid (grid) | Content grid with cards: heading, text, image, buttons, hover effect |
| Popup (popup) | Modal window that opens on button or link click |
| Steps (steps) | Step-by-step guide or wizard |
| List (list) | Simple item list |
| Container (container) | Wrapper for third-party modules or arbitrary HTML via relations |
| Show more (show_more) | Content block with an expand button for hidden content |
| Menu (menu) | Navigation menu with dropdown submenu |
| Tooltip (tooltip) | Content block as a tooltip/popover |
| Timeline | Timeline strip. 8 dot shapes (circle/square/diamond/ring/hexagon/star/pin/cross), numbering, animation |
| Flip cards | Cards with 3D flip effect (hover / click / horizontal / vertical) |
| Counters (counter) | Animated number counters. Styles: plain / bar / circular. Triggered by scroll |
| Pricing table (pricing_table) | Grid cards for pricing plans. Accent color, "Popular" badge, feature list with check/cross marks, CTA buttons |
| Comparison table (comparison_table) | HTML comparison table for products or plans. Row labels from the "About" field, cell values from items, check/cross styling, CTA buttons in the footer row |
3.2 Block Fields and Items
Each block consists of items added via the + button in the "Data" tab. The number of items is unlimited.
How item fields are used depends on the block type:
- Accordion / Tabs — title = section/tab heading, text = content
- Banner — title = heading over image, text = text over image, image = the banner itself
- Flip card — title + image = front side; text + buttons = back side
- Counter — title = number, text = label/caption, marker = suffix (+, %, etc.)
Per-item options: image dimensions, device visibility, background and text color, column count (for grid / flip_card / counter). Each item can have up to 2 buttons with individual links.
3.3 Variables and Widgets
Output dynamic data from the store database (category name, product data, product lists, etc.) directly into block content. Available variables depend on the page where the block is displayed.
Usable in: block description, item title, item text.
Click "Insert variable" — a modal opens with a searchable list grouped by section. Select a variable, copy it, and paste it into the desired field. Some variable groups are only available on the corresponding page type (product variables — only on the product page).
Available variable groups:
- Product — name, price, special price, image, rating, weight, availability, reward points, minimum quantity, date added, views, description, manufacturer
- Category — name, description, product count
- Store — URL, phone, fax, currency
- Global — current year (
[current_year]), current date ([current_date])
Shortcode [ldev_countdown date="..."] — inserts a countdown timer to the specified date. Appearance is configured in module settings.
4. Block Management
4.1 Creating Blocks from Demo Data
Two entry points — the Demo ▾ button in the toolbar or "Not sure where to start? Generate a block in 1 click" in the "New" dropdown:
- Generate a block in 1 click — choose a type and variant; the system creates a block with sample content.
- Add all demo blocks — creates one demo block of each type at once. Great for first-time exploration.
Some types have multiple demo variants (e.g. different timeline or counter styles).
4.2 Export / Import / Backup
Available in the block list toolbar, in each row, and in the block edit form:
- ↓ Export — saves block content (names, texts, items) as a JSON file. No relations or block_id. For transferring content between stores.
- ☐ Backup — full dump with block_id and relations (pages, categories). For restoring on the same site.
- ↑ Import — loads a JSON file (export or backup). Mode is auto-detected. Supports language mapping.
Bulk export/backup — check multiple blocks in the list and click the button in the toolbar.
Any block from accordion.likedev.pro can be imported in 3 steps:
1. Open the demo site admin, find the block, click ↓ Export in its row.
2. In your own admin, click ↑ Import and upload the JSON file.
Relations and images are not transferred — configure them manually after import.
4.3 "Additional" Tab — Block Customization
- Custom code — HTML/JS/CSS appended to the block output.
- Custom template — your own twig file instead of the default (place it in
user_templates/). Enter the filename in this field. - Custom CSS class — extra class on the block wrapper for custom styling.
4.4 Template Editor
A built-in Twig template editor — available in Extensions → Modules → Accordion & Tabs → "Templates" tab.
- Create a template — choose a block type, enter a filename, and click + Create. The new file is placed in
user_templates/. - Open and edit — select an existing file from the list and click Open. A CodeMirror editor with Twig/HTML syntax highlighting opens inline.
- Save — the Save button writes changes directly to the server (no FTP needed).
After saving, enter the filename in the "Custom template" field in the "Additional" tab of the target block to apply your template.
block_id, list, heading, about, and all block settings.
FAQ
Block not showing on the page
- Check module status in Extensions → Modules — must be enabled.
- Check the block status in the "Block type, design, settings" tab.
- Check device visibility in the "Relations" tab — at least one device must be checked.
- Check customer groups — at least one must be checked.
- If using layouts — verify the main module is added to the correct layout.
- If using a shortcode — verify the block ID matches and the shortcode is in the right place.
- Check block relations — if set, the block only appears on the linked pages.
Multiple blocks on one page via layouts
Multiple blocks on one page in different positions
How to display a block in a custom location on the page
- Shortcodes — paste the shortcode in any text field or twig file.
- Selector append — specify a CSS selector and insertion method in the "Override output position" tab.
Tab/accordion switching doesn't work, styles broken
- Ensure jQuery is loaded on the page.
- Check browser console (F12 → Console) for JS errors from other modules.
- Check for CSS conflicts between the theme and
ldev-*classes via F12 → Elements.
Compatibility with microdata modules (microdata pro, sp seo faq)
Note: Google allows one FAQ block and one HowTo block per page — do not place two blocks with the same microdata type on the same page. The type is set in the block list in the "Microdata" column.
Slider in gallery or banner doesn't work
Where to find a block's shortcode?
Author Contacts
Questions about the module? Reach out to the author:
Developer website: likedev.pro