Fatal error: Uncaught Error: Call to a member function getId() on null in /home/dbgunsc/public_html/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/addtocart.phtml:18 Stack trace: #0 /home/dbgunsc/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include() #1 /home/dbgunsc/public_html/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Product\View\Interceptor), '/home/dbgunsc/p...', Array) #2 /home/dbgunsc/public_html/generated/code/Magento/Catalog/Block/Product/View/Interceptor.php(544): Magento\Framework\View\Element\Template->fetchView('/home/dbgunsc/p...') #3 /home/dbgunsc/public_html/vendor/magento/framework/View/Element/Template.php(300): Magento\Catalog\Block\Product\View\Interceptor->fetchView('/home/dbgunsc/p...') #4 /home/dbgunsc/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml() #5 /home/dbgunsc/public_html/g in /home/dbgunsc/public_html/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/addtocart.phtml on line 18