0

I have created a custom Tab on the product details page. Now I want to show the count of those articles, like how Reviews count are shown in tab title.

<arguments>
     <argument translate="true" name="title" xsi:type="string">Frequently Asked Questions</argument>
</arguments>     

This is the code used to show the tab. Now how can I show the count.

I have tried to use the Class in my block class like -

use \Magento\Framework\DataObject\IdentityInterface as IdentityInterface;
use \Magento\Framework\View\Element\Template as Template;
class Customtab extends Template implements IdentityInterface

and then -

public function setTabTitle()
    {
        $title = 'Frequently Asked Questions';
        $this->setTitle($title);
    }

But it is giving -

Fatal error: Class Vendor\Module\Block\Product\View\Details\Customtab contains 1 abstract method and must therefore be declared abstract or implement the remaining methods

1 Answer 1

0

It was done. All I needed was to add -

$this->setTabTitle(); 

in the construct

And use setTabTitle function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.