Commit df598d9e authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Versandkosten hinzugefügt

parent 17d4804c
...@@ -27,7 +27,7 @@ class Result ...@@ -27,7 +27,7 @@ class Result
public $rank; # Das Ranking für das Ergebnis public $rank; # Das Ranking für das Ergebnis
# Erstellt ein neues Ergebnis # Erstellt ein neues Ergebnis
public function __construct($provider, $titel, $link, $anzeigeLink, $descr, $gefVon, $sourceRank, $partnershop = false, $image = "", $price = 0) public function __construct($provider, $titel, $link, $anzeigeLink, $descr, $gefVon, $sourceRank, $partnershop = false, $image = "", $price = 0, $additionalInformation = [])
{ {
$provider = simplexml_load_string($provider); $provider = simplexml_load_string($provider);
$this->titel = strip_tags(trim($titel)); $this->titel = strip_tags(trim($titel));
...@@ -52,15 +52,16 @@ class Result ...@@ -52,15 +52,16 @@ class Result
} else { } else {
$this->engineBoost = 1; $this->engineBoost = 1;
} }
$this->valid = true; $this->valid = true;
$this->host = @parse_url($link, PHP_URL_HOST); $this->host = @parse_url($link, PHP_URL_HOST);
$this->strippedHost = $this->getStrippedHost($this->anzeigeLink); $this->strippedHost = $this->getStrippedHost($this->anzeigeLink);
$this->strippedDomain = $this->getStrippedDomain($this->strippedHost); $this->strippedDomain = $this->getStrippedDomain($this->strippedHost);
$this->strippedLink = $this->getStrippedLink($this->anzeigeLink); $this->strippedLink = $this->getStrippedLink($this->anzeigeLink);
$this->rank = 0; $this->rank = 0;
$this->partnershop = $partnershop; $this->partnershop = $partnershop;
$this->image = $image; $this->image = $image;
$this->price = $price; $this->price = $price;
$this->additionalInformation = $additionalInformation;
} }
/* Ranked das Ergebnis nach folgenden Aspekten: /* Ranked das Ergebnis nach folgenden Aspekten:
......
...@@ -33,7 +33,8 @@ class RlvProduct extends Searchengine ...@@ -33,7 +33,8 @@ class RlvProduct extends Searchengine
$counter, $counter,
$partnershop = false, $partnershop = false,
$image, $image,
$result["price"] $result["price"],
['shipping' => $result["distribution"]]
); );
} }
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<img src="{{ $metager->getImageProxyLink($product["image"]) }}" /> <img src="{{ $metager->getImageProxyLink($product["image"]) }}" />
<p class="title">{{$product["titel"]}}</p> <p class="title">{{$product["titel"]}}</p>
<p class="shop">{{$product["gefVon"]}}</p> <p class="shop">{{$product["gefVon"]}}</p>
<p class="shipping">Versand gratis</p> <p class="shipping">{{$product["additionalInformation"]["shipping"]}}</p>
</a> </a>
</div> </div>
</li> </li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment