Magento 2.2.5 - upgraded from 2.1.5 last week but not sure it was working on 2.1.5

Site is under development. The mini cart in the header is not working properly. When you add something to the cart it says, 1 item available, that part is correct. However the subtotal is not appearing at all and the items are not appearing

The following error is in the console:

 knockout.js:3012 Uncaught TypeError: Unable to process binding "foreach: function(){return $parent.getRegion($parent.getItemRenderer(item.product_type)) }"

    Message: Cannot read property 'simple' of undefined

at UiClass.getItemRenderer (minicart.js:140)

which refers to these lines in minicart.js

getItemRenderer: function (productType) {

return this.itemRenderer[productType] || 'defaultRenderer';

//return 'defaultRenderer';

},

Console log shows "simple" for productType

If I comment out the return line and just return "defaultRenderer" it gives no errors but just no items.

This was using a custom Theme, not made by me but even reverting to Default Blank theme still gives the same error.

"itemRenderer" is in vendor/magento/magento-checkout/view/frontend/layout/checkout_car_sidebar_item_renderers.xml and other similar questions seem to imply that there is an issue in the XML but I can't see anything wrong with it. Any ideas?

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.