mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
commit
0adb474f63
@ -112,7 +112,9 @@ class VisiosoftModuleAdvsCreateAdvsFields extends Migration
|
||||
]
|
||||
],
|
||||
'order' => 'anomaly.field_type.integer',
|
||||
'price' => 'anomaly.field_type.decimal',
|
||||
'price' => [
|
||||
'type' => 'visiosoft.field_type.decimal',
|
||||
],
|
||||
'currency' => [
|
||||
'type' => 'anomaly.field_type.select',
|
||||
'config' => [
|
||||
|
||||
@ -151,15 +151,6 @@ return [
|
||||
'mode' => 'upload',
|
||||
]
|
||||
],
|
||||
'currencies' => [
|
||||
"type" => "anomaly.field_type.checkboxes",
|
||||
'bind' => 'adv.currencies',
|
||||
'env' => 'ADV_CURRENCIES',
|
||||
'config' => [
|
||||
"default_value" => 'a:1:{i:0;s:1:"0";}',
|
||||
'options' => Config::get('streams::currencies.enabled')
|
||||
]
|
||||
],
|
||||
'free_currencyconverterapi_key' => [
|
||||
"type" => "anomaly.field_type.text",
|
||||
'bind' => 'adv.free_currencyconverterapi_key',
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
{% if blocks('ad-item-details-block-area') is null %}
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
||||
<h3 class="ad-price">
|
||||
<b>{{ currency_symbol(adv.currency) }}{{ adv.price.format() }}</b>
|
||||
|
||||
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||
<!-- priceField with Block -->
|
||||
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
|
||||
<!-- priceField with Block -->
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<div class="col-md-3 text-left justify-content-center align-self-center">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<b>{{ adv.price.currency }}</b>
|
||||
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||
</div>
|
||||
{% if setting_value('visiosoft.module.location::list_page_location') %}
|
||||
<div class="col-md-12 justify-content-center align-self-center text-truncate">
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="justify-content-center align-middle">
|
||||
<b>{{ adv.price.currency }}</b>
|
||||
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||
</td>
|
||||
<td class="justify-content-center align-middle">
|
||||
<small>{{ adv.created_at|date("d/m/Y") }}</small>
|
||||
|
||||
@ -190,15 +190,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
||||
|
||||
|
||||
if ($isActiveDopings) {
|
||||
if ($param == null) {
|
||||
$DopingModel = new DopingModel();
|
||||
$doping_advs_ids = $DopingModel->getFeaturedAds(3);
|
||||
$query = $query->whereIn('advs_advs.id', $doping_advs_ids);
|
||||
}
|
||||
$query = $query->leftJoin('dopings_dopings', function ($join) {
|
||||
$join->on('advs_advs.id', '=', 'dopings_dopings.adv_name_id');
|
||||
$join->where('dopings_dopings.doping_type_id', '=', 4);
|
||||
});
|
||||
$query = app('Visiosoft\DopingsModule\Http\Controller\DopingsController')->search($query, $param);
|
||||
}
|
||||
if (!empty($param['sort_by'])) {
|
||||
switch ($param['sort_by']) {
|
||||
@ -215,8 +207,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
||||
} else {
|
||||
$query = $query->orderBy('advs_advs.created_at', 'desc');
|
||||
if ($isActiveDopings) {
|
||||
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name',
|
||||
'advs_advs_translations.advs_desc as advs_desc', 'dopings_dopings.id as doping');
|
||||
$query = app('Visiosoft\DopingsModule\Http\Controller\DopingsController')->querySelect($query);
|
||||
} else {
|
||||
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name',
|
||||
'advs_advs_translations.advs_desc as advs_desc');
|
||||
|
||||
@ -163,6 +163,7 @@ class AdvsController extends PublicController
|
||||
|
||||
foreach ($featured_advs as $index => $ad) {
|
||||
$featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
|
||||
$featured_advs[$index]->price = number_format($ad->price);
|
||||
$featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
|
||||
}
|
||||
|
||||
|
||||
@ -198,7 +198,7 @@ function SelectOnClick() {
|
||||
var id = $(this).attr('data-id');
|
||||
|
||||
if ($(this).attr('data-field') == "country") {
|
||||
input.val(id)
|
||||
$('input[name="country"]').val(id)
|
||||
text_html.html(input_text)
|
||||
$(".filter-location-body input[type='checkbox']").prop('checked', false);
|
||||
$(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
<b>
|
||||
<span class="float-left">{{ trans('visiosoft.module.location::field.address.name') }}</span>
|
||||
</b>
|
||||
<a href="#" class="a-sahibinden-type selected-country filter-country-btn float-right">
|
||||
<small>{{ getCountry(setting_value('visiosoft.module.location::default_country')).name }}</small>
|
||||
</a>
|
||||
{% set country = setting_value('visiosoft.module.location::default_country') %}
|
||||
{% if app.request.get('country') %}
|
||||
{% set country = app.request.get('country') %}
|
||||
{% endif %}
|
||||
<a href="#" class="a-sahibinden-type selected-country filter-country-btn float-right">
|
||||
<small>{{ getCountry(country).name }}</small>
|
||||
</a>
|
||||
<input name="country" value="{{ country }}" type="hidden">
|
||||
</div>
|
||||
<div class="col-12 px-0 py-1">
|
||||
|
||||
@ -67,6 +67,8 @@
|
||||
"anomaly/html_block-extension": "~1.0.0",
|
||||
"anomaly/wysiwyg_block-extension": "~1.0.0",
|
||||
"ammadeuss/laravel-html-dom-parser": "^1.1",
|
||||
"visiosoft/decimal-field_type": "~2.1.0",
|
||||
"visiosoft/integer-field_type": "~2.1.0",
|
||||
"guzzlehttp/guzzle": "~6.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user