PHPackages                             shoppingfeed/php-feed-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shoppingfeed/php-feed-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shoppingfeed/php-feed-generator
===============================

ShoppingFeed Feed manager

1.4.1(10mo ago)6150.3k—0%8[3 issues](https://github.com/shoppingflux/php-feed-generator/issues)[1 PRs](https://github.com/shoppingflux/php-feed-generator/pulls)3Apache-2.0PHPPHP &gt;=5.5

Since Mar 29Pushed 10mo ago9 watchersCompare

[ Source](https://github.com/shoppingflux/php-feed-generator)[ Packagist](https://packagist.org/packages/shoppingfeed/php-feed-generator)[ RSS](/packages/shoppingfeed-php-feed-generator/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (24)Used By (3)

Feed Generator
==============

[](#feed-generator)

This library aims to simplify compliant feed generation for ShoppingFeed services. If we want to unpack this statement :

- a *feed* is a file that contains products (a collection of references, descriptions, prices, quantities, image links etc.)
- a *compliant feed* is, by default, an XML file that is compliant with [the rules defined here](https://github.com/shoppingflux/feed-xml/blob/develop/feed.xsd) (for an example of what such a file might look like, [you can check this example](https://github.com/shoppingflux/feed-xml/blob/develop/examples/minimal.xml)); I say by default, because we can have other formats, but more on that later
- you can find out more about the *ShoppingFeed services* [on our website](https://www.shopping-feed.com/)

It allows you to format, filter, map &amp; validate your products using a series of methods defined in this library. Once all this is done, the generator outputs a file: it is *this* file that will be used by the ShoppingFeed solution to import all your products so that they can be dispatched to the different marketplaces.

When should you use this feed generator ?

- if you are considering using the [ShoppingFeed solution](https://www.shopping-feed.com/)
- and your feed (the file containing all your products) is not in a format that is supported out of the box
- and you wish to have an easy / speedy set-up
- or if you want to provide an out-of-the-box format for new versions of existing e-commerce platforms (such as Magento, Prestashop etc.)
- or if you want to avoid generating and formatting the feed yourself

The generated feed produced by this library is, by default, in [the standard XML ShoppingFeed format](https://github.com/shoppingflux/feed-xml). But the library also allows you to :

- either choose a different format (for now we only support CSV, on top of the default XML)
- either write your own FormatWriter, by extending the ProductFeedWriterInterface

### Requirements

[](#requirements)

- PHP version 5.5 or above
- PHP XML extension when using XML output

### Installation

[](#installation)

`composer require shoppingfeed/php-feed-generator`

### Overview

[](#overview)

The component acts as pipeline to convert any data set to compliant XML output, to a file or any other destination.

From the user's point of view, it consists of mapping your data to a `ShoppingFeed\Feed\Product\Product` object. The library take cares of the rest : formatting the data and writing the valid XML.

### Getting Started

[](#getting-started)

```
