PHPackages                             elfeffe/google-shopping-product-feed - 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. [API Development](/categories/api)
4. /
5. elfeffe/google-shopping-product-feed

ActiveLibrary[API Development](/categories/api)

elfeffe/google-shopping-product-feed
====================================

Google Shopping Product Feed for PHP

1.1.2(10y ago)52.4k2GPLv3PHPPHP &gt;=5.3.0

Since Apr 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/elfeffe/google-shopping-product-feed)[ Packagist](https://packagist.org/packages/elfeffe/google-shopping-product-feed)[ Docs](https://github.com/NinthYard/google-shopping-product-feed)[ RSS](/packages/elfeffe-google-shopping-product-feed/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (6)Used By (0)

\#Google Shopping Product Feed A PHP library to generate a Google Shopping feed. Data to fill the feed could be retrieved from a database, json or xml file, or added manually.

Issues, feature requests, and pull requests always welcome!

This has been tested on a UK, German, and French feed so far. Functions to santise data to make it pass Google's Merchant Centre validation have been used and will be added. This mainly applies to edge-cases on size and colour variations.

For more information see:

\##Installation

\###Composer (.json)

```
{
    "require": {
        "ninthyard/google-shopping-product-feed": "master"
    }
}
```

\###Composer (Command Line)

```
composer require ninthyard/google-shopping-product-feed

```

\###Standard Installation If one is not using composer and including vendor/autoload.php, just require the following prior to using:

```
require('src/NinthYard/GoogleShoppingFeed/Feed.php');
require('src/NinthYard/GoogleShoppingFeed/Item.php');
require('src/NinthYard/GoogleShoppingFeed/Node.php');
require('src/NinthYard/GoogleShoppingFeed/Containers/GoogleShopping.php');

```

\##Usage

\###Examples Please see *examples\_using\_composer.php* for a brief look on how to create a Google Shopping feed.

More examples to follow.

\###Overview

```
require('vendor/autoload.php');
use NinthYard\GoogleShoppingFeed\Containers\GoogleShopping;

GoogleShopping::title('Test Feed');
GoogleShopping::link('http://www.example.com/');
GoogleShopping::description('Test Google Shopping Feed');

$item = GoogleShopping::createItem();
$item->id('SKU0001');//A SKU code for example, or any unique identifies (eg. could be the id from a database table)
$item->title('An Example Product Title');
$item->price('29.99'); //Price one wishes to sell a product for (unless sale_price option is added, then it's the original price)
$item->mpn('ACME00001');
$item->brand('ACME');
$item->sale_price('19.99'); //The actual price one wishes to sell a product for (optional)
$item->link('http://www.example.com/example-product.html');
$item->image_link('http://www.example.com/example-image.jpg');

/** create a variant */
$variant = $item->variant();
$variant->size('L');
$variant->color('Green');

/**
 * If creating variants one should delete the initial product object as
 * the variants will have the original $item properties and will be
 * grouped under one product group with the information from the $item
 *
 * $item->delete();
 *
**/

// boolean value true outputs to browser as XML
GoogleShopping::asRss(true);

// boolean value true outputs raw (to put in a file for example)
file_put_contents('myfeed.xml', GoogleShopping::asRss(false));
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Total

5

Last Release

3663d ago

Major Versions

0.9.2 → 1.0.02016-04-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4717507?v=4)[federeggiani](/maintainers/elfeffe)[@elfeffe](https://github.com/elfeffe)

---

Top Contributors

[![elfeffe](https://avatars.githubusercontent.com/u/4717507?v=4)](https://github.com/elfeffe "elfeffe (2 commits)")[![ElliotReed](https://avatars.githubusercontent.com/u/33166429?v=4)](https://github.com/ElliotReed "ElliotReed (1 commits)")

---

Tags

phpapigooglefeedshoppingGoogle Shopping Feedadwords

### Embed Badge

![Health badge](/badges/elfeffe-google-shopping-product-feed/health.svg)

```
[![Health](https://phpackages.com/badges/elfeffe-google-shopping-product-feed/health.svg)](https://phpackages.com/packages/elfeffe-google-shopping-product-feed)
```

###  Alternatives

[lukesnowden/google-shopping-feed

Google Shopping Feed API

68289.3k](/packages/lukesnowden-google-shopping-feed)[gemini-api-php/client

API client for Google's Gemini API

224255.2k5](/packages/gemini-api-php-client)[jeroendesloovere/geolocation-php-api

This Geolocation PHP class connects to Google Maps API to find latitude/longitude or address.

76321.1k4](/packages/jeroendesloovere-geolocation-php-api)[gemini-api-php/laravel

Gemini API client for Laravel

8916.9k](/packages/gemini-api-php-laravel)[serpwow/google-search-results

Google Search Results PHP package via SerpWow.com

1931.8k1](/packages/serpwow-google-search-results)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
