Fatal error: Uncaught Error: Call to a member function addAttributeToSort() on null in /home/toolshqc/public_html/app/code/Smartwave/Porto/Helper/Data.php:144 Stack trace: #0 /home/toolshqc/public_html/app/code/Smartwave/Porto/Helper/Data.php(158): Smartwave\Porto\Helper\Data->getCategoryProductIds(Object(Magento\Catalog\Model\Category\Interceptor)) #1 /home/toolshqc/public_html/var/view_preprocessed/pub/static/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/prev_next.phtml(1): Smartwave\Porto\Helper\Data->getPrevProduct(Object(Magento\Catalog\Model\Product\Interceptor)) #2 /home/toolshqc/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/home/toolshqc/...') #3 /home/toolshqc/public_html/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Product\View\Interceptor), '/home/toolshqc/...', Array) #4 /home/toolshqc/public_html/vendor/magento/framework/View/Element/Template.php(300): Magen in /home/toolshqc/public_html/app/code/Smartwave/Porto/Helper/Data.php on line 144