cart/checkout blank in Magento 2.2.8How to override core helper in magento 2?Fatal error: Uncaught Error: Class 'Cli' not foundSearch in Magento products error: Invalid filter typeMagento 2 | Override CustomerData-FileMagento Core doesnt work after transferMagento 2.3 Can't view module's front end page output?Overriding Block class causes constructor err in magento 2Deleted ShipperHQ module causing error in “All Customers” section of Magento 2Call to a member function getId() on null - module-catalog/Helper/Product.phpIncompatible argument type: Required type: MagentoFrameworkStdlibStringUtils

Why does the autopilot disengage even when it does not receive pilot input?

Why does my script create an extra character?

Did Lincoln tell Stowe "So you're the little woman that started this great war!"?

What's an appropriate title for a person who deals with conflicts of an Empire?

How does a Potion of Poison work?

Why are they 'nude photos'?

What's the maximum time an interrupt service routine can take to execute on atmega328p?

Why didn't Thanos kill all the Dwarves on Nidavellir?

Is "take care'n of" correct?

During copyediting, journal disagrees about spelling of paper's main topic

Can fluent English speakers distinguish “steel”, “still” and “steal”?

How can I deal with a player trying to insert real-world mythology into my homebrew setting?

Print the last, middle and first character of your code

Storming Area 51

ESTA: "Is your travel to the US occurring in transit to another country?" when going on a cruise

What species of wasp is this? And how to get rid of them?

What would be the ideal melee weapon made of "Phase Metal"?

Why isn't pressure filtration popular compared to vacuum filtration?

What's the minimum number of sensors for a hobby GPS waypoint-following UAV?

Why does my String turn into Integers instead of letters after I add characters with +?

Are neural networks prone to catastrophic forgetting?

Book where the stars go black due to aliens stopping human observation collapsing quantum possibilities

Should I intentionally omit previous work experience when applying for jobs?

Matchmaker, Matchmaker, make me a match



cart/checkout blank in Magento 2.2.8


How to override core helper in magento 2?Fatal error: Uncaught Error: Class 'Cli' not foundSearch in Magento products error: Invalid filter typeMagento 2 | Override CustomerData-FileMagento Core doesnt work after transferMagento 2.3 Can't view module's front end page output?Overriding Block class causes constructor err in magento 2Deleted ShipperHQ module causing error in “All Customers” section of Magento 2Call to a member function getId() on null - module-catalog/Helper/Product.phpIncompatible argument type: Required type: MagentoFrameworkStdlibStringUtils






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















Issue
After upgrading to Magento 2.2.8. Cart and checkout page showing blank after adding Product to cart



Server Error



AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getFinalProduct() on null in /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/DefaultItem.php:129nStack trace:n#0

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81): Magento\Checkout\CustomerData\DefaultItem->getProductForThumbnail()n#1

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MGS\Mpanel\CustomerData\DefaultItem->doGetItemData()n#2

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): Magento\Checkout\CustomerData\AbstractItem->getItemData(Object(Magento\Quote\Model\Quote\Item\Interceptor))n#3

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/Cart.php(166): Magento\C...n', referer: https://staging.mywebsite.co.uk/baseball-cap.html


defaultitem.php



 <?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/

namespace MGSMpanelCustomerData;

/**
* Default item
*/
class DefaultItem extends MagentoCheckoutCustomerDataDefaultItem

/**
* @var MagentoCatalogHelperImage
*/
protected $imageHelper;

/**
* @var MagentoMsrpHelperData
*/
protected $msrpHelper;

/**
* @var MagentoFrameworkUrlInterface
*/
protected $urlBuilder;

/**
* @var MagentoCatalogHelperProductConfigurationPool
*/
protected $configurationPool;

/**
* @var MagentoCheckoutHelperData
*/
protected $checkoutHelper;

/**
* @var MGSMpanelHelperData
*/
protected $panelHelper;

/**
* @var MGSMpanelHelperData
*/
protected $panelImageHelper;

