Skip to content

Commit

Permalink
Update Version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JaJuMa committed Sep 8, 2022
1 parent 66aeaf5 commit 6dbbf10
Show file tree
Hide file tree
Showing 6 changed files with 283 additions and 58 deletions.
49 changes: 49 additions & 0 deletions Block/Widgets/Faq.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,53 @@ public function isEnabled()
{
return ($this->advancedWidgetHelper->getConfig('hyvafaq/general/is_enabled') == '1' ? true : false);
}

public function isEnabledStructuredData()
{
return ($this->advancedWidgetHelper->getConfig('hyvafaq/general/is_enabled_structured_data') == '1' ? true : false);
}

public function getHeroicons($openCloseIcons, $isShowQuestionOnDesktop = 0)
{
$funcs = [];
$icons = [];
switch ($openCloseIcons) {
case 1:
$funcs['type'] = 'chevron';
if ($isShowQuestionOnDesktop){
$icons[] = ['name' => 'chevronDownHtml', 'class' => ''];
}else{
$icons[] = ['name' => 'chevronUpHtml', 'class' => ''];
}
$funcs['icons'] = $icons;
break;
case 2:
$funcs['type'] = 'plus-minus';
$icons[] = ['name' => 'plusHtml', 'class' => ':not(.active)'];
$icons[] = ['name' => 'minusHtml', 'class' => '.active'];
$funcs['icons'] = $icons;
break;
case 3:
$funcs['type'] = 'plus-x';
$icons[] = ['name' => 'plusHtml', 'class' => ':not(.active)'];
$icons[] = ['name' => 'xHtml', 'class' => '.active'];
$funcs['icons'] = $icons;
break;
case 4:
$funcs['type'] = 'plusCircle-minusCircle';
$icons[] = ['name' => 'plusCircleHtml', 'class' => ':not(.active)'];
$icons[] = ['name' => 'minusCircleHtml', 'class' => '.active'];
$funcs['icons'] = $icons;
break;
case 5:
$funcs['type'] = 'plusCircle-xCircle';
$icons[] = ['name' => 'plusCircleHtml', 'class' => ':not(.active)'];
$icons[] = ['name' => 'xCircleHtml', 'class' => '.active'];
$funcs['icons'] = $icons;
break;
}

return $funcs;

}
}
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Compatible with
* Add 1 - x question groups
* Add 1 - x questions and answers in each question group
* Choose if question groups are shown as open or closed as default on page load on desktop (always closed on mobile)
* Option to show/hide Question Group Title
* Option to keep only one question open
* Choose icons for open/close questions
* Option to add JSON-LD structured data for FAQs

## Further Info, Extension Description & Manual

