diff --git a/bridges/MarktplaatsBridge.php b/bridges/MarktplaatsBridge.php
index af6f28f5..d8fce6c4 100644
--- a/bridges/MarktplaatsBridge.php
+++ b/bridges/MarktplaatsBridge.php
@@ -86,18 +86,16 @@ class MarktplaatsBridge extends BridgeAbstract {
$item['timestamp'] = $listing->date;
$item['author'] = $listing->sellerInformation->sellerName;
$item['content'] = $listing->description;
- $item['enclosures'] = $listing->imageUrls;
$item['categories'] = $listing->verticals;
$item['uid'] = $listing->itemId;
if(!is_null($this->getInput('i')) && !empty($listing->imageUrls)) {
- if($this->getInput('i')) {
- if(is_array($listing->imageUrls)) {
- foreach($listing->imageUrls as $imgurl) {
- $item['content'] .= "
\n
";
- }
- } else {
- $item['content'] .= "
\n
";
+ $item['enclosures'] = $listing->imageUrls;
+ if(is_array($listing->imageUrls)) {
+ foreach($listing->imageUrls as $imgurl) {
+ $item['content'] .= "
\n
";
}
+ } else {
+ $item['content'] .= "
\n
";
}
}
if(!is_null($this->getInput('r'))) {
@@ -105,8 +103,25 @@ class MarktplaatsBridge extends BridgeAbstract {
$item['content'] .= "
\n
\n
\n" . json_encode($listing);
}
}
+ $item['content'] .= "
\n
\nPrice: " . $listing->priceInfo->priceCents/100;
+ $item['content'] .= " (" . $listing->priceInfo->priceType .")";
+ if(!empty($listing->location->cityName)) {
+ $item['content'] .= "
\n" . $listing->location->cityName;
+ }
+ if(!is_null($this->getInput('r'))) {
+ if($this->getInput('r')) {
+ $item['content'] .= "
\n
\n
\n" . json_encode($listing);
+ }
+ }
$this->items[] = $item;
}
}
}
+
+ public function getName(){
+ if(!is_null($this->getInput('q'))) {
+ return $this->getInput('q') . ' - Marktplaats';
+ }
+ return parent::getName();
+ }
}