/**
* @param MagentoCatalogHelperImage $imageHelper
* @param MagentoMsrpHelperData $msrpHelper
* @param MagentoFrameworkUrlInterface $urlBuilder
* @param MagentoCatalogHelperProductConfigurationPool $configurationPool
* @param MagentoCheckoutHelperData $checkoutHelper
* @codeCoverageIgnore
*/
public function __construct(
MagentoCatalogHelperImage $imageHelper,
MagentoMsrpHelperData $msrpHelper,
MagentoFrameworkUrlInterface $urlBuilder,
MagentoCatalogHelperProductConfigurationPool $configurationPool,
MagentoCheckoutHelperData $checkoutHelper,
MGSMpanelHelperData $panelHelper,
MGSMpanelHelperImage $panelImageHelper
)
$this->configurationPool = $configurationPool;
$this->imageHelper = $imageHelper;
$this->msrpHelper = $msrpHelper;
$this->urlBuilder = $urlBuilder;
$this->checkoutHelper = $checkoutHelper;
$this->panelHelper = $panelHelper;
$this->panelImageHelper = $panelImageHelper;


/**
* @inheritdoc
*/
protected function doGetItemData()

$imageSize = $this->panelHelper->getImageMinSize();
$imageHelper = $this->panelImageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');
return [
'options' => $this->getOptionList(),
'qty' => $this->item->getQty() * 1,
'item_id' => $this->item->getId(),
'configure_url' => $this->getConfigureUrl(),
'is_visible_in_site_visibility' => $this->item->getProduct()->isVisibleInSiteVisibility(),
'product_name' => $this->item->getProduct()->getName(),
'product_sku' => $this->item->getProduct()->getSku(),
'product_url' => $this->getProductUrl(),
'product_has_url' => $this->hasProductUrl(),
'product_price' => $this->checkoutHelper->formatPrice($this->item->getCalculationPrice()),
'product_price_value' => $this->item->getCalculationPrice(),
'product_image' => [
'src' => $imageHelper->getUrl(),
'alt' => $imageHelper->getLabel(),
'width' => $imageSize['width'],
'height' => $imageSize['height'],
],
'canApplyMsrp' => $this->msrpHelper->isShowBeforeOrderConfirm($this->item->getProduct())
&& $this->msrpHelper->isMinimalPriceLessMsrp($this->item->getProduct()),
];




Line 81



$imageHelper = $this->panelImageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');


di.xml



<?xml version="1.0"?>




<type name="MGSMpanelModelMpanel">
<arguments>
<argument name="resource" xsi:type="object">MGSMpanelModelResourceModelMpanel</argument>
</arguments>
</type>

<preference for="MagentoSwatchesHelperData" type="MGSMpanelHelperSwatchesData" />
<preference for="MagentoCheckoutCustomerDataDefaultItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoConfigurableProductCustomerDataConfigurableItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoGroupedProductCustomerDataGroupedItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoWishlistCustomerDataWishlist" type="MGSMpanelCustomerDataWishlist" />

<preference for="MagentoFrameworkViewResultPage" type="MGSMpanelBlockFrameworkPage" />

<preference for="MagentoCmsBlockBlock" type="MGSMpanelBlockCmsBlock" />
<preference for="MagentoCmsBlockPage" type="MGSMpanelBlockCmsPage" />

<preference for="MagentoUserBlockUserEdit" type="MGSMpanelBlockAdminhtmlUserEdit" />

<preference for="MagentoCatalogBlockProductImageBuilder" type="MGSMpanelBlockProductImageBuilder" />
<preference for="MagentoCatalogHelperProductView" type="MGSMpanelHelperProductView" />
<preference for="MagentoCatalogControllerCategoryView" type="MGSMpanelControllerCategoryView" />
<preference for="MagentoCatalogModelCategory" type="MGSMpanelModelCategory" />




Can anyone please suggest a solution?










share|improve this question
























  • You have a custom module installed MGS/Mpanel. Please try to disable it and test if it's working. If yes it come from the module so paste your code from : app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81) And the di.xml of this module.

    – Vinz
    Jul 3 at 20:58











  • Hi @Vinz added those for you, thanks for taking a look.

    – YorkieMagento
    Jul 4 at 8:20

















2















Issue
After upgrading to Magento 2.2.8. Cart and checkout page showing blank after adding Product to cart



Server Error



AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getFinalProduct() on null in /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/DefaultItem.php:129nStack trace:n#0

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81): Magento\Checkout\CustomerData\DefaultItem->getProductForThumbnail()n#1

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MGS\Mpanel\CustomerData\DefaultItem->doGetItemData()n#2

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): Magento\Checkout\CustomerData\AbstractItem->getItemData(Object(Magento\Quote\Model\Quote\Item\Interceptor))n#3

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/Cart.php(166): Magento\C...n', referer: https://staging.mywebsite.co.uk/baseball-cap.html


