Library to generate valid Google Merchant Feed.
Library check data integrity and format to fit Google Merchant Center requirements.
Data to feed you will take from database, xml, json or other source and set it using library methods.
PHP >= 5.3
Composer (optional)
Choose acceptable installation method to your website
{
"require": {
"oldmine/google-merchant-feed-generator": "master"
}
}
composer require oldmine/google-merchant-feed-generator
require_once('src/IFeedGenerator.php');
require_once('src/IGenerated.php');
require_once('src/Constants.php');
require_once('src/Item.php');
require_once('src/Channel.php');
require_once('src/Feed.php');
require_once('src/XMLGenerator.php');
See UsageExample.php.
When you have chosen feed generator you can choose method to get result:
$generator->printFeed() // Print feed in current document
$generator->saveFeed($file) // Save feed to $file
$generator->getFeed() // Get feed as string
To run tests use command:
phpunit tests
- Daniil Zhelninskiy - Oldmine
This project is licensed under the Apache License Version 2.0 - see the LICENSE.md file for details