diff --git a/app/Models/Result.php b/app/Models/Result.php index c98343e18346a7b1f426d530b954f57641d46b97..7b871c7ccc5340e09ed2fecb232ed4a499199222 100644 --- a/app/Models/Result.php +++ b/app/Models/Result.php @@ -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: diff --git a/app/Models/parserSkripte/Rlvproduct.php b/app/Models/parserSkripte/Rlvproduct.php index aab2d53f9bbdbc9f52c81dcf3438e4612be2f10b..c5347fb6895751e3a842403ccfee882e1a660a6c 100644 --- a/app/Models/parserSkripte/Rlvproduct.php +++ b/app/Models/parserSkripte/Rlvproduct.php @@ -33,7 +33,8 @@ class RlvProduct extends Searchengine $counter, $partnershop = false, $image, - $result["price"] + $result["price"], + ['shipping' => $result["distribution"]] ); } } diff --git a/resources/views/layouts/products.blade.php b/resources/views/layouts/products.blade.php index c3a3783a4633334ca7f94515a74c3882fc05c9b5..f0b7396618886cae90ff972a604d391af21bc971 100644 --- a/resources/views/layouts/products.blade.php +++ b/resources/views/layouts/products.blade.php @@ -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>