defaultitem.php



 <?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/

namespace MGSMpanelCustomerData;

/**
* Default item
*/
class DefaultItem extends MagentoCheckoutCustomerDataDefaultItem

/**
* @var MagentoCatalogHelperImage
*/
protected $imageHelper;

/**
* @var MagentoMsrpHelperData
*/
protected $msrpHelper;

/**
* @var MagentoFrameworkUrlInterface
*/
protected $urlBuilder;

/**
* @var MagentoCatalogHelperProductConfigurationPool
*/
protected $configurationPool;

/**
* @var MagentoCheckoutHelperData
*/
protected $checkoutHelper;

/**
* @var MGSMpanelHelperData
*/
protected $panelHelper;

/**
* @var MGSMpanelHelperData
*/
protected $panelImageHelper;

/**
* @param MagentoCatalogHelperImage $imageHelper
* @param MagentoMsrpHelperData $msrpHelper
* @param MagentoFrameworkUrlInterface $urlBuilder
* @param MagentoCatalogHelperProductConfigurationPool $configurationPool
* @param MagentoCheckoutHelperData $checkoutHelper
* @codeCoverageIgnore
*/
public function __construct(
MagentoCatalogHelperImage $imageHelper,
MagentoMsrpHelperData $msrpHelper,
MagentoFrameworkUrlInterface $urlBuilder,
MagentoCatalogHelperProductConfigurationPool $configurationPool,
MagentoCheckoutHelperData $checkoutHelper,
MGSMpanelHelperData $panelHelper,
MGSMpanelHelperImage $panelImageHelper
)
$this->configurationPool = $configurationPool;
$this->imageHelper = $imageHelper;
$this->msrpHelper = $msrpHelper;
$this->urlBuilder = $urlBuilder;
$this->checkoutHelper = $checkoutHelper;
$this->panelHelper = $panelHelper;
$this->panelImageHelper = $panelImageHelper;


/**
* @inheritdoc
*/
protected function doGetItemData()

$imageSize = $this->panelHelper->getImageMinSize();
$imageHelper = $this->panelImageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');
return [
'options' => $this->getOptionList(),
'qty' => $this->item->getQty() * 1,
'item_id' => $this->item->getId(),
'configure_url' => $this->getConfigureUrl(),
'is_visible_in_site_visibility' => $this->item->getProduct()->isVisibleInSiteVisibility(),
'product_name' => $this->item->getProduct()->getName(),
'product_sku' => $this->item->getProduct()->getSku(),
'product_url' => $this->getProductUrl(),
'product_has_url' => $this->hasProductUrl(),
'product_price' => $this->checkoutHelper->formatPrice($this->item->getCalculationPrice()),
'product_price_value' => $this->item->getCalculationPrice(),
'product_image' => [
'src' => $imageHelper->getUrl(),
'alt' => $imageHelper->getLabel(),
'width' => $imageSize['width'],
'height' => $imageSize['height'],
],
'canApplyMsrp' => $this->msrpHelper->isShowBeforeOrderConfirm($this->item->getProduct())
&& $this->msrpHelper->isMinimalPriceLessMsrp($this->item->getProduct()),
];




Line 81



$imageHelper = $this->panelImageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');


di.xml



<?xml version="1.0"?>




<type name="MGSMpanelModelMpanel">
<arguments>
<argument name="resource" xsi:type="object">MGSMpanelModelResourceModelMpanel</argument>
</arguments>
</type>

<preference for="MagentoSwatchesHelperData" type="MGSMpanelHelperSwatchesData" />
<preference for="MagentoCheckoutCustomerDataDefaultItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoConfigurableProductCustomerDataConfigurableItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoGroupedProductCustomerDataGroupedItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoWishlistCustomerDataWishlist" type="MGSMpanelCustomerDataWishlist" />

<preference for="MagentoFrameworkViewResultPage" type="MGSMpanelBlockFrameworkPage" />

<preference for="MagentoCmsBlockBlock" type="MGSMpanelBlockCmsBlock" />
<preference for="MagentoCmsBlockPage" type="MGSMpanelBlockCmsPage" />

<preference for="MagentoUserBlockUserEdit" type="MGSMpanelBlockAdminhtmlUserEdit" />