Expand Down Expand Up @@ -63,7 +67,7 @@ The code is licensed under the [MIT License (MIT)](https://github.com/JaJuMa-Gmb

## Other [Magento 2 Extensions](ttps://www.jajuma.de/en/jajuma-develop/magento-extensions) by [JaJuMa](https://www.jajuma.de/)

* :framed_picture: Performance & UX:<br>[Ultimate Image Optimizer for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/ultimate-image-optimizer-extension-for-magento-2)<br>
* :framed_picture: Performance & UX:<br>[Ultimate Image Optimizer for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/ultimate-image-optimizer-extension-for-magento-2)<br>
AVIF & WebP Images, Lazy Loading, High-Resolution / Retina images

* :framed_picture: Performance & UX:<br>[WebP Optimized Images for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/webp-optimized-images-extension-for-magento-2#portfolio-content)<br>
Expand Down Expand Up @@ -96,17 +100,14 @@ The code is licensed under the [MIT License (MIT)](https://github.com/JaJuMa-Gmb
* :thought_balloon: UX & Marketing:<br>[Customer Satisfaction Feedback for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/category-grid-callouts-extension-for-magento-2)<br>
Collect Valuable Feedback From Your Customers & Understand How To Satisfy Your Customers

* :triangular_flag_on_post: :free: UI & UX:<br>[Awesome Hyvä for Hyvä Themes](https://www.jajuma.de/en/jajuma-develop/extensions/font-awesome-icons-for-hyva-themes-extension)<br>
Font Awesome 5 & 6 Icons for your [Hyvä Themes](https://www.jajuma.de/de/jajuma-shop/online-shop-mit-magento-2-und-hyva-themes) Store

* :ok_man: :free: User Experience:<br>[Customer Navigation Manager for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/customer-navigation-manager-extension-for-magento-2)<br>
Easily manage the links in your Customer Account

* :heavy_division_sign: :free: Accounting:<br>[Dynamic Shipping Tax for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/dynamic-shipping-tax-extension-for-magento-2)<br>
Dynamic Shipping Tax Calculation

* :question: :free: Content:<br>[Hyvä FAQ Widget for Hyvä Themes](https://www.jajuma.de/en/jajuma-develop/extensions/dynamic-shipping-tax-extension-for-magento-2)<br>
FAQ Widget for your [Hyvä Themes](https://www.jajuma.de/de/jajuma-shop/online-shop-mit-magento-2-und-hyva-themes) Store
* :triangular_flag_on_post: :free: UI & UX:<br>[Awesome Hyvä for Hyvä Themes](https://www.jajuma.de/en/jajuma-develop/extensions/font-awesome-icons-for-hyva-themes-extension)<br>
Font Awesome 5 & 6 Icons for your [Hyvä Themes](https://www.jajuma.de/de/jajuma-shop/online-shop-mit-magento-2-und-hyva-themes) Store
* :heavy_division_sign: :free: Accounting:<br>[Dynamic Shipping Tax for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/font-awesome-icons-for-hyva-themes-extension)<br>
Dynamic shipping tax calculation based on products in cart

## Other [Services](https://www.jajuma.de/en/jajuma/company-magento-ecommerce-agency-stuttgart) by [JaJuMa](https://www.jajuma.de/)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jajuma/hyva-faq",
"description": "FAQ Widget for Hyvä Themes",
"type": "magento2-module",
"version": "1.0.3",
"version": "1.1.0",
"license": "MIT",
"authors": [
{
Expand Down
6 changes: 3 additions & 3 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
224.517V336H106.692V115.336H74L91.2077 64H158.026V174.716ZM272.988 109.567L286.407
69.7565H239.485L226.132 109.567H272.988ZM235.338 64H294.409L277.112
115.336H218.13L235.338 64Z"></path></svg> Hyvä Theme Demo</a>
<div style="float: right;">Installed Version: <b>1.0.3</b></div>
<div style="float: right;">Installed Version: <b>1.1.0</b></div>
</div>
</div>
<hr>
Expand Down Expand Up @@ -130,10 +130,10 @@
target="_blank">Category Grid Callouts</a>
<a href="https://www.jajuma.de/en/jajuma-develop/extensions/customer-satisfaction-feedback-extension-for-magento-2"
target="_blank">Customer Satisfaction Feedback</a>
<a href="https://www.jajuma.de/en/jajuma-develop/extensions/customer-navigation-manager-extension-for-magento-2"
target="_blank">Free: Customer Navigation Manager</a>
<a href="https://www.jajuma.de/en/jajuma-develop/extensions/font-awesome-icons-for-hyva-themes-extension"
target="_blank"><b>Free:</b> Awesome Hyvä</a>
<a href="https://www.jajuma.de/en/jajuma-develop/extensions/customer-navigation-manager-extension-for-magento-2"
target="_blank"><b>Free:</b> Customer Navigation Manager</a>
<a href="https://www.jajuma.de/en/jajuma-develop/extensions/dynamic-shipping-tax-extension-for-magento-2"
target="_blank"><b>Free:</b> Dynamic Shipping Tax</a>
</div>
Expand Down
56 changes: 55 additions & 1 deletion etc/widget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<label translate="true">Hyvä FAQ (by JaJuMa)</label>
<description translate="true">FAQ Widget for Hyvä Themes by JaJuMa</description>
<parameters>
<parameter name="conditions" xsi:type="block" sort_order="10" visible="true">
<parameter name="conditions" xsi:type="block" sort_order="30" visible="true">
<label translate="true">Questions</label>
<block class="Jajuma\HyvaFaq\Block\Widgets\Faq\Questions"/>
</parameter>
Expand All @@ -29,6 +29,60 @@
</option>
</options>
</parameter>
<parameter name="display_question_group_title" xsi:type="select" required="true" sort_order="10">
<label>Display Question Group Title</label>
<options>
<option name="yes" value="1" selected="true">
<label translate="true">Yes</label>
</option>
<option name="no" value="0">
<label translate="true">No</label>
</option>
</options>
</parameter>
<parameter name="keep_only_one_question_open" xsi:type="select" required="true" sort_order="15">
<label>Keep only one question open</label>
<options>
<option name="yes" value="1" selected="true">
<label translate="true">Yes</label>
</option>
<option name="no" value="0">
<label translate="true">No</label>
</option>
</options>
</parameter>
<parameter name="open_close_icons" xsi:type="select" required="true" sort_order="20">
<label>Open/Close Icons</label>
<options>
<option name="Chevron" value="1" selected="true">
<label translate="true">Chevron Up/Down</label>
</option>
<option name="plus_minus" value="2">
<label translate="true">Plus/Minus</label>
</option>
<option name="plus_x" value="3">
<label translate="true">Plus/X</label>
</option>
<option name="plus_circle_minus_circle" value="4">
<label translate="true">Plus-Circle/Minus-Circle</label>
</option>
<option name="plus_circle_x_circle" value="5">
<label translate="true">Plus-Circle/X-Circle</label>
</option>
</options>
</parameter>

<parameter name="enable_structured_data" xsi:type="select" required="true" sort_order="25">
<label>Enable Structured Data</label>
<options>
<option name="yes" value="1" selected="true">
<label translate="true">Yes</label>
</option>
<option name="no" value="0">
<label translate="true">No</label>
</option>
</options>
</parameter>
</parameters>
</widget>
</widgets>
Loading

0 comments on commit 6dbbf10

Please sign in to comment.