{"action":"created","issue":{"url":"https://api.github.com/repos/algolia/algoliasearch-magento/issues/653","repository_url":"https://api.github.com/repos/algolia/algoliasearch-magento","labels_url":"https://api.github.com/repos/algolia/algoliasearch-magento/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/algolia/algoliasearch-magento/issues/653/comments","events_url":"https://api.github.com/repos/algolia/algoliasearch-magento/issues/653/events","html_url":"https://github.com/algolia/algoliasearch-magento/pull/653","id":186493960,"number":653,"title":"Loading stockItems when required within Algolia_Algoliasearch_Helper_Entity_Producthelper::getObject","user":{"login":"cmacdonald-au","id":1651799,"avatar_url":"https://avatars.githubusercontent.com/u/1651799?v=3","gravatar_id":"","url":"https://api.github.com/users/cmacdonald-au","html_url":"https://github.com/cmacdonald-au","followers_url":"https://api.github.com/users/cmacdonald-au/followers","following_url":"https://api.github.com/users/cmacdonald-au/following{/other_user}","gists_url":"https://api.github.com/users/cmacdonald-au/gists{/gist_id}","starred_url":"https://api.github.com/users/cmacdonald-au/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmacdonald-au/subscriptions","organizations_url":"https://api.github.com/users/cmacdonald-au/orgs","repos_url":"https://api.github.com/users/cmacdonald-au/repos","events_url":"https://api.github.com/users/cmacdonald-au/events{/privacy}","received_events_url":"https://api.github.com/users/cmacdonald-au/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-01T09:41:29Z","updated_at":"2016-11-02T14:12:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/algolia/algoliasearch-magento/pulls/653","html_url":"https://github.com/algolia/algoliasearch-magento/pull/653","diff_url":"https://github.com/algolia/algoliasearch-magento/pull/653.diff","patch_url":"https://github.com/algolia/algoliasearch-magento/pull/653.patch"},"body":"We have an external process that updates data directly to DB, thus doesn't trigger the usual indexing events.\r\n\r\nTo make sure updated products make it into the index, we're using the following as necessary;\r\n`Mage::getModel('algoliasearch/indexer_algolia')->reindexSpecificProducts($productId);`\r\n\r\nHowever that caused issues within the producthelper, specifically relating to it assuming that it will always have the stock item data inside the collection.\r\n\r\nI've added the check & fetch condition for main and sub_products within `Algolia_Algoliasearch_Helper_Entity_Producthelper::getObject()`\r\n\r\nTested against Magento 1.7 specifically, (running in production), should work for all recent versions.\r\n"},"comment":{"url":"https://api.github.com/repos/algolia/algoliasearch-magento/issues/comments/257875888","html_url":"https://github.com/algolia/algoliasearch-magento/pull/653#issuecomment-257875888","issue_url":"https://api.github.com/repos/algolia/algoliasearch-magento/issues/653","id":257875888,"user":{"login":"JanPetr","id":1058144,"avatar_url":"https://avatars.githubusercontent.com/u/1058144?v=3","gravatar_id":"","url":"https://api.github.com/users/JanPetr","html_url":"https://github.com/JanPetr","followers_url":"https://api.github.com/users/JanPetr/followers","following_url":"https://api.github.com/users/JanPetr/following{/other_user}","gists_url":"https://api.github.com/users/JanPetr/gists{/gist_id}","starred_url":"https://api.github.com/users/JanPetr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanPetr/subscriptions","organizations_url":"https://api.github.com/users/JanPetr/orgs","repos_url":"https://api.github.com/users/JanPetr/repos","events_url":"https://api.github.com/users/JanPetr/events{/privacy}","received_events_url":"https://api.github.com/users/JanPetr/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T14:12:21Z","updated_at":"2016-11-02T14:12:21Z","body":"Thanks for contributing @cmacdonald-au 🎉 Makes sense :)\r\nWill test and if everything goes alright, I'll be happy to merge 💯 "}}
{"actor":{"display_login":"JanPetr"}}