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

Versandkosten hinzugefügt

parent 17d4804c
......@@ -27,7 +27,7 @@ class Result
public $rank; # Das Ranking für das 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);
$this->titel = strip_tags(trim($titel));
......@@ -52,15 +52,16 @@ class Result
} else {
$this->engineBoost = 1;
}
$this->valid = true;
$this->host = @parse_url($link, PHP_URL_HOST);
$this->strippedHost = $this->getStrippedHost($this->anzeigeLink);
$this->strippedDomain = $this->getStrippedDomain($this->strippedHost);
$this->strippedLink = $this->getStrippedLink($this->anzeigeLink);
$this->rank = 0;
$this->partnershop = $partnershop;
$this->image = $image;
$this->price = $price;
$this->valid = true;
$this->host = @parse_url($link, PHP_URL_HOST);
$this->strippedHost = $this->getStrippedHost($this->anzeigeLink);
$this->strippedDomain = $this->getStrippedDomain($this->strippedHost);
$this->strippedLink = $this->getStrippedLink($this->anzeigeLink);
$this->rank = 0;
$this->partnershop = $partnershop;
$this->image = $image;
$this->price = $price;
$this->additionalInformation = $additionalInformation;
}
/* Ranked das Ergebnis nach folgenden Aspekten:
......
......@@ -33,7 +33,8 @@ class RlvProduct extends Searchengine
$counter,
$partnershop = false,
$image,
$result["price"]
$result["price"],
['shipping' => $result["distribution"]]
);
}
}
......
......@@ -11,7 +11,7 @@
<img src="{{ $metager->getImageProxyLink($product["image"]) }}" />
<p class="title">{{$product["titel"]}}</p>
<p class="shop">{{$product["gefVon"]}}</p>
<p class="shipping">Versand gratis</p>
<p class="shipping">{{$product["additionalInformation"]["shipping"]}}</p>
</a>
</div>
</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