{"action":"created","issue":{"url":"https://api.github.com/repos/facebookincubator/facebook-for-magento/issues/57","repository_url":"https://api.github.com/repos/facebookincubator/facebook-for-magento","labels_url":"https://api.github.com/repos/facebookincubator/facebook-for-magento/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/facebookincubator/facebook-for-magento/issues/57/comments","events_url":"https://api.github.com/repos/facebookincubator/facebook-for-magento/issues/57/events","html_url":"https://github.com/facebookincubator/facebook-for-magento/issues/57","id":315791965,"number":57,"title":"gallery images","user":{"login":"sulfurio","id":38351056,"avatar_url":"https://avatars0.githubusercontent.com/u/38351056?v=4","gravatar_id":"","url":"https://api.github.com/users/sulfurio","html_url":"https://github.com/sulfurio","followers_url":"https://api.github.com/users/sulfurio/followers","following_url":"https://api.github.com/users/sulfurio/following{/other_user}","gists_url":"https://api.github.com/users/sulfurio/gists{/gist_id}","starred_url":"https://api.github.com/users/sulfurio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sulfurio/subscriptions","organizations_url":"https://api.github.com/users/sulfurio/orgs","repos_url":"https://api.github.com/users/sulfurio/repos","events_url":"https://api.github.com/users/sulfurio/events{/privacy}","received_events_url":"https://api.github.com/users/sulfurio/received_events","type":"User","site_admin":false},"labels":[{"id":692751312,"url":"https://api.github.com/repos/facebookincubator/facebook-for-magento/labels/feature-request","name":"feature-request","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-19T09:13:37Z","updated_at":"2018-04-20T21:06:26Z","closed_at":null,"author_association":"NONE","body":"Hello , the extension not loading gallery images , magento version 1.9.2 , extension version 2.4.1\r\nthis is the code that makes me think why it should be ever loaded if the $image = $product->getImage(); actually returns data ? !$image will go to 0 / $image is not '' and not 'no_selection' , so it means that if we have a base image we can't have gallery images ? am i wrong on this ?\r\n\r\n```\r\nprivate function getImageURL($product) {\r\n    $image_url = null;\r\n    $image = $product->getImage();\r\n    if (!$image || $image === '' || $image === 'no_selection') {\r\n      $product->load('media_gallery');\r\n      $gal = $product->getMediaGalleryImages();\r\n      if ($gal) {\r\n        foreach ($gal as $gal_image) {\r\n          if ($gal_image['url'] && $gal_image['url'] !== '') {\r\n            $image_url = $gal_image['url'];\r\n            break;\r\n          }\r\n        }\r\n      }\r\n    }\r\n    if (!$image_url) {\r\n      $image_url = FacebookAdsExtension::getBaseUrlMedia().'catalog/product'.$image;\r\n    }\r\n    return $image_url;\r\n  }\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/facebookincubator/facebook-for-magento/issues/comments/383222502","html_url":"https://github.com/facebookincubator/facebook-for-magento/issues/57#issuecomment-383222502","issue_url":"https://api.github.com/repos/facebookincubator/facebook-for-magento/issues/57","id":383222502,"user":{"login":"dmitridr","id":29133800,"avatar_url":"https://avatars1.githubusercontent.com/u/29133800?v=4","gravatar_id":"","url":"https://api.github.com/users/dmitridr","html_url":"https://github.com/dmitridr","followers_url":"https://api.github.com/users/dmitridr/followers","following_url":"https://api.github.com/users/dmitridr/following{/other_user}","gists_url":"https://api.github.com/users/dmitridr/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitridr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitridr/subscriptions","organizations_url":"https://api.github.com/users/dmitridr/orgs","repos_url":"https://api.github.com/users/dmitridr/repos","events_url":"https://api.github.com/users/dmitridr/events{/privacy}","received_events_url":"https://api.github.com/users/dmitridr/received_events","type":"User","site_admin":false},"created_at":"2018-04-20T21:06:26Z","updated_at":"2018-04-20T21:06:26Z","author_association":"CONTRIBUTOR","body":"Hey, \r\n\r\nYou're absolutely right, we don't actually import gallery images, as you can see the feed file generated [here](https://github.com/facebookincubator/facebook-for-magento/blob/master/app/code/community/Facebook/AdsExtension/Model/FBProductFeedTSV.php#L30) doesn't have a column for `additional_image_urls`. The only reason we query the gallery is if there is no primary image for the product.\r\n\r\nThe good news is this is gallery support is something that can be added pretty easily, all you'd need to do is add a column in the feed file in the link above, then load the gallery image urls into it [the same way the primary image is set](https://github.com/facebookincubator/facebook-for-magento/blob/master/app/code/community/Facebook/AdsExtension/Model/FBProductFeed.php#L224-L226). You're welcome to send us a pull request!\r\n\r\nIf not, we can add this in future versions. We're a bit swamped now."}}
{"actor":{"display_login":"dmitridr"}}