<preference for="MagentoCatalogBlockProductImageBuilder" type="MGSMpanelBlockProductImageBuilder" />
<preference for="MagentoCatalogHelperProductView" type="MGSMpanelHelperProductView" />
<preference for="MagentoCatalogControllerCategoryView" type="MGSMpanelControllerCategoryView" />
<preference for="MagentoCatalogModelCategory" type="MGSMpanelModelCategory" />




Can anyone please suggest a solution?










share|improve this question
























  • You have a custom module installed MGS/Mpanel. Please try to disable it and test if it's working. If yes it come from the module so paste your code from : app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81) And the di.xml of this module.

    – Vinz
    Jul 3 at 20:58











  • Hi @Vinz added those for you, thanks for taking a look.

    – YorkieMagento
    Jul 4 at 8:20













2












2








2








Issue
After upgrading to Magento 2.2.8. Cart and checkout page showing blank after adding Product to cart



Server Error



AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getFinalProduct() on null in /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/DefaultItem.php:129nStack trace:n#0

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81): Magento\Checkout\CustomerData\DefaultItem->getProductForThumbnail()n#1

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MGS\Mpanel\CustomerData\DefaultItem->doGetItemData()n#2

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): Magento\Checkout\CustomerData\AbstractItem->getItemData(Object(Magento\Quote\Model\Quote\Item\Interceptor))n#3

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/Cart.php(166): Magento\C...n', referer: https://staging.mywebsite.co.uk/baseball-cap.html


defaultitem.php



 <?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/

namespace MGSMpanelCustomerData;

/**
* Default item
*/
class DefaultItem extends MagentoCheckoutCustomerDataDefaultItem

/**
* @var MagentoCatalogHelperImage
*/
protected $imageHelper;

/**
* @var MagentoMsrpHelperData
*/
protected $msrpHelper;

/**
* @var MagentoFrameworkUrlInterface
*/
protected $urlBuilder;

/**
* @var MagentoCatalogHelperProductConfigurationPool
*/
protected $configurationPool;

/**
* @var MagentoCheckoutHelperData
*/
protected $checkoutHelper;

/**
* @var MGSMpanelHelperData
*/
protected $panelHelper;

/**
* @var MGSMpanelHelperData
*/
protected $panelImageHelper;

/**
* @param MagentoCatalogHelperImage $imageHelper
* @param MagentoMsrpHelperData $msrpHelper
* @param MagentoFrameworkUrlInterface $urlBuilder
* @param MagentoCatalogHelperProductConfigurationPool $configurationPool
* @param MagentoCheckoutHelperData $checkoutHelper
* @codeCoverageIgnore
*/
public function __construct(
MagentoCatalogHelperImage $imageHelper,
MagentoMsrpHelperData $msrpHelper,
MagentoFrameworkUrlInterface $urlBuilder,
MagentoCatalogHelperProductConfigurationPool $configurationPool,
MagentoCheckoutHelperData $checkoutHelper,
MGSMpanelHelperData $panelHelper,
MGSMpanelHelperImage $panelImageHelper
)
$this->configurationPool = $configurationPool;
$this->imageHelper = $imageHelper;
$this->msrpHelper = $msrpHelper;
$this->urlBuilder = $urlBuilder;
$this->checkoutHelper = $checkoutHelper;
$this->panelHelper = $panelHelper;
$this->panelImageHelper = $panelImageHelper;


/**
* @inheritdoc
*/
protected function doGetItemData()

$imageSize = $this->panelHelper->getImageMinSize();
$imageHelper = $this->panelImageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');
return [
'options' => $this->getOptionList(),
'qty' => $this->item->getQty() * 1,
'item_id' => $this->item->getId(),
'configure_url' => $this->getConfigureUrl(),
'is_visible_in_site_visibility' => $this->item->getProduct()->isVisibleInSiteVisibility(),
'product_name' => $this->item->getProduct()->getName(),
'product_sku' => $this->item->getProduct()->getSku(),
'product_url' => $this->getProductUrl(),
'product_has_url' => $this->hasProductUrl(),
'product_price' => $this->checkoutHelper->formatPrice($this->item->getCalculationPrice()),
'product_price_value' => $this->item->getCalculationPrice(),
'product_image' => [
'src' => $imageHelper->getUrl(),
'alt' => $imageHelper->getLabel(),
'width' => $imageSize['width'],
'height' => $imageSize['height'],
],
'canApplyMsrp' => $this->msrpHelper->isShowBeforeOrderConfirm($this->item->getProduct())
&& $this->msrpHelper->isMinimalPriceLessMsrp($this->item->getProduct()),
];




