oroinc / magento-orocrm-bridge

Magento extension, extends SOAP API for OroCRM integration.
http://www.magentocommerce.com/magento-connect/orocrm-bridge.html
16 stars 8 forks source link

Fatal Error: Call to a member function getName() on null in Oro_Api_Model_Sales_Quote_Api::_getProductAttributes #11

Open dajve opened 7 years ago

dajve commented 7 years ago

In situations where a product is in a cart being synced by Oro which still contains a reference in $product->getCategoryIds() to a category which has subsequently been deleted, a fatal error is encountered in Oro_Api_Model_Sales_Quote_Api::_getProductAttributes() (Line: 140).

Related to pull request: #9

Erroring lines

             $productCategoryIds = $product->getCategoryIds();
            foreach ($productCategoryIds as $categoryId) {
                $result['categories'][] = array(
                    'name' => $this->_categoryCollection->getItemById($categoryId)->getName()
                );
            }
anyt commented 7 years ago

Hi @dajve Thank you for reporting the issue!

Internal ticket id: CRM-8429