0

Getting an error :

Fatal error: Call to a member function isVisibleInSiteVisibility() In template/checkout/cart/item/default.phtml on line 60

Here is code:

$_item = $this->getItem();
$_item->getProduct()->isVisibleInSiteVisibility();

How can I fix this?

2
  • what are you getting in $_item ?
    – Piyush
    Sep 13, 2017 at 7:05
  • Accept the answer If you find my answer helpful @Pradip
    – Keyur Shah
    Oct 3, 2017 at 18:50

1 Answer 1

0

I think in your quote you have multiple product in cart, so you can check with this below condition,

if($_item->getProduct()->getTypeId() === 'bundle'){
     $_item->getProduct()->isVisibleInSiteVisibility();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.