Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error for Grouped Products without active child #31

Closed
zolthan opened this issue Jun 14, 2018 · 6 comments
Closed

Fatal Error for Grouped Products without active child #31

zolthan opened this issue Jun 14, 2018 · 6 comments

Comments

@zolthan
Copy link

zolthan commented Jun 14, 2018

Fatal error: Uncaught Error: Call to a member function getId() on null in magenerds-base-price/Model/Plugin/AfterPrice.php:92 
Stack trace: 
#0 magenerds-base-price/Model/Plugin/AfterPrice.php(68): Magenerds\BasePrice\Model\Plugin\AfterPrice->getAfterPriceHtml(NULL) 
#1 vendor/magento/framework/Interception/Interceptor.php(135): Magenerds\BasePrice\Model\Plugin\AfterPrice->aroundRender(Object(Magento\Framework\Pricing\Render\Interceptor), Object(Closure), 'final_price', Object(Magento\Catalog\Model\Product\Interceptor), Array) 
#2 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\Pricing\Render\Interceptor->Magento\Framework\Interception\{closure}('final_price', Object(Magento\Catalog\Model\Product\Interceptor), Array) 
#3 generated/code/Magento/Framework/Pricing/Render/Interceptor.php(26): Magento\Framework\Pricing\Render\Interceptor-> in magenerds-base-price/Model/Plugin/AfterPrice.php on line 92

A simple check for $product is enough as it is done for the original product in the beginning of this method.

        // check if product is available
        if (!$product) return '';
@zolthan
Copy link
Author

zolthan commented Jul 4, 2018

Hi Magenerds,
anything new in here?
Best Z

@zolthan
Copy link
Author

zolthan commented Jul 19, 2018

Anyone here?

@zolthan
Copy link
Author

zolthan commented Sep 6, 2018

Hi @sydekumf ,
could you have a look into this? We still have this issue.
Best
Sebastian

@sydekumf
Copy link
Contributor

sydekumf commented Sep 6, 2018

Hey, can you provide a PR? Thanks!

@zolthan
Copy link
Author

zolthan commented Sep 12, 2018

Hi @sydekumf , here you are.

@sydekumf
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants