mirror of
https://github.com/wearepixel/laravel-google-shopping-feed.git
synced 2026-11-14 21:31:46 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7e22e8fce | ||
|
|
5a1c822810 | ||
|
|
fb85d49e88 | ||
|
|
b08e9943b8 | ||
|
|
01ac326a54 |
@@ -25,8 +25,8 @@ ## Example
|
|||||||
'id' => 'item_001',
|
'id' => 'item_001',
|
||||||
'title' => 'Blue Nikes',
|
'title' => 'Blue Nikes',
|
||||||
'link' => 'https://mystore.com/products/blue-nikes',
|
'link' => 'https://mystore.com/products/blue-nikes',
|
||||||
'image_link' => 'https://mystore.com/images/blue-nikes-001.jpg',
|
'g:image_link' => 'https://mystore.com/images/blue-nikes-001.jpg',
|
||||||
'price' => 29.99,
|
'g:price' => 29.99,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $feed->generate();
|
return $feed->generate();
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"google-shopping-feed"
|
"google-shopping-feed"
|
||||||
],
|
],
|
||||||
"version": "1.0.0",
|
"version": "3.0.0",
|
||||||
"homepage": "https://github.com/wearepixel/laravel-google-shopping-feed",
|
"homepage": "https://github.com/wearepixel/laravel-google-shopping-feed",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ class LaravelGoogleShoppingFeed
|
|||||||
'id',
|
'id',
|
||||||
'link',
|
'link',
|
||||||
'title',
|
'title',
|
||||||
'price',
|
'g:price',
|
||||||
'image_link'
|
'g:image_link'
|
||||||
];
|
];
|
||||||
|
|
||||||
public static function init($title = null, $description = null, $link = null)
|
public static function init($title = null, $description = null, $link = null)
|
||||||
@@ -53,7 +53,7 @@ public function addItem(array $item): bool
|
|||||||
public function generate()
|
public function generate()
|
||||||
{
|
{
|
||||||
$this->xml = [
|
$this->xml = [
|
||||||
'rss' => [
|
'rss' => [
|
||||||
'_attributes' => [
|
'_attributes' => [
|
||||||
'xmlns:g' => 'http://base.google.com/ns/1.0',
|
'xmlns:g' => 'http://base.google.com/ns/1.0',
|
||||||
'version' => '2.0',
|
'version' => '2.0',
|
||||||
|
|||||||
Reference in New Issue
Block a user