{"id":15583686,"url":"https://github.com/sokil/php-merchant-product-feed","last_synced_at":"2025-04-24T03:45:45.102Z","repository":{"id":57055121,"uuid":"334255811","full_name":"sokil/php-merchant-product-feed","owner":"sokil","description":"Builder of Facebook and Google product feeds","archived":false,"fork":false,"pushed_at":"2021-02-02T06:40:31.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T03:45:40.266Z","etag":null,"topics":["advertising","facebook","feed","google","merchant","product-feed","seo"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sokil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-29T20:28:31.000Z","updated_at":"2022-04-26T05:40:36.000Z","dependencies_parsed_at":"2022-08-24T06:01:00.684Z","dependency_job_id":null,"html_url":"https://github.com/sokil/php-merchant-product-feed","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokil%2Fphp-merchant-product-feed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokil%2Fphp-merchant-product-feed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokil%2Fphp-merchant-product-feed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokil%2Fphp-merchant-product-feed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sokil","download_url":"https://codeload.github.com/sokil/php-merchant-product-feed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250559995,"owners_count":21450168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advertising","facebook","feed","google","merchant","product-feed","seo"],"created_at":"2024-10-02T20:20:29.269Z","updated_at":"2025-04-24T03:45:45.081Z","avatar_url":"https://github.com/sokil.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-merchant-product-feed\n\nBuilder of Facebook and Google product feeds\n\n[![Test](https://github.com/sokil/php-merchant-product-feed/workflows/Test/badge.svg?branch=main)](https://github.com/sokil/php-merchant-product-feed/actions?query=workflow%3ATest)\n[![Latest Stable Version](https://poser.pugx.org/sokil/php-merchant-product-feed/v/stable.png)](https://packagist.org/packages/sokil/php-merchant-product-feed)\n[![Coverage Status](https://coveralls.io/repos/sokil/php-merchant-product-feed/badge.png?1)](https://coveralls.io/r/sokil/php-merchant-product-feed)\n[![Total Downloads](http://img.shields.io/packagist/dt/sokil/php-merchant-product-feed.svg?1)](https://packagist.org/packages/sokil/php-merchant-product-feed)\n[![Daily Downloads](https://poser.pugx.org/sokil/php-merchant-product-feed/d/daily)](https://packagist.org/packages/sokil/php-merchant-product-feed/stats)\n\n## Facebook\n\n### Useful links\n\n* [Marketing API / Product catalog ](https://developers.facebook.com/docs/marketing-api/catalog)\n* [Commence platform / Catalog and Inventory](https://developers.facebook.com/docs/commerce-platform/catalog)\n* [Feed Update API](https://developers.facebook.com/docs/marketing-api/catalog/guides/feed-api)\n\n## Google\n\n### Useful links\n\n* [Google Merchant Center / Catalog](https://support.google.com/merchants/answer/7052112?visit_id=637475497990766300-2364174748\u0026hl=ru\u0026rd=1)\n\n### Useage\n\n```php\n\u003c?php\n\n// build set of products\n$product = new Product(\n    'sku',\n    'title',\n    'description',\n    new Availability(Availability::IN_STOCK),\n    new Condition(Condition::NEW),\n    new Price('42.42', 'UAH'),\n    new Url('https://example.com/item'),\n    new Url('https://example.com/item.png'),\n    'SomeBrand'\n);\n\n// build feed\n$feed = new Feed([$product]);\n\n// create formatter, devince product normaliser for martketing platform and define encoder to some formats\n$formatter = new Formatter(\n    [new FacebookProductNormaliser()],\n    [new FacebookFeedCsvEncoder()]\n);\n\n// formatted feed is generator which yields parts of feed\n$generator = $formatter-\u003eformat($feed, 'facebook', 'csv');\n\n// send feed to output\nheader('Content-type: text/csv');\n\nforeach ($generator as $streamChunk) {\n    echo $streamChunk;\n}\n        \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsokil%2Fphp-merchant-product-feed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsokil%2Fphp-merchant-product-feed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsokil%2Fphp-merchant-product-feed/lists"}