From 233584eb55e81a66c45b96e4b3ee3a88c3ad9f94 Mon Sep 17 00:00:00 2001 From: freek Date: Wed, 17 Dec 2014 13:41:01 +0100 Subject: [PATCH] add product identifier to search results --- src/Spatie/GoogleSearch/GoogleSearch.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Spatie/GoogleSearch/GoogleSearch.php b/src/Spatie/GoogleSearch/GoogleSearch.php index 3770cb1..5a79e35 100755 --- a/src/Spatie/GoogleSearch/GoogleSearch.php +++ b/src/Spatie/GoogleSearch/GoogleSearch.php @@ -63,6 +63,8 @@ public function getResults($query) { $searchResults[$i]['product']['brand'] = $this->getPageMapProperty($item, 'product', 'brand'); $searchResults[$i]['product']['price'] = $this->getPageMapProperty($item, 'product', 'price'); $searchResults[$i]['product']['image'] = $this->getPageMapProperty($item, 'product', 'image'); + $searchResults[$i]['product']['identifier'] = $this->getPageMapProperty($item, 'product', 'identifier'); + $searchResults[$i]['offer']['price'] = $this->getPageMapProperty($item, 'offer', 'price'); $searchResults[$i]['offer']['pricecurrency'] = $this->getPageMapProperty($item, 'offer', 'pricecurrency');