Line 81



$imageHelper = $this->panelImageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');


di.xml



<?xml version="1.0"?>




<type name="MGSMpanelModelMpanel">
<arguments>
<argument name="resource" xsi:type="object">MGSMpanelModelResourceModelMpanel</argument>
</arguments>
</type>

<preference for="MagentoSwatchesHelperData" type="MGSMpanelHelperSwatchesData" />
<preference for="MagentoCheckoutCustomerDataDefaultItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoConfigurableProductCustomerDataConfigurableItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoGroupedProductCustomerDataGroupedItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoWishlistCustomerDataWishlist" type="MGSMpanelCustomerDataWishlist" />

<preference for="MagentoFrameworkViewResultPage" type="MGSMpanelBlockFrameworkPage" />

<preference for="MagentoCmsBlockBlock" type="MGSMpanelBlockCmsBlock" />
<preference for="MagentoCmsBlockPage" type="MGSMpanelBlockCmsPage" />

<preference for="MagentoUserBlockUserEdit" type="MGSMpanelBlockAdminhtmlUserEdit" />

<preference for="MagentoCatalogBlockProductImageBuilder" type="MGSMpanelBlockProductImageBuilder" />
<preference for="MagentoCatalogHelperProductView" type="MGSMpanelHelperProductView" />
<preference for="MagentoCatalogControllerCategoryView" type="MGSMpanelControllerCategoryView" />
<preference for="MagentoCatalogModelCategory" type="MGSMpanelModelCategory" />




Can anyone please suggest a solution?










share|improve this question
















Issue
After upgrading to Magento 2.2.8. Cart and checkout page showing blank after adding Product to cart



Server Error



AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getFinalProduct() on null in /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/DefaultItem.php:129nStack trace:n#0

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81): Magento\Checkout\CustomerData\DefaultItem->getProductForThumbnail()n#1

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MGS\Mpanel\CustomerData\DefaultItem->doGetItemData()n#2

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): Magento\Checkout\CustomerData\AbstractItem->getItemData(Object(Magento\Quote\Model\Quote\Item\Interceptor))n#3

/var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/Cart.php(166): Magento\C...n', referer: https://staging.mywebsite.co.uk/baseball-cap.html


defaultitem.php



 <?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/

namespace MGSMpanelCustomerData;

/**
* Default item
*/
class DefaultItem extends MagentoCheckoutCustomerDataDefaultItem

/**
* @var MagentoCatalogHelperImage
*/
protected $imageHelper;

/**
* @var MagentoMsrpHelperData
*/
protected $msrpHelper;

/**
* @var MagentoFrameworkUrlInterface
*/
protected $urlBuilder;

/**
* @var MagentoCatalogHelperProductConfigurationPool
*/
protected $configurationPool;

/**
* @var MagentoCheckoutHelperData
*/
protected $checkoutHelper;

/**
* @var MGSMpanelHelperData
*/
protected $panelHelper;

/**
* @var MGSMpanelHelperData
*/
protected $panelImageHelper;

/**
* @param MagentoCatalogHelperImage $imageHelper
* @param MagentoMsrpHelperData $msrpHelper
* @param MagentoFrameworkUrlInterface $urlBuilder
* @param MagentoCatalogHelperProductConfigurationPool $configurationPool
* @param MagentoCheckoutHelperData $checkoutHelper
* @codeCoverageIgnore
*/
public function __construct(
MagentoCatalogHelperImage $imageHelper,
MagentoMsrpHelperData $msrpHelper,
MagentoFrameworkUrlInterface $urlBuilder,
MagentoCatalogHelperProductConfigurationPool $configurationPool,
MagentoCheckoutHelperData $checkoutHelper,
MGSMpanelHelperData $panelHelper,
MGSMpanelHelperImage $panelImageHelper
)
$this->configurationPool = $configurationPool;
$this->imageHelper = $imageHelper;
$this->msrpHelper = $msrpHelper;
$this->urlBuilder = $urlBuilder;
$this->checkoutHelper = $checkoutHelper;
$this->panelHelper = $panelHelper;
$this->panelImageHelper = $panelImageHelper;


/**
* @inheritdoc
*/
protected function doGetItemData()

$imageSize = $this->panelHelper->getImageMinSize();
$imageHelper = $this->panelImageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');
return [
'options' => $this->getOptionList(),
'qty' => $this->item->getQty() * 1,
'item_id' => $this->item->getId(),
'configure_url' => $this->getConfigureUrl(),
'is_visible_in_site_visibility' => $this->item->getProduct()->isVisibleInSiteVisibility(),
'product_name' => $this->item->getProduct()->getName(),
'product_sku' => $this->item->getProduct()->getSku(),
'product_url' => $this->getProductUrl(),
'product_has_url' => $this->hasProductUrl(),
'product_price' => $this->checkoutHelper->formatPrice($this->item->getCalculationPrice()),
'product_price_value' => $this->item->getCalculationPrice(),
'product_image' => [
'src' => $imageHelper->getUrl(),
'alt' => $imageHelper->getLabel(),
'width' => $imageSize['width'],
'height' => $imageSize['height'],
],
'canApplyMsrp' => $this->msrpHelper->isShowBeforeOrderConfirm($this->item->getProduct())
&& $this->msrpHelper->isMinimalPriceLessMsrp($this->item->getProduct()),
];




Line 81



$imageHelper = $this->panelImageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');


di.xml



<?xml version="1.0"?>




<type name="MGSMpanelModelMpanel">
<arguments>
<argument name="resource" xsi:type="object">MGSMpanelModelResourceModelMpanel</argument>
</arguments>
</type>

<preference for="MagentoSwatchesHelperData" type="MGSMpanelHelperSwatchesData" />
<preference for="MagentoCheckoutCustomerDataDefaultItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoConfigurableProductCustomerDataConfigurableItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoGroupedProductCustomerDataGroupedItem" type="MGSMpanelCustomerDataDefaultItem" />
<preference for="MagentoWishlistCustomerDataWishlist" type="MGSMpanelCustomerDataWishlist" />

<preference for="MagentoFrameworkViewResultPage" type="MGSMpanelBlockFrameworkPage" />

<preference for="MagentoCmsBlockBlock" type="MGSMpanelBlockCmsBlock" />
<preference for="MagentoCmsBlockPage" type="MGSMpanelBlockCmsPage" />

<preference for="MagentoUserBlockUserEdit" type="MGSMpanelBlockAdminhtmlUserEdit" />

<preference for="MagentoCatalogBlockProductImageBuilder" type="MGSMpanelBlockProductImageBuilder" />
<preference for="MagentoCatalogHelperProductView" type="MGSMpanelHelperProductView" />
<preference for="MagentoCatalogControllerCategoryView" type="MGSMpanelControllerCategoryView" />
<preference for="MagentoCatalogModelCategory" type="MGSMpanelModelCategory" />




Can anyone please suggest a solution?







magento2 cart error






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 4 at 8:17







YorkieMagento

















asked Jul 3 at 20:17









YorkieMagentoYorkieMagento

5293 gold badges15 silver badges44 bronze badges




5293 gold badges15 silver badges44 bronze badges












  • You have a custom module installed MGS/Mpanel. Please try to disable it and test if it's working. If yes it come from the module so paste your code from : app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81) And the di.xml of this module.

    – Vinz
    Jul 3 at 20:58











  • Hi @Vinz added those for you, thanks for taking a look.

    – YorkieMagento
    Jul 4 at 8:20

















  • You have a custom module installed MGS/Mpanel. Please try to disable it and test if it's working. If yes it come from the module so paste your code from : app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81) And the di.xml of this module.

    – Vinz
    Jul 3 at 20:58











  • Hi @Vinz added those for you, thanks for taking a look.

    – YorkieMagento
    Jul 4 at 8:20
















You have a custom module installed MGS/Mpanel. Please try to disable it and test if it's working. If yes it come from the module so paste your code from : app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81) And the di.xml of this module.

– Vinz
Jul 3 at 20:58





You have a custom module installed MGS/Mpanel. Please try to disable it and test if it's working. If yes it come from the module so paste your code from : app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81) And the di.xml of this module.

– Vinz
Jul 3 at 20:58













Hi @Vinz added those for you, thanks for taking a look.

– YorkieMagento
Jul 4 at 8:20





Hi @Vinz added those for you, thanks for taking a look.

– YorkieMagento
Jul 4 at 8:20










0






active

oldest

votes














Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f280693%2fcart-checkout-blank-in-magento-2-2-8%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f280693%2fcart-checkout-blank-in-magento-2-2-8%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form