定制 lukesnowden/google-shopping-feed 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lukesnowden/google-shopping-feed

最新稳定版本:2.2.12

Composer 安装命令:

composer require lukesnowden/google-shopping-feed

包简介

Google Shopping Feed API

README 文档

README

Software License Total Downloads

Composer

How to install with composer.

{
    "require": {
        "lukesnowden/google-shopping-feed": "^2.2"
    }
}

Usage

Example of Google feed generation.

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');

	/**
	 * One thing to note, if creating variants, delete the initial object after you've done,
	 * Google no longer needs it!
	 *
	 * $item->delete();
	 *
	 */

}

// 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

$lang = 'gb';
$googleCategories = GoogleShopping::categories($lang);

$lang can be one of these Google supported languages: au, br, cn, cz, de, dk, es, fr, gb, it, jp, nl, no, pl, ru, sw, tr, us.

统计信息

  • 总下载量: 271.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 70
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 68
  • Watchers: 4
  • Forks: 58
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-12