Hello,
I have installed FAQ module from github https://github.com/php-cuong/magento2-faqs-extensions.
I want to show the faq/view.phtml template file on product details page over here https://prnt.sc/tgofxd.
I have added the questions in Frequently Asked questions, they are visible on https://e92rduand89atx1x.mojostratus.io/faqs.html page See https://prnt.sc/tgogge but not on Product detail page See https://prnt.sc/tgofxd
You can refer these url for reference :
Can you please guide me on this? Here is the phtml file code.
<div class="faq-category">
<h2 class="faqcat-title first-title"><i></i><?php echo __('Welcome to our support portal');?></h2>
<?php if ($this->getFaqCategoriesList()): ?>
<ul class="category-list">
<?php foreach ($this->getFaqCategoriesList() as $category): ?>
<li class="col-xs-6 col-sm-4 col-md-3 category">
<div class="block">
<a href="<?php echo $this->getFaqCategoryFullPath($category['identifier']); ?>">
<img src="<?php echo !empty($category['image']) ? $this->getFileBaseUrl($category['image']) : $block->getViewFileUrl('PHPCuong_Faq::images/faq81x81.png'); ?>" alt="<?php echo __($category['title']);?>" title="<?php echo __($category['title']);?> - <?php echo __('FAQs'); ?>" />
</a>
<h3>
<a href="<?php echo $this->getFaqCategoryFullPath($category['identifier']); ?>">
<?php echo __($category['title']);?>
</a>
</h3>
</div>
</li>
<?php endforeach;?>
</ul>
<?php else: ?>
<ol class="items faqs-list">
<li class="item no-question">
<a href="#"><?php echo __('There are no FAQ Categories was found.'); ?></a>
</li>
</ol>
<?php endif; ?>
<h2 class="faqcat-title">
<i></i><?php echo __('Frequently Asked Questions');?>
</h2>
<?php if ($this->getFrequentlyAskedQuestion()): ?>
<ol class="items faqs-list">
<?php foreach($this->getFrequentlyAskedQuestion() as $faq): ?>
<li class="item" id="faq-id-<?php echo $faq['faq_id']; ?>">
<a href="<?php echo $this->getFaqFullPath($faq['identifier']); ?>"><span class="faq-iconplus"></span><?php echo $faq['title']; ?></a>
<div class="description" id="description">
<?php echo $block->filterProvider($faq['content']); ?>
</div>
<div class="read-more"><?php echo __('Read more'); ?></div>
</li>
<?php endforeach; ?>
</ol>
<?php else: ?>
<ol class="items faqs-list">
<li class="item no-question">
<a href="#"><?php echo __('There are no frequently asked questions was found.'); ?></a>
</li>
</ol>
<?php endif; ?>
<h2 class="faqcat-title"><i></i><?php echo __('Latest Questions');?></h2>
<?php if ($this->getLastestFAQ()): ?>
<ol class="items faqs-list">
<?php foreach($this->getLastestFAQ() as $faq): ?>
<li class="item" id="faq-id-<?php echo $faq['faq_id']; ?>">
<a href="<?php echo $this->getFaqFullPath($faq['identifier']); ?>"><span class="faq-iconplus"></span><?php echo $faq['title']; ?></a>
<div class="description" id="description">
<?php echo $block->filterProvider($faq['content']); ?>
</div>
<div class="read-more"><?php echo __('Read more'); ?></div>
</li>
<?php endforeach; ?>
</ol>
<?php else: ?>
<ol class="items faqs-list">
<li class="item no-question">
<a href="#"><?php echo __('There are no latest questions was found.'); ?></a>
</li>
</ol>
<?php endif; ?>
This is the layout file code "catalog_product_view.xml" where i am calling this phtml file
<referenceBlock name="product.info.details">
<block class="Magento\Framework\View\Element\Template" name="faq.faq.view" template="PHPCuong_Faq::faq/view.phtml" group="detailed_info" cacheable="false">
<arguments>
<argument name="title" translate="true" xsi:type="string">FAQ</argument>
<argument name="sort_order" xsi:type="string">100</argument>
</arguments>
</block>
</referenceBlock>
What is going wrong? Please help