Skip to content

Webeleven/google-shopping-feed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

#Google Shopping Feed API

please note this this is still in development

###composer

{
    "require": {
        "lukesnowden/google-shopping-feed": "dev-master"
    }
}

###Usage

use LukeSnowden\GoogleShoppingFeed\Containers\GoogleShopping;

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

foreach( $products as $product ) {

	$item = GoogleShopping::createItem();
	$item->id($id);
	$item->title($title);
	$item->price($price);
	$item->mpn($SKU);
	$item->sale_price($salePrice);
	$item->link($link);
	$item->image_link($imageLink);
	...
	...

	// create a variant
	$variant = $item->variant();
	$variant->size($variant::LARGE);
	$variant->color('Red');

}

// boolean value indicates output to browser
GoogleShopping::asRss(true);

###Category Taxonomies

returns a list of the categories. The list is updated daily from Googles Documentation

$googleCategories = GoogleShopping::categories();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%