Skip to content
Snippets Groups Projects
Commit 0336910b authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '671-sponsorentext-andern-und-produktsuche-raus' into 'development'

Resolve "Sponsorentext ändern und Produktsuche raus"

Closes #671

See merge request !1156
parents c86faba0 daf5cab7
No related branches found
No related tags found
2 merge requests!1157Development,!1156Resolve "Sponsorentext ändern und Produktsuche raus"
......@@ -30,7 +30,6 @@ class MetaGer
protected $engines = [];
protected $results = [];
protected $ads = [];
protected $products = [];
protected $warnings = [];
protected $errors = [];
protected $addedHosts = [];
......@@ -280,7 +279,6 @@ class MetaGer
if ($this->validated) {
$this->ads = [];
$this->products = [];
$this->maps = false;
}
......@@ -365,9 +363,6 @@ class MetaGer
foreach ($engine->ads as $ad) {
$this->ads[] = $ad;
}
foreach ($engine->products as $product) {
$this->products[] = $product;
}
}
}
......@@ -1249,24 +1244,6 @@ class MetaGer
}
}
public function hasProducts()
{
if (count($this->products) > 0) {
return true;
} else {
return false;
}
}
public function getProducts()
{
$return = [];
foreach ($this->products as $product) {
$return[] = get_object_vars($product);
}
return $return;
}
public function canCache()
{
return $this->canCache;
......
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
class RlvProduct extends Searchengine
{
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
# try
# {
$results = json_decode($result, true);
$counter = 0;
foreach ($results["products"] as $result) {
$counter++;
$image = $result["productImage"];
$image = str_replace("//", "https://", $image);
$this->products[] = new \App\Models\Result(
$this->engine,
$result["productTitle"],
$result["shopLink"],
$result["shopLink"],
"",
$result["shopTitle"],
$counter,
['partnershop' => false,
'price' => $result["price"],
'image' => $image,
'shipping' => $result["distribution"]]
);
}
}
}
......@@ -22,7 +22,7 @@ elixir(function (mix) {
| scriptStartPage.js
| settings.js
*/
mix.scripts(['lib/jquery.js', 'lib/jquery-ui.min.js', 'lib/bootstrap.js', 'lib/lightslider.js', 'lib/masonry.js', 'lib/imagesloaded.js', 'lib/openpgp.min.js', 'lib/iframeResizer.min.js', 'lib/md5.js'], 'public/js/lib.js')
mix.scripts(['lib/jquery.js', 'lib/jquery-ui.min.js', 'lib/bootstrap.js', 'lib/masonry.js', 'lib/imagesloaded.js', 'lib/openpgp.min.js', 'lib/iframeResizer.min.js', 'lib/md5.js'], 'public/js/lib.js')
mix.scripts(['scriptStartPage.js', 'results.js'], 'public/js/scriptStartPage.js');
mix.scripts(['scriptResultPage.js', 'results.js'], 'public/js/scriptResultPage.js');
//mix.scripts(['scriptSubpages.js'], 'public/js/scriptSubpages.js');
......
This diff is collapsed.
......@@ -588,7 +588,6 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
$.get(getString, function (data, status) {
if (status === 'success') {
var quicktips = $(data).children('feed').children('entry').map(function () {
console.log(this);
return quicktip = {
type: $(this).children('mg\\:type').text(),
title: $(this).children('title').text(),
......@@ -605,7 +604,6 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
}).toArray()
};
}).toArray();
console.log(quicktips);
loadedHandler(quicktips);
} else {
console.error('Loading quicktips failed with status ' + status);
......
......@@ -27,7 +27,7 @@ return [
'sponsors.head.1' => 'Weitere Informationen',
'sponsors.head.2' => 'Sponsoren',
'sponsors.woxikon' => '<a href="http://www.tagesgeld.jetzt" class="mutelink" target="_blank" rel="noopener">Tagesgeld jetzt!</a>',
'sponsors.woxikon' => '<a href="http://www.tagesgeld.jetzt" class="mutelink" target="_blank" rel="noopener">Tagesgeld</a>',
'sponsors.gutscheine' => '<a href="http://www.gutschein-magazin.de/" class="mutelink" target="_blank" rel="noopener">Aktuelle Gutscheine auf Gutschein-Magazin.de</a>',
'sponsors.seo' => '<a href="https://www.semtrix.de/seo-agentur/" class="mutelink" target="_blank" rel="noopener">SEO Agentur </a>',
......
......@@ -336,8 +336,8 @@
<div id="sponsors" class="col-sm-6">
<h2>{{ trans('index.sponsors.head.2') }}</h2>
<ul class="startpage">
<li>{!! trans('index.sponsors.seo') !!}</li>
<li>{!! trans('index.sponsors.woxikon') !!}</li>
<li>{!! trans('index.sponsors.seo') !!}</li>
<li>{!! trans('index.sponsors.gutscheine') !!}</li>
</ul>
</div>
......
<div class="row lightSliderContainer hidden">
<div class="col-sm-1 hidden-xs"></div>
<div class="resultInformation col-xs-12 col-sm-11">
<span id="mark">Produktanzeigen:</span>
<ul id="products" class="lightSlider" >
@foreach($products as $product)
<li>
<div class="product">
<a href="{{$product["link"]}}" title="{{$product["titel"]}}" target="_blank" rel="noopener">
<div class="price">{!!$product["price"]!!}</div>
<img src="{{ $metager->getImageProxyLink($product["image"]) }}" />
<p class="title">{{$product["titel"]}}</p>
<p class="shop">{{$product["gefVon"]}}</p>
<p class="shipping">{{$product["additionalInformation"]["shipping"]}}</p>
</a>
</div>
</li>
@endforeach
</ul>
</div>
</div>
......@@ -24,18 +24,15 @@
@else
<div class="col-xs-12 col-md-12 resultContainer">
@endif
@if($metager->hasProducts())
@if( $metager->getFokus() !== "produktsuche" && !$apiAuthorized)
@include('layouts.products', ['products' => $metager->getProducts()])
@endif
@if($mobile)
@include('layouts.ad', ['ad' => $metager->popAd()])
@else
@for($i = 0; $i <= 2; $i++)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endfor
@endif
@foreach($metager->getResults() as $result)
@if($result->number % 7 === 0)
@if((!$mobile && $result->number % 7 === 0) || ($mobile && $result->number % 4 === 0))
@include('layouts.ad', ['ad' => $metager->popAd()])
@endif
@include('layouts.result', ['result' => $result])
......
......@@ -17,15 +17,9 @@
</div>
@endif
<div class="col-xs-12 col-md-8">
@if($metager->hasProducts())
@if( $metager->getFokus() !== "produktsuche" && !$apiAuthorized)
@include('layouts.products', ['products' => $metager->getProducts()])
@endif
@else
@for($i = 0; $i <= 2; $i++)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endfor
@endif
@for($i = 0; $i <= 2; $i++)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endfor
@foreach($metager->getResults() as $result)
@if($result->number % 7 === 0)
@include('layouts.ad', ['ad' => $metager->popAd